!MthpOIxqJhTgrMNxDS:nixos.org

NixOS ACME / LetsEncrypt

93 Members
Another day, another cert renewal43 Servers

Load older messages


SenderMessageTime
13 Jun 2023
@m1cr0man:m1cr0man.comm1cr0manat what point do I just right NixCerts-rs20:26:15
@m1cr0man:m1cr0man.comm1cr0man * at what point do I just write NixCerts-rs20:26:19
@emilazy:matrix.orgemilywe are constantly trying to piece together what would be pretty simple logic for a long-running daemon out of paperclips and tape20:26:31
@emilazy:matrix.orgemilyheh, I don't envy anyone trying to implement ACME from scratch20:26:51
@m1cr0man:m1cr0man.comm1cr0man... maybe we need an RFC, to propose a new solution for acme20:27:00
@emilazy:matrix.orgemilysomething with certmagic would probably be pretty easy to do20:27:11
@emilazy:matrix.orgemily(but we can't just switch over to caddy without breakage because of all the lego-specific config we expose...)20:27:30
@m1cr0man:m1cr0man.comm1cr0manyeah, sadly20:27:38
@m1cr0man:m1cr0man.comm1cr0man it would be a major breaking change and people hate remembering how they set their certs up (me included) 20:28:04
@m1cr0man:m1cr0man.comm1cr0manwhat would we need in lego to make this better? daemonising is out of the question, but there's a lot of logic in the renew script right now that could probably go into lego. In my own head, I had some sort of logic for offline renewal check on my list of things to try and contribute that would greatly reduce the complexity on our side today.20:29:09
@emilazy:matrix.orgemilyI suspect the majority of people don't have any of the special lego options set. but the biggest breakage would be DNS challenge setups, esp. in terms of provider availability.20:29:15
@m1cr0man:m1cr0man.comm1cr0man
In reply to @emilazy:matrix.org
I suspect the majority of people don't have any of the special lego options set. but the biggest breakage would be DNS challenge setups, esp. in terms of provider availability.
yeah lego is pretty much unmatched for DNS support
20:29:33
@emilazy:matrix.orgemilyCaddy/certmagic/etc. do actually have a backwards compatibility layer for lego's providers20:29:34
@m1cr0man:m1cr0man.comm1cr0manoh?20:29:43
@emilazy:matrix.orgemilyand probably the most first party DNS providers outside of lego too (https://github.com/libdns)20:29:51
@m1cr0man:m1cr0man.comm1cr0manoh. wow20:30:34
@emilazy:matrix.orgemilyhttps://github.com/caddy-dns/lego-deprecated is the shim20:31:07
@arianvp:matrix.orgArianI think cert-manager comes close. But it requires Kubernetes 20:34:12
@arianvp:matrix.orgArianIt does all the queueing and concurrency stuff 20:34:49
@m1cr0man:m1cr0man.comm1cr0manugh jeez20:37:19
@emilazy:matrix.orgemilyI think Caddy would be an easier sell than Kubernetes at least :P20:40:27
@emilazy:matrix.orgemily(but also I don't think we should rush into any major change; we've had this setup - which is janky in many ways because of lego's insufficiencies but works fine in most cases and is much better than the old simp_le one - for years, we can afford to stew on what we actually want to do and how much it would improve things for us. I'm personally sick of lego but maybe we can make it work and even if we can't it will pay to do a lot of assessment and testing of any potential replacement before making any moves. the worst thing we can do is tell people we're making things better with some one-time transition pain and then we just get a new set of problems or even end up migrating again.)20:45:23
@emilazy:matrix.orgemily(in terms of "ACME quality of implementation and best operational practices" I think Caddy has very few competitors and would solve a lot of our problems; we can start up a single long-running daemon and get rid of basically all our gross shell logic. but it's not all sunshine and roses; for one thing, using DNS providers would require us to have a story for Caddy modules (though we could probably just build a mega-ACME-Caddy with all the first-party providers out of the box), and also you can certainly do better in terms of hardening (Go is memory safe, but AFAIK there's no privilege separation going on: it's possible that exploits could leak private key material through confused deputy or Go runtime exploits))20:48:06
@m1cr0man:m1cr0man.comm1cr0man

Yeah, I fully agree, and I'm in no rush too. If we make a migration again, it has to be done with a lot of research + evaluation.

Wrt caddy modules, that seems easy enough to solve through the same system we have right now for lego where user specifies dnsProvider and then, like the filesystems options, we can introduce the appropriate modules as necessary. Do they have to be compiled in or are they dynamically loaded?

20:49:32
@k900:0upti.meK900 changed their display name from K900 to K900 (Old).20:50:10
@m1cr0man:m1cr0man.comm1cr0manOh also as for my stance on lego... I don't totally hate it, I mean it works for small and medium scale deployments, but I do agree that there could be a better solution out there that is simpler for us to implement. I'm just not convinced it's worth passing the pain to the module users yet.20:50:54
@emilazy:matrix.orgemilythey are compiled in and it runs into Go module hash issues :P we have an open issue in nixpkgs for making that nicer for web server cases but I think it's basically going to come down to "call some derivation, pass in the modules you need, fill in a hash". obviously we can't provide an upstream hash for every combination of DNS providers people could use so in that case we should probably just provide a prebuilt package that bundles them all.20:53:29
@m1cr0man:m1cr0man.comm1cr0manoh I see right20:53:55
@emilazy:matrix.orgemily (it's literally just "they have a tool that fills out a Go file with all the package imports you list and a main that just calls into Caddy's main and compiles and runs that", so you can also just supply your own main.go) 20:54:01
@emilazy:matrix.orgemilyI do think that if we do any migration we should have a structured interface for DNS providers and name the escape hatch for unsupported ones something like customDnsProviderSettingsThisWillBreakHereBeDragonsNoWarranty :V20:55:05

Show newer messages


Back to Room ListRoom Version: 6