palant / pfp

A simple and secure browser extension to be used with KeePass databases.
https://pfp.works/
Mozilla Public License 2.0
113 stars 14 forks source link

Implement workspaces/identities #80

Closed palant closed 1 year ago

palant commented 6 years ago

It should be possible to separate your private and work passwords for example. In some cases it might also be necessary for multiple people to use the same PfP instance. This should be possible by separating PfP data into multiple distinct workspaces/identities. Each workspace will have its own master password, which might be identical to other's but doesn't have to be. They should also have their own set of passwords, their own sync settings and their own shares. The actual implementation plan:

adrium commented 6 years ago

Hi Wladimir,

First of all, thanks for that great tool! It really seems like the optimal password manager! I particularly like the hybrid approach.

+1 for this issue. However, I only need to have several master passwords for increased security.

By looking over the implementation, I think this could be implemented without much work by including the master password's hash in the storage prefix. When changing the master password, do not delete anything, but simply change the prefix.

-1 for the identities idea... I think it might complicate the storage unnecessarily. Identity management is already implemented in Chrome and Firefox. I think the approach above is sufficient. If really multiple users use the same instance, they should be seperated by a different master password.

palant commented 6 years ago

The storage format changes are really the trivial part here. Replacing storage IDs by master password hashes isn't going to make it much simpler. However, it will make your data less discoverable - you might have data for a different master password in there, and you won't even know unless you still remember that password.

Identity management implemented in Chrome and Firefox can already be used to achieve the same effect. In reality, most people won't do it however because the implications go far beyond PfP - different identities have different sets of extensions for example. In addition, creating a new Firefox profile is far from trivial which means that this feature is barely used. Even for Chrome it is considered an advanced feature.

adrium commented 6 years ago

I just migrated my passwords at work and the usage of the tool is really pain-free. :blush: (Although the choice of the font-size is more oriented towards sight-impaired people...) :see_no_evil:

However, to be usable for my private accounts, I need to be able to use multiple master passwords. Can you perhaps implement this feature in two steps?

storage format changes are really the trivial part here

Then it would be nice, if you could implement this as a first step.

However, it will make your data less discoverable - you might have data for a different master password in there, and you won't even know unless you still remember that password

Clearing the storage is simple by invoking the clear() method.

Concerning discoverability: I think that's fine... You could even advertise it as a security by obsurity feature! :sweat_smile: Otherwise, you could store a global key with the list of used master passwords in the store. This list could even include the starting letter of the password or a user-defined hint, if desired, like:

[
  { "hash": "1234", "letters": "te" },
  { "hash": "abcd", "hint": "Sweet cherries" }
]

[Identity management] In reality, most people won't do it

I would rather instruct them how to use multi-person/multi-profile handling, than implement identity management in every extension...

But anyway, you could implement that as a second step.

What do you think?

Maryse47 commented 6 years ago

Well, "security by obscurity" is the opposite of what this project advertises. Storing parts of masterpassword or hints like "my first pets name" undermines the security model.

Implementing identities as discussed by Wladimir in first post would be valuable.

adrium commented 6 years ago

The "security by obscurity" comment was not meant to be serious.

When only chaning the storage format, there is no list of used identities / master passwords. As I understood Wladimir, he is concerned about bad discoverability (obscurity) in this case.

I would not save password hints, either. It was just a possibility of what an identity list could contain. Of course, it can also just contain a username like that:

{ "hash": "1234", "name": "adrium" }

I implemented a proof-of-concept in https://github.com/adrium/pfp-standalone

palant commented 6 years ago

For reference, I am not currently working on PfP - I expect to continue work here around end of summer. This issue isn't my top priority however. I'd fix #86 and #79 first, plus some UI improvements, only then it's going to be this issue. You are free to have a go at it already and submit a pull request, just don't expect me to accept any features that are not discoverable.

adrium commented 6 years ago

Thanks for the heads up!

  1. May I fork the code and adjust the implementation to my needs?
  2. May I publish the extension in the Chrome store eventually? (Not sure, if I will really do that. What about the name? Would you be okay with something like Pain-free master password?)

Of course, I will be happy to help, if you ever wanted to pull some changes.

Maryse47 commented 6 years ago

If you are going to publish it to Chrome store I would recommend using completely unrelated name to avoid confusion and to not looking like you try to mimic the original.

palant commented 6 years ago

You are free to fork the code, as long as you comply with the MPL 2.0 license terms. You are also free to publish your fork for others, but then it is up to you to maintain it of course. Please choose a name and icon that are different enough from the original that there cannot be any confusion. In particular, "Pain-free master password" is definitely not acceptable.

adrium commented 6 years ago

I just released Chrome and Web binaries :tada:

https://github.com/adrium/easypass/releases/tag/0.9.0

palant commented 1 year ago

I guess that as of PfP 3.0 the way to implement this is supporting multiple KeePass databases. Not sure whether I want to go there but reopening.

palant commented 1 year ago

Native host application now allows configuring multiple databases. If more than one database is configured, the extension will allow choosing one when unlocking passwords.