!MthpOIxqJhTgrMNxDS:nixos.org

NixOS ACME / LetsEncrypt

107 Members
Another day, another cert renewal43 Servers

Load older messages


SenderMessageTime
19 Feb 2025
@emilazy:matrix.orgemily so actually --ari-wait-to-renew-duration is just a weird footgun…? 16:51:28
@emilazy:matrix.orgemily so unless I am misreading this Go, to have ARI work properly and not try to renew every single day we would actually need to give it an unlimited timeout. but that doesn't work with how non-ARI certificate renewal paths on a timer work. so lego has just bifurcated lego renew into two entirely different modalities of operation based on server capabilities and then enabled that by default. which seems terrible 16:52:43
@sandro:supersandro.deSandro 🐧https://datatracker.ietf.org/doc/draft-ietf-acme-ari/#:~:text=Retry%2DAfter%3A%2021600%0A%0A%20%20%20%7B%0A%20%20%20%20%20%22-,suggestedWindow,-%22%3A%20%7B%0A%20%20%20%20%20%20%20%22start%22%3A%20%222021%2D0116:52:52
@sandro:supersandro.deSandro 🐧it allows the acme provider to give you a window where you should renew your cert because they want to go down to shorter lived certs16:53:16
@emilazy:matrix.orgemilyI promise I do not need ARI explaining to me. I was following the ARI work years ago16:53:18
@emilazy:matrix.orgemilythis isn't helpful, the discussion is about the interface lego is providing for it16:53:28
@sandro:supersandro.deSandro 🐧I just wanted to make sure we are all on the same page, didn't know that you already know everything16:54:12
@emilazy:matrix.orgemily this is the sticking point, it doesn't seem like a low --ari-wait-to-renew-duration will actually give you a normal "poll for renewal" interface 16:54:51
@emilazy:matrix.orgemilyit will just look at the recommended renewal and go "nope that's too long" and do it early16:55:01
@emilazy:matrix.orgemily(again, based on my quick reading of the Go that could be wrong)16:55:07
@emilazy:matrix.orgemilyso it seems like we need to let it block indefinitely, which is a total inversion of how our current module works, and we can't even conditionalize on whether certs are using ARI in the Nix code because that's downstream of server-side config16:55:37
@emilazy:matrix.orgemilymaybe we can just let it wait indefinitely and the timer will only fire once?16:55:52
@emilazy:matrix.orgemilythis is why ACME really wants a long-lived daemon :(16:56:07
@hexa:lossy.networkhexasorry, I don't follow your conclusion here16:56:37
@emilazy:matrix.orgemily ok, let's say ARI is enabled, the ACME server says "renew in 2 months", but you pass --ari-wait-to-renew-duration 5m 16:57:22
@hexa:lossy.networkhexahttps://github.com/go-acme/lego/blob/v4.22.2/certificate/renewal.go16:57:49
@emilazy:matrix.orgemilyoh hmm16:57:52
@hexa:lossy.networkhexabeyond my willingless to sleep16:57:52
@hexa:lossy.networkhexaso returns nil16:58:00
@emilazy:matrix.orgemily ok I think I misread ShouldRenewAt 16:58:01
@emilazy:matrix.orgemilyright16:58:08
@emilazy:matrix.orgemilyok, then I think we just set it to a time that will definitely not overlap with the next timer. 23h is too long because of our time skewing16:58:24
@emilazy:matrix.orgemilyI think theoretically you can end up with it running at 23:59 one day and 00:01 the next. not sure how it works exactly16:58:57
@emilazy:matrix.orgemilybut I guess systemd timers will never start twice at once?16:59:01
@hexa:lossy.networkhexa oh yeah, we do AccuracySecs=14400s 16:59:03
@hexa:lossy.networkhexagood call16:59:04
@emilazy:matrix.orgemily I'm not sure what Type= we have on the ACME services 16:59:08
@hexa:lossy.networkhexaoneshot16:59:18
@emilazy:matrix.orgemilyoneshots are only considered started after they complete, right?16:59:29
@emilazy:matrix.orgemilyso the timer can probably start two of them at once? which would be bad. we should probably not be using oneshot16:59:40

Show newer messages


Back to Room ListRoom Version: 6