-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix user-key encryption with Groups #16332
Comments
with the restriction that the user who manipulates the groups also know the recovery password, which might not always be the case. Also it can be a performance issue for huge installation if we want to update the share key during group manipulation. |
Another idea is to track the group changes in a separate table. Once a user from such a group log-in we could use his private key to update the group share. In this case we also need to keep the performance in mind for large installation to avoid that the login process will be delayed to much. This wouldn't give all new group members instantly access to the files. But at least in a reasonable time given that the ownCloud is used regularly by most users. During the time where the user can't decrypt the share we could even hide it and only display it once his share-key is available. |
I just had the idea of creating a key pair for every group. If you share a folder with a group that groups public key is added to the symmetric key. That leaves us with preventing access to the group key for non group members. We could encrypt it with the public keys of all members. A group admin (who, by definintion is a member of the group) can always decrypt the key to reencrypt it when he adds or removes a user) What about an admin creating a group? At that moment the group is empty and has no members. This is kind of the same problem as with the restore password, muliplied by the number of groups. |
There was an idea here with the recovery key: #10010 |
@MTRichards this is partially solved with the key storage implementation we have for 8.2. The key storage consists of two independent parts:
If the admin enabled option 2 (no matter if he also moves the storage or not), the problem with group shares is solved. But in this case we use one master key to encrypt/decrypt all file keys instead of individual per-user keys. Don't know if this is already a solution for many users or not, @MTRichards what do you think? |
@schiesbn I like that we can do both per user per file encryption, as well as per system implementation (master key). This is a partial solution certainly. What you are saying is that with 1) above, we can also handle it - but if you use the vanilla encryption app of today, it still doesn't work...right? |
@MTRichards yes, with 2) from above we can handle it, but not with the default settings. If this is really needed we have to think about adding it to the 9.0 roadmap with a high priority, sadly it wasn't possible to implement it for 8.2. |
Understood, will pencil it in for 9.0 and discuss. |
@schiesbn @PVince81 @MTRichards I still think a group key would correctly solve the problem without having to rely on a master key. Any comments? |
To be honest, the implementation just needs to be such that we are not breaking encryption security levels to solve a UX problem that we experience. |
The trick is that the key remains the same when the group changes. It will only be reencrypted with the new users public key. |
Is this milestone correct do we plan to address this issue in 9? is this a green ticket do we have prospects waiting for this? |
The 9.0 milestone is not, I believe, correct at this time. This one is partially addressed in 8.2 with the single master key for the entire system. In that case, this is no longer an issue. However, in the case of using the full encryption mechanism this has not been addressed, and is not planned for 9.0 as far as I know. |
@bboule @MTRichards I agree. Moving to 9.1 |
Could we get this somehow implemented? Implementation would be:
We will:
We hook into the post_login hook (or something similar):
@schiesbn @MTRichards Is this correct? Could this be implemented? Or at least been a decision if this is wanted at least to properly communicate if it will be possible in the future. |
You just move the problem to a new file/key. The problem is: "how do we re-encrypt the the file-key with the new users public key if you don't have access to the file-key?" Now you can replace "file-key" with "group-key" in the sentence above and you have the same problem. One answer could be to give all admins and group admins access to all group keys. Well you could do it. But this would mean the user can no longer rely on that only he and the users he chose to share with can read his files. All (group-)admin now have potentially access to your files which reduces the security and moves you one step further to the master key. Bottom line: A lot of additional complexity which either don't solve the problem or weaken the security already in a way where you could ask if the user couldn't do the extra step to the master key. |
Moving enhancement to 9.2 |
Good steps to reproduce here #26290 |
Since 9.1 I heard that the user's passwords are stored encrypted in the database anyway, so it should now be possible to reuse that to give access to the keys that need updating... |
Would move to backlog for now @pmaier1 @felixboehm |
This issue has been stalling for over a year now. Are there any updates? I mean since with the recovery key and the impersonate plugin you are able to view all files of any user it should be possible to update the share with the key aswell. The performance heavy tasks could be moved to the cron job. And on demand (so if a file hasn't been migrated but is requested that it then gets migrated) |
Unfortunately no. There is no good technical solution for this that wouldn't reduce the security model. The alternative is to switch to master key encryption which only has a single key for everybody. |
Maybe a button to reshare that only gets displayed if such a reshare would make sense? |
The problem is not only about reshare but also about adding users to a group for which a share already exists. The user in question cannot access the content already shared because the password of the owner is required for generating a share key for the new recipient. |
I meant the reshare button as a conviniece for the file owner. So like it doesn't remove the files for people that already had access to them if that makes sense. |
This issue has been automatically closed. |
(for reference, this is fixing an old item #10010)
As an ownCloud user, I want to be able to share my files with other users using groups, regardless of the state of encryption so that I can use ownCloud to collaborate with other users in that group - even when that group membership changes.
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: