[pbs-devel] [PATCH proxmox v5 4/4] acme-api: add helper to load client for an account

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jan 13 14:45:01 CET 2026


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 <s.rufinatscha at proxmox.com>
> ---
>  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<String>) ->
>  
>      Ok(())
>  }
> +
> +pub async fn load_client_with_account(account_name: &AcmeAccountName) -> Result<AcmeClient, Error> {
> +    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 at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 
> 




More information about the pbs-devel mailing list