-
Notifications
You must be signed in to change notification settings - Fork 2.1k
occ encryption:encrypt-all should not auto-enable user-key encryption #40702
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
Conversation
|
Makes sense - @mrow4a maybe this is also a good time to start thinking about removing user-key encryption as an option in the webUI. |
yes, I work on bigger change in encryption app to make it work. but not yet finished. |
|
I think it's better to point the user to what he should do instead of just saying "None of the encryption modules is enabled". You can also add something like "Set master encryption through the web UI" or something like that (not sure if it's possible through command line). |
it is core repo, this should not be aware of any encryption modules or even the apps that are used, right ? What I did here was to more maintain backwards compatibility with previous development here. |
Co-authored-by: Phil Davis <[email protected]>
phil-davis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I suppose that the encryption app should be the place that tries to guide admins if they enable the app but have not yet chosen the master or user key encryption.
|
Kudos, SonarCloud Quality Gate passed! |
That's right. It shouldn't but now it is checking if user key or master key encryption is enabled. I'm ok if this is addressed in the future, otherwise the easiest solution is to adjust the error message (making the code module-agnostic will likely take a while) |
|
@jvillafanez now I start thinking, that this part of the code was only to make sure that default encryption mode - use-key encryption - gets enabled by default. I think the best option is just to remove that block instead, as it was hacky anyways. If none of modules is enabled this explodes anyways. |
|
As long as it explodes with a meaningful message... From what I understand, there is only one encryption module, which is the default one. "master key" and "user key" are options of such module, which won't be available in other modules. I think a reasonable approach is to get the encryption module earlier, and show a message with the module id or displayname before starting doing anything. This way, we can give the encryption module a change of throwing an exception if it isn't properly configured (such as not having selected any mode in the default encryption module). There should be a proper method to check if the module is ready, but there isn't any and it's late to add one in the interface. |
|
related: owncloud/encryption#389 new installations will only run master key encryption ... |









Description
With OC10.7 the user-key encyption has been deprecated. This PR makes it not possible to auto-enable user-key encryption when no module is selected when executing
occ encryption:encrypt-allRelated Issue
Types of changes
Checklist: