public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] config: check if acme domain with wildcard uses dns challenge
@ 2024-09-17  9:47 Gabriel Goller
  2024-09-17  9:47 ` [pbs-devel] [PATCH] schema: add regex for dns domains with wildcard Gabriel Goller
  2024-09-18  8:43 ` [pbs-devel] [PATCH proxmox-backup] config: check if acme domain with wildcard uses dns challenge Christian Ebner
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriel Goller @ 2024-09-17  9:47 UTC (permalink / raw)
  To: pbs-devel

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 <g.goller@proxmox.com>
---
 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",
+                    domain.domain
+                );
+            }
         }
         let mut dummy_acceptor = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).unwrap();
         if let Some(ciphers) = self.ciphers_tls_1_3.as_deref() {
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-18 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-17  9:47 [pbs-devel] [PATCH proxmox-backup] config: check if acme domain with wildcard uses dns challenge Gabriel Goller
2024-09-17  9:47 ` [pbs-devel] [PATCH] schema: add regex for dns domains with wildcard Gabriel Goller
2024-09-18  8:43 ` [pbs-devel] [PATCH proxmox-backup] config: check if acme domain with wildcard uses dns challenge Christian Ebner
2024-09-18  9:19   ` Christian Ebner
2024-09-18 12:03   ` Gabriel Goller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal