!MthpOIxqJhTgrMNxDS:nixos.org

NixOS ACME / LetsEncrypt

104 Members
Another day, another cert renewal44 Servers

Load older messages


SenderMessageTime
19 Feb 2025
@hexa:lossy.networkhexamax cert duration16:46:04
@hexa:lossy.networkhexa* max remaining cert duration16:46:07
@hexa:lossy.networkhexaARI is a way to skip the age check on the cert16:46:22
@hexa:lossy.networkhexawhen ARI then renew, else normal proceedings16:46:39
@emilazy:matrix.orgemily

are you sure?

--ari-wait-to-renew-duration value        The maximum duration you're willing to sleep for a renewal time returned by the renewalInfo endpoint.
16:46:23
@emilazy:matrix.orgemilyseems like not that16:46:24
@emilazy:matrix.orgemilyI do know how ARI works :)16:46:32
@hexa:lossy.networkhexaI'm telling you that from the code that I glanced at16:46:57
@sandro:supersandro.deSandro 🐧AFAIK it is the time lego is allowed to sleep for the time to be16:47:41
@sandro:supersandro.deSandro 🐧so if we set it to 23h, it could block execution for up to 23h16:48:24
@hexa:lossy.networkhexawdym block16:48:35
@hexa:lossy.networkhexayou can always just restart and get a new renewalinfo 😄 16:48:45
@hexa:lossy.networkhexahttps://github.com/go-acme/lego/blob/v4.22.2/certificate/renewal.go16:49:08
@emilazy:matrix.orgemilyok, here's what I don't understand. why do we need it to sleep at all? it could check ARI and then just say "nope" if it isn't time yet. at most we drift across the recommended renewal by ~a day16:49:10
@hexa:lossy.networkhexaI think that would probably be fine16:49:37
@emilazy:matrix.orgemilyI don't think that's optimal – the timer-based setup is bad – but it seems to be what fits best with the existing module structure16:49:38
@sandro:supersandro.deSandro 🐧https://github.com/go-acme/lego/blob/v4.22.2/cmd/cmd_renew.go#L17616:49:50
@hexa:lossy.networkhexaI think we don't know what probable renewal intervals sent via renewalinfo would be16:49:51
@sandro:supersandro.deSandro 🐧they literally call time.Sleep 16:50:05
@hexa:lossy.networkhexasandro, please check the backlog16:50:16
@hexa:lossy.networkhexaso really, beyond a day this is just an optimization16:50:45
@emilazy:matrix.orgemily looking at cmd_renew.go it actually seems like it will force renewal if you set --ari-wait-to-renew-duration 1s and ARI says you should wait a month? 16:50:59
@emilazy:matrix.orgemily
	if ariRenewalTime == nil && !needRenewal(cert, domain, ctx.Int(flgDays)) &&
		(!forceDomains || slices.Equal(certDomains, domains)) {
		return nil
	}
16:51:08
@hexa:lossy.networkhexabut there is no harm in letting the acme client sleep and wait between timer runs16:51:14
@emilazy:matrix.orgemilythe "do nothing if renewal isn't required" is conditionalized on not processing ARI16:51:17
@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

Show newer messages


Back to Room ListRoom Version: 6