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 8EFCF1FF13B for ; Tue, 13 Jan 2026 14:45:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BAF5818395; Tue, 13 Jan 2026 14:45:09 +0100 (CET) Date: Tue, 13 Jan 2026 14:45:01 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20260108112629.189670-1-s.rufinatscha@proxmox.com> <20260108112629.189670-5-s.rufinatscha@proxmox.com> In-Reply-To: <20260108112629.189670-5-s.rufinatscha@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1768310749.bj2z7ms8cd.astroid@yuna.none> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1768311860274 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.046 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lib.rs, proxmox.com] Subject: Re: [pbs-devel] [PATCH proxmox v5 4/4] acme-api: add helper to load client for an account 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" On January 8, 2026 12:26 pm, Samuel Rufinatscha wrote: > The PBS ACME refactoring needs a simple way to obtain an AcmeClient for > a given configured account without duplicating config wiring. This patch > adds a load_client_with_account helper in proxmox-acme-api that loads > the account and constructs a matching client, similarly as PBS previous > own AcmeClient::load() function. > > Signed-off-by: Samuel Rufinatscha > --- > proxmox-acme-api/src/account_api_impl.rs | 5 +++++ > proxmox-acme-api/src/lib.rs | 3 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/proxmox-acme-api/src/account_api_impl.rs b/proxmox-acme-api/src/account_api_impl.rs > index ef195908..ca8c8655 100644 > --- a/proxmox-acme-api/src/account_api_impl.rs > +++ b/proxmox-acme-api/src/account_api_impl.rs > @@ -116,3 +116,8 @@ pub async fn update_account(name: &AcmeAccountName, contact: Option) -> > > Ok(()) > } > + > +pub async fn load_client_with_account(account_name: &AcmeAccountName) -> Result { > + let account_data = super::account_config::load_account_config(&account_name).await?; > + Ok(account_data.client()) > +} I don't think this is needed - there is only a single callsite in PBS and that is itself dead code that can be removed.. > diff --git a/proxmox-acme-api/src/lib.rs b/proxmox-acme-api/src/lib.rs > index 623e9e23..96f88ae2 100644 > --- a/proxmox-acme-api/src/lib.rs > +++ b/proxmox-acme-api/src/lib.rs > @@ -31,7 +31,8 @@ mod plugin_config; > mod account_api_impl; > #[cfg(feature = "impl")] > pub use account_api_impl::{ > - deactivate_account, get_account, get_tos, list_accounts, register_account, update_account, > + deactivate_account, get_account, get_tos, list_accounts, load_client_with_account, > + register_account, update_account, > }; > > #[cfg(feature = "impl")] > -- > 2.47.3 > > > > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel > > > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel