From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 76E751FF15C for ; Wed, 18 Sep 2024 14:04:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D136A347D9; Wed, 18 Sep 2024 14:04:11 +0200 (CEST) Date: Wed, 18 Sep 2024 14:03:36 +0200 From: Gabriel Goller To: Christian Ebner Message-ID: <20240918120336.wchzxw2fjkobh7wu@luna.proxmox.com> References: <20240917094704.168668-1-g.goller@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup] config: check if acme domain with wildcard uses dns challenge X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Cc: Proxmox Backup Server development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" On 18.09.2024 10:43, Christian Ebner wrote: >Tried to generate a wildcard certificate using the cloudflare DNS >plugin with these patches applied. > >Unfortunately this fails with an error (domain obfuscated, but its the >domain without the "*." prefix): >``` >TASK ERROR: no config for domain 'mydomain' >``` > >So it seem there still is an issue when retrieving the domain from the >config here: >https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=src/api2/node/certificates.rs;h=61ef910e47a71a005064d2b1e99d3d97b0d43f51;hb=HEAD#l342 yep, noticed this as well, will hopefully be fixed in the next version! >Also, nit inline. > >On 9/17/24 11:47, Gabriel Goller wrote: >>As already mentioned in our docs [0], wildcard domains are only >>supported when the dns-challenge is used. If the dns-challenge is not >>used, throw an error. >> >>[0]: https://pbs.proxmox.com/docs/sysadmin.html#wildcard-certificates >> >>Signed-off-by: Gabriel Goller >>--- >> src/config/node.rs | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >>diff --git a/src/config/node.rs b/src/config/node.rs >>index 937beb3a125c..80a503635344 100644 >>--- a/src/config/node.rs >>+++ b/src/config/node.rs >>@@ -272,6 +272,16 @@ impl NodeConfig { >> if !domains.insert(domain.domain.to_lowercase()) { >> bail!("duplicate domain '{}' in ACME config", domain.domain); >> } >>+ if domain.domain.contains('*') >>+ && domain.plugin.map_or(true, |value| { >>+ value.as_str() == "" || value.as_str() == "standalone" >>+ }) >>+ { >>+ bail!( >>+ "wildcard domains like '{}' are only usable with the DNS challenge type", > >nit: Above checks for standalone HTTP challenge, so instead of stating >that the wildcard is only usable with DNS challenges, I think it would >be better to state that it is not usable with the HTTP challenge >instead. Agree. Thanks for the review! Will send a v2 soon! _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel