From 9758aeda5d0b6fda3e1a07ddc0b992a29e340be4 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 23 Oct 2024 20:18:57 +0200 Subject: [PATCH] garage: fix wildcard DNS cert renewal with wildcard CNAME records By usind wildcard CNAME records, we make lego think it needs to validate challenges using these CNAME records. We actually want regular _acme-challenge.* records, so use a environment variable to avoid CNAME detection. This fixes DNS cert renewal. Still curious? See: https://letsencrypt.org/2019/10/09/onboarding-your-customers-with-lets-encrypt-and-acme/ --- modules/garage/default.nix | 4 +- secrets/acme-namecheap-env.age | 89 +++++++++++++++++----------------- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/modules/garage/default.nix b/modules/garage/default.nix index 9f3dec4..68b9bca 100644 --- a/modules/garage/default.nix +++ b/modules/garage/default.nix @@ -31,6 +31,8 @@ security.acme = { defaults = { + # LEGO_DISABLE_CNAME_SUPPORT=true set here to fix issues with CNAME + # detection, as we use wildcard DNS for garage environmentFile = config.age.secrets.acme-namecheap-env.path; }; certs = { @@ -40,7 +42,6 @@ webroot = null; # enable dns challenge dnsProvider = "namecheap"; - dnsPropagationCheck = false; }; # Wildcard certificate gets created automatically "web.${config.pub-solar-os.networking.domain}" = { @@ -48,7 +49,6 @@ webroot = null; # enable dns challenge dnsProvider = "namecheap"; - dnsPropagationCheck = false; }; }; }; diff --git a/secrets/acme-namecheap-env.age b/secrets/acme-namecheap-env.age index 4a90b58..684c30f 100644 --- a/secrets/acme-namecheap-env.age +++ b/secrets/acme-namecheap-env.age @@ -1,47 +1,48 @@ age-encryption.org/v1 --> ssh-ed25519 NID4eA ST5vuBY34mBdhLIkNLqaIOY9Bbp34OcNCm5t39OpR1U -abFLT6kV7/nX/wSV+V/2GSCa2vOuZgCnn5edh5ixNxg --> ssh-ed25519 9RQHxg AXA6PsHeeFJh55sX5uO+HVshRlRzNxvSIGCpPChorUA -30i8zc2wjovEn0LLh8YzUupRGeQQqeMf6Mhkx2t5xhk --> ssh-ed25519 eP5MMw ZXLt8+m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SdZjoNEhn6VYjVg9WUOU7Flntx0+lF4AY/kQ --> ssh-ed25519 +3V2lQ Pjkt+aKYUa9w4qELEpYc6bm2EfBPf0HhmHAXAfix3wA -zL+wczUJ632M+9PSEWTLc0UikNL1QSFyjuaKqvY8NQo ---- +CyD1ByF5fDQgtfi7NfiASk8ldY8LOJE/nOUe/JnSFE -^QlH2(B ^qa;Y[bIۡc7[YiMԑ٫)qa,Rcr^Len~w piv-p256 vRzPNw A2dcPImS0ih5CjePQP5oPrPfwns6zAMP0J72P7fyzD/A +p46umKyZjbc1MjOQGnJIRu6V99O+/PmVXQvryX/9XW4 +-> piv-p256 zqq/iw A5nBHU2O+bxsFqplf2GV6pK5wQ+hJ9l7tyFIe57QVKzw +Ik6aUY3t4geZ3yiWPqBGlBem9xNU83x7t3UA7pYB55I +-> ssh-ed25519 YFSOsg OhynWXlurzqU3ohq1ecH018Ja4wyWazDLv6isajeBUE +Xnjo8yS9IkMwCGNeLi6BABYxjXDLbpuTrVfwAxjDWdQ +-> ssh-ed25519 iHV63A 5CVIOtSwima5gIvwoAYExcy1tfOo8942RQ+SsflPbAM +4HV21GcuyddIjonOZZFgjgpR5smjce7OlMN3DCy0/sU +-> ssh-ed25519 BVsyTA mkLu2Vpr16bAZWimh6sViq5HlB1+lNOc2WPCxzgfqAg +cIDgWit139jipd7XmZcT8mTRDKK8rJV9xIxIaPVL9pM +-> ssh-ed25519 +3V2lQ eqfktAyV2Pia7T7XEfcYiHN9Jd4zivMzJk3in4XOTx0 +gZzO+MTyBOJR1EgGn4Mhh4rnIyr3N9gmlFty83ou+GU +--- yJrzTzStOkRCNRu3Y+knfqTqHrwW0S0Bsko7oG/s86o +,BgmfT`1&1%7Q(:? +jO_rqwiOD)@0ZK'+apU<`ct. XN+h='Vn^HHv5aanKDי \ No newline at end of file -- 2.44.2