-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
acme: create certificates in subdirectory #84781
Conversation
This allows to have multiple certificates with the same common name. Lego uses in its internal directory the common name to name the certificate. fixes NixOS#84409
cc @immae |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/go-no-go-meeting-nixos-20-03-markhor/6495/20 |
Unstable and 20.03 tester will suffer from this one, because their ssl keys/certificates are recreated but I want to avoid adding migration logic for those cases to keep complexity low. |
I suppose one could symlink /var/lib/acme/.lego/accounts/ to /var/lib/acme/.lego//accounts/ ? Than only one account is created. |
Thanks for the job @Mic92 About the suffering, I simply did something like that in startPre (please test it for typos, since I rewrite it from memory, I didn’t keep the hack after applying it):
Also note that, since we have to separate the directories anyway, I decided to use EDIT: I missed part of your message that you didn’t want migration logic. The second paragraph still stands though |
I agree with @Mic92 on not introducing migration code to handle migrations from the current lego folders to the new locations after this PR, especially as it's just a matter of re-requesting certificates. I don't have a super strong opinion on I think the structure propose here is a bit better, considering there might very well be another LE client in the future that does support multiple certificates with the same common name properly. |
Well, rate limiting is an important thing with acme certificates (you can say "you’re using an unstable channel, it’s your problem", and you’d be totally right - that’s why I’m not pushing for a migration code - but it’s still an issue to some people :) ) |
Yeah. I expect people tracking unstable to be able to workaround these issues, and potentially apply a workaround as proposed above during the migration. |
One can add the following snippet to their configuration.nix to add the migration code:
I might announce that in a discourse post. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nixos-acme-action-required-on-unstable-or-20-03-pre-release/6629/1 |
20.03 backport: 377b024 |
This allows to have multiple certificates with the same common name.
Lego uses in its internal directory the common name to name the certificate.
fixes #84409
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)