-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: declarative password salt, secret config #57978
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
feat: declarative password salt, secret config #57978
Conversation
provokateurin
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.
I also use Nextcloud in a declarative environment using NixOS and I'm not 100% sure if this is needed or not. If you restore a backup, you'd have those values in your config.php. The backup would always contain the config.php and your database, so they would be in sync anyway.
Maybe you can explain a bit what this fixes? I'm not against merging it, just wondering what pain point this removes.
0050707 to
1972cc0
Compare
This is not necessarily a "fix", I'd just like to be able to fully control the values of all parameters instead of having Nextcloud generate them randomly, to make it easier to pre-generate a reproducible |
provokateurin
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, just one minor change.
1972cc0 to
8393caa
Compare
provokateurin
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.
Cool, thanks!
|
Would be good to run the PR from within our repo to see CI |
|
I'll do a local copy 👍 |
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
8393caa to
d73d5a2
Compare
|
Rebased to fix CI |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Summary
Adds
--password-saltand--secretoptions tomaintenance:installfor fully declarative deployments (e.g., sops-nix, Ansible Vault). Values are validated for minimum length and fall back to random generation if not provided.Running this in my homelab for months without issues.
TODO
I have not added unit tests to this commit as the main change is in the install function that has a lot of side effects. Looking for comments in regards to how to implement this, if at all.
Checklist
3. to review, feature component)stable32)