!MthpOIxqJhTgrMNxDS:nixos.org

NixOS ACME / LetsEncrypt

103 Members
Another day, another cert renewal44 Servers

Load older messages


SenderMessageTime
24 Nov 2021
@hexa:lossy.networkhexathe olddomain is not part of the lego command22:07:00
@m1cr0man:m1cr0man.comm1cr0manhm interesting ok22:07:01
@m1cr0man:m1cr0man.comm1cr0manah22:07:06
@hexa:lossy.networkhexathat's on 21.0522:07:18
@m1cr0man:m1cr0man.comm1cr0manit's been a while 😅 lemme glance at the module again22:07:21
@m1cr0man:m1cr0man.comm1cr0manI think someone reported/saw this in some issue before, but it was shrugged off as a fluke. I have a fair idea what it could be22:09:34
@hexa:lossy.networkhexaanyway, I would have expected the domainhash to resolve that22:16:10
@m1cr0man:m1cr0man.comm1cr0manyeah, me too. I'm just looking at the conditionals surrounding it22:16:37
@hexa:lossy.networkhexathe old domain is not part of the ExecStart script22:17:18
@m1cr0man:m1cr0man.comm1cr0manOk I think I see what's up22:17:27
@m1cr0man:m1cr0man.comm1cr0manextraDomains is not part of the hashData, which is what certDir is set based upon22:17:42
@m1cr0man:m1cr0man.comm1cr0manI need to get that vs code plugin that lets me get links to github files..22:18:11
@m1cr0man:m1cr0man.comm1cr0mantada https://github.com/m1cr0man/nixpkgs/blob/e5f9c5215ae48e0f0373787bb56c5deddbe2d9fb/nixos/modules/security/acme.nix#L15622:20:10
@hexa:lossy.networkhexaoh no!22:20:38
@m1cr0man:m1cr0man.comm1cr0man so yeah, the problem is it checks if the certificate files exist before checking domainhash. In retrospect - I should have probably just got rid of domainhash and used certdir alone to determine if renewal was needed. I think I thought at the time lego wasn't this dumb and would simply exclude the unspecified extra domains... 22:21:33
@m1cr0man:m1cr0man.comm1cr0manif the files exist and domainhash is different, it goes to line 385 (forced renew)22:21:56
@m1cr0man:m1cr0man.comm1cr0man oh look echo 1>&2 "certificate domain(s) have changed; will renew now" 22:22:04
@m1cr0man:m1cr0man.comm1cr0manhttps://github.com/m1cr0man/nixpkgs/commit/34b5c5c1a408d105beb9b92b9ed5b1565135e75e "Allow for key reuse when domains are the only thing that changed!" Aha.22:23:01
@hexa:lossy.networkhexa ah, we lost extraDomains /o\ 22:23:34
@m1cr0man:m1cr0man.comm1cr0manok so the question is, can I delete the cert files and not the key and will lego do a renew22:23:47
@hexa:lossy.networkhexaI can give that a try22:24:22
@hexa:lossy.networkhexathe certificate is likely the only place that has the info about the old san22:24:50
@hexa:lossy.networkhexado you need me to test something or can I just go ahead and purge this mess?22:38:14
@hexa:lossy.networkhexa m1cr0man: ^ 22:44:13
@m1cr0man:m1cr0man.comm1cr0mansorry - go ahead and purge22:53:27
25 Nov 2021
@m1cr0man:m1cr0man.comm1cr0manI think I simply overlooked testing removing a domain from existing domains. I'm going to add this to the test suite and then work on fixing it plus working on another ticket I saw (allowing setting more cert options at the sercurity.acme level)00:14:59
@m1cr0man:m1cr0man.comm1cr0manit's an easy enough thing to fix - but it's hard to fix without triggering mass renewals which is always a concern with ACME stuff00:15:29
@m1cr0man:m1cr0man.comm1cr0manhttps://github.com/NixOS/nixpkgs/issues/108237 also this one is interesting. The easy solution here is to add a message explaining that "If you are reading this after a nixos-rebuild - don't panic! This is just a certificate renewal failure and self-signed certs will be in place" (or something along those lines), but that would have to appear for all failures not just on rebuild. If anyone has suggestions feel free to shout them out. I'm off for now but will be working towards a PR by the weekend00:20:59
26 Nov 2021
@m1cr0man:m1cr0man.comm1cr0manIf I'm doing some work to fix multiple issues, should I make a PR for each issue or do what I normally do and make one PR for all of them? I always make separate commits for each fix regardless.21:50:07
@hexa:lossy.networkhexathe latter should be fine given they're separate commits22:01:35

Show newer messages


Back to Room ListRoom Version: 6