Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for Different types of Records #155

Open
ghost opened this issue Jan 31, 2016 · 17 comments
Open

Templates for Different types of Records #155

ghost opened this issue Jan 31, 2016 · 17 comments

Comments

@ghost
Copy link

ghost commented Jan 31, 2016

Hi,
Feature Request:

Template for Email accounts
Template for Software License or Serial
Template for SSH Accounts
Template for Logins

ETC

@ghost
Copy link
Author

ghost commented Jan 31, 2016

Also where are they stored I would like to sync between machines (the tempaltes)

@jounathaen
Copy link
Member

Hey, a workaround would be: activate "Show all fields templated" and then write the desired fields in the big empty field as follows: FIELDNAME : FIELDCONTENT
But you have to do this for every Password.
I also like the template idea.
What fields would you suggest for the Templates you suggested?
(beside creating custom ones in the program)

@annejan
Copy link
Member

annejan commented Jan 31, 2016

Multiple templates sounds like a very nice idea.
This will need a big change to the (currently very basic) configuration screen.

The templates are stored together with all configuration options in the system preferred way.

Windows: registry HKEY_CURRENT_USER\Software\IJhack\QtPass
OSX: ~/Library/Preferences/com.IJHack.QtPass.plist
Linux: ~/.config/IJHack/QtPass.conf

But all settings can be over-ruled by a qtpass.ini file in the folder where the application resides.
So called "portable config".

There are some things to take care of when trying to sync on some systems (especially OSX, with regards to text and binary .plist files).

http://doc.qt.io/qt-5/qsettings.html#platform-specific-notes

@jounathaen
Copy link
Member

I designed the passworddialouge, the way I would imagine this:
screenshot from 2016-01-31 10 11 18
In the Dropdown menu, you can select which template you use.
My Idea would be to store other strings to the location annejan mentioned like this:
passTemplate1=Templatename1\nUsername\nEmail\n
passTemplate2=Templatename2\nUsername\nEmail\n
and TemplatenameX would be displayed in the dropdown

@annejan
Copy link
Member

annejan commented Jan 31, 2016

The way it is stored also differs per os ;)

I'm using the Qt native qsettings types to store all of it.
In future might even be an idea to have separate file for these kinds of settings.

The password save/edit screen I get, the way to input/change the templates not yet . .

@jounathaen
Copy link
Member

What about writing the templates to the passwordStore folder? In a single template file. Then Syncing would be no problem, as usually this folder is completely Synced (at least I do so).

@annejan
Copy link
Member

annejan commented Jan 31, 2016

It is a nice idea, but unfortunately sort-of breaks with the http://www.passwordstore.org/ philosophy.

On the other hand, adding a 'dot file' would not be visible to qtpass or other pass implementations and solve this issue, would also solve a secondary issue of having different templates per profile.

Something like .templates in the root of the password store, in ini-file format would be a very nice solution possibly.

@ghost
Copy link
Author

ghost commented Jan 31, 2016

I Personally am replacing 1 password with pass and QTpass so I was imaging Variable templates for each of my folders in the password store
Secure Notes
Credit Card Info
Logins
Identities
Bank Accounts
Database Logins
Email Accounts
Memberships
Servers (ssh)
Software Licenses

you know where I can select the template tied to each folder..
Where there stored? well that where Us System Admins Leave that up to developers.
Marty

@ghost
Copy link
Author

ghost commented Jan 31, 2016

Thanks for the file location.. didn't even think to look for your account name

@jounathaen
Copy link
Member

I'd also think the dotfiles are a good Idea.
Suggestion: in the pass-root-directory the .templates file, and in the subdirectories maybe an .default_template file, that chooses the template, which is first selected when creating a password in that directory. (But you could still choose another template, defines just the first selected)

@YoshiMan
Copy link

@jounathaen can you give some sample contents of this files?
I don't exactly know what to do here.

@jounathaen
Copy link
Member

Example:
In Folder 'Bank Accounts':
.template:

IBAN:
BIC:
URL:

In Folder 'Mail Accounts':
.template

E-Mail Address:
Imap Server:
Smtp Server:

So when i create a new Password file in "Mail Accounts", I already have the Fields 'IBAN', 'BIC', and 'URL' in the PasswordDialouge

This would be basically the same content as in Settings->Templates, just different for each folder

@YoshiMan
Copy link

Okay.
Rightclick on a folder create template. Then we give a dialog, where the user can build his template.
Rightclick on a folder edit template. We give the same dialog (prefilled).
insert password on a folder, uses the .template file in this folder as template.
What should we do if there is no .template ? Use the template from the root folder?
We have to sync this to git, if usegit, right?
Which templates should we provide additionally in the dialog to insert a new password? All from this storage? So we have to collect all .template files?

@jounathaen
Copy link
Member

My Idea:

  1. yes
  2. yes
  3. yes
  4. hmm, it would be more practical, if qtpass would look in the parent folders. Example: .template in Email, subfolders Private and Work. I would not want to extra copy the .template files to each subdirectory. The Settings->Template could be stored in the Root folder, but would be overwritten by another .template in a subfolder.
  5. probably, never used git with qtpass
  6. (If I understand right:) Showing different Templates in the passwordDialouge would be a kind of different approach: Storing different Templates globally, Setting a default to use in the .template file. Don't know which approach is better...

Maybe we could indicate that a folder uses a template, by changing the icon of the folder.

@YoshiMan
Copy link

so.
4. We would go up one directory, until we find .template and use this. In the worst case we wont find any .template. Should we use none or would we give some fallback template?
5. We make a commit to the git-repo with the message added/changed template for folder1/folder2
6. I think we should store the template globally and store a default for each folder. Its is more useable if you have a folder private/mail and folder work/mail then you would rather want to have the same template for different folders.
As a member of a software development team, i want passwords stored per stage,
e.g. for prod-system

  • prod/database
  • prod/webaccess
  • prod/ssh
    Same goes for QA-system.

In my opinion we should use the approach

  1. to store the templates globally (e.g. at rootDir/.templates).
  2. to give each folder a .default_template-file, which contains the key like database and we look up this key in the (rootDir/.templates).
  3. to store the templatename in the passwordfile like .templatename:database

The users have a different template for each storage.
We would be able to move and copy password files like #116.

@tezeb
Copy link
Contributor

tezeb commented Jan 10, 2017

@YoshiMan approach seems the best.
Shall the defaults from directory be always stored inside file? (seems resonable and easier to implement). The only issue is backward compatibility, which means that some fallback mechanism will be needed anyway(ie. if no .template field in file, try .default_template and then "default"(empty) template(ie. password in first line and free text later).

@YoshiMan
Copy link

I'm kind of confused. Could someone write a detailed summary of all comments?! Maybe a new "clean" issue would be good, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants