!MthpOIxqJhTgrMNxDS:nixos.org

NixOS ACME / LetsEncrypt

105 Members
Another day, another cert renewal45 Servers

Load older messages


SenderMessageTime
26 Dec 2021
@aanderse:nixos.devaandersethat happens on a timer so it's not a practical issue22:17:24
@m1cr0man:m1cr0man.comm1cr0manIf your config is based on master/your own PR, you should be able to tell if renew has worked based on the age of the cert your caddy server is giving out right?22:20:36
@aanderse:nixos.devaandersethat sounds right22:37:08
@hexa:lossy.networkhexaI use rfc2316 with my own authoritative server and by default lego waits a minute between each SAN22:42:48
@hexa:lossy.networkhexaif I reduce that time to ~10s it fails sometimes22:43:06
@hexa:lossy.networkhexawhich is worrying22:43:13
@hexa:lossy.networkhexalike … why wouldn't 10 seconds work for a dynamic dns update 😕22:43:22
@winterqt:nixos.devWinter (she/her)
In reply to @aanderse:nixos.dev
Winter: yes
i like my dns provider because they have an awesome feature set and are a good price
i do not like how it takes 30 minutes for my wildcard to renew 😑
what DNS provider if I may ask?
22:55:50
@aanderse:nixos.devaandersenamesilo23:03:50
@moritz.hedtke:matrix.orgmoritz.hedtke
In reply to @hexa:lossy.network
like … why wouldn't 10 seconds work for a dynamic dns update 😕
I could imagine because of the issues documented in https://letsencrypt.org/2020/02/19/multi-perspective-validation.html
23:58:53
@moritz.hedtke:matrix.orgmoritz.hedtkeIf I understood correctly what you mean23:59:04
27 Dec 2021
@moritz.hedtke:matrix.orgmoritz.hedtkewhen I think about it the reasoning doesn't make sense in that case00:00:05
@moritz.hedtke:matrix.orgmoritz.hedtkeTTL?00:00:19
@hexa:lossy.networkhexa moritz.hedtke: the record doesn't exist before the validation try 00:02:41
@hexa:lossy.networkhexaso negcache at worst00:02:57
@hexa:lossy.networkhexabut letsencrypt probably won't do caching here00:03:04
@moritz.hedtke:matrix.orgmoritz.hedtkeAnd you think the record is there before e.g letsencrypt starts querying? I'm not too familiar with acme using dns00:05:55
@hexa:lossy.networkhexasomething like that00:53:31
@hexa:lossy.networkhexaI haven't dug deeper00:53:34
@hexa:lossy.networkhexaMerged!16:38:09
@m1cr0man:m1cr0man.comm1cr0manThanks!16:59:15
@m1cr0man:m1cr0man.comm1cr0manhaha so many emails from the 8 closed tickets16:59:24
29 Dec 2021
@winterqt:nixos.devWinter (she/her) In https://github.com/NixOS/nixpkgs/blob/ac169ec6371f0d835542db654a65e0f2feb07838/nixos/modules/security/acme.nix#L417, it says that this makes it readable to the group specified by the cert service, but the perms for /var/lib/acme are 0750. Wouldn't the cert be inaccessible even by the group specified by the cert service, then? 03:03:55
@winterqt:nixos.devWinter (she/her)ah, I see https://github.com/NixOS/nixpkgs/blob/ac169ec6371f0d835542db654a65e0f2feb07838/nixos/modules/security/acme.nix#L294 now03:07:40
@winterqt:nixos.devWinter (she/her) So because of the fix permission service having its working directory set to /var/lib/acme, I guess acme:acme would be the owner of /var/lib/acme. 03:09:35
@winterqt:nixos.devWinter (she/her) But then wouldn't the permissions of 0750 would still disallow access to the cert specified groups? 03:10:19
@winterqt:nixos.devWinter (she/her) * But then wouldn't the permissions of 0750 still disallow access to the cert specified groups? 03:10:27
@winterqt:nixos.devWinter (she/her)
      # These StateDirectory entries negate the need for tmpfiles
      StateDirectory = [ "acme" "acme/.lego" "acme/.lego/accounts" ];
      StateDirectoryMode = 755;
      WorkingDirectory = "/var/lib/acme";

...ah.

03:16:37
@m1cr0man:m1cr0man.comm1cr0man yeah, we really went all-in on statedirectory/systemd activation logic for the folder creation. It ended up solving all previous permissions issues we were encountering, whilst also providing systemctl clean --what=state acme-mydomain.service for easy full renewals 13:22:39
@m1cr0man:m1cr0man.comm1cr0manThere's a bunch of really difficult to figure out logic wrt when directories need to be created, recreated or permissions changed which all depend on systemd service activation. Hence, it was best to leave it to systemd where possible13:30:20

Show newer messages


Back to Room ListRoom Version: 6