From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 924531FF13D for ; Thu, 08 Jan 2026 12:27:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E043C21BFD; Thu, 8 Jan 2026 12:27:11 +0100 (CET) From: Samuel Rufinatscha To: pbs-devel@lists.proxmox.com Date: Thu, 8 Jan 2026 12:26:26 +0100 Message-ID: <20260108112629.189670-7-s.rufinatscha@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260108112629.189670-1-s.rufinatscha@proxmox.com> References: <20260108112629.189670-1-s.rufinatscha@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1767871558691 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.232 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup v5 2/5] acme: include proxmox-acme-api dependency 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" PBS currently uses its own ACME client and API logic, while PDM uses the factored out proxmox-acme and proxmox-acme-api crates. This duplication risks differences in behaviour and requires ACME maintenance in two places. This patch is part of a series to move PBS over to the shared ACME stack. Changes: - Add proxmox-acme-api with the "impl" feature as a dependency. - Initialize proxmox_acme_api in proxmox-backup- api, manager and proxy. * Inits PBS config dir /acme as proxmox ACME directory Signed-off-by: Samuel Rufinatscha --- Cargo.toml | 3 +++ src/bin/proxmox-backup-api.rs | 2 ++ src/bin/proxmox-backup-manager.rs | 2 ++ src/bin/proxmox-backup-proxy.rs | 1 + 4 files changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 1aa57ae5..feae351d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,6 +101,7 @@ pbs-api-types = "1.0.8" # other proxmox crates pathpatterns = "1" proxmox-acme = "1" +proxmox-acme-api = { version = "1", features = [ "impl" ] } pxar = "1" # PBS workspace @@ -251,6 +252,7 @@ pbs-api-types.workspace = true # in their respective repo proxmox-acme.workspace = true +proxmox-acme-api.workspace = true pxar.workspace = true # proxmox-backup workspace/internal crates @@ -269,6 +271,7 @@ proxmox-rrd-api-types.workspace = true [patch.crates-io] #pbs-api-types = { path = "../proxmox/pbs-api-types" } #proxmox-acme = { path = "../proxmox/proxmox-acme" } +#proxmox-acme-api = { path = "../proxmox/proxmox-acme-api" } #proxmox-api-macro = { path = "../proxmox/proxmox-api-macro" } #proxmox-apt = { path = "../proxmox/proxmox-apt" } #proxmox-apt-api-types = { path = "../proxmox/proxmox-apt-api-types" } diff --git a/src/bin/proxmox-backup-api.rs b/src/bin/proxmox-backup-api.rs index 417e9e97..d0091dca 100644 --- a/src/bin/proxmox-backup-api.rs +++ b/src/bin/proxmox-backup-api.rs @@ -14,6 +14,7 @@ use proxmox_rest_server::{ApiConfig, RestServer}; use proxmox_router::RpcEnvironmentType; use proxmox_sys::fs::CreateOptions; +use pbs_buildcfg::configdir; use proxmox_backup::auth_helpers::*; use proxmox_backup::config; use proxmox_backup::server::auth::check_pbs_auth; @@ -78,6 +79,7 @@ async fn run() -> Result<(), Error> { let mut command_sock = proxmox_daemon::command_socket::CommandSocket::new(backup_user.gid); proxmox_product_config::init(backup_user.clone(), pbs_config::priv_user()?); + proxmox_acme_api::init(configdir!("/acme"), true)?; let dir_opts = CreateOptions::new() .owner(backup_user.uid) diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index f8365070..30bc8da9 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -19,6 +19,7 @@ use proxmox_router::{cli::*, RpcEnvironment}; use proxmox_schema::api; use proxmox_sys::fs::CreateOptions; +use pbs_buildcfg::configdir; use pbs_client::{display_task_log, view_task_result}; use pbs_config::sync; use pbs_tools::json::required_string_param; @@ -667,6 +668,7 @@ async fn run() -> Result<(), Error> { .init()?; proxmox_backup::server::notifications::init()?; proxmox_product_config::init(pbs_config::backup_user()?, pbs_config::priv_user()?); + proxmox_acme_api::init(configdir!("/acme"), false)?; let cmd_def = CliCommandMap::new() .insert("acl", acl_commands()) diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs index 870208fe..eea44a7d 100644 --- a/src/bin/proxmox-backup-proxy.rs +++ b/src/bin/proxmox-backup-proxy.rs @@ -188,6 +188,7 @@ async fn run() -> Result<(), Error> { proxmox_backup::server::notifications::init()?; metric_collection::init()?; proxmox_product_config::init(pbs_config::backup_user()?, pbs_config::priv_user()?); + proxmox_acme_api::init(configdir!("/acme"), false)?; let mut indexpath = PathBuf::from(pbs_buildcfg::JS_DIR); indexpath.push("index.hbs"); -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel