public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v5 2/5] acme: include proxmox-acme-api dependency
Date: Tue, 13 Jan 2026 14:45:40 +0100	[thread overview]
Message-ID: <1768309161.9y1q4pzth1.astroid@yuna.none> (raw)
In-Reply-To: <20260108112629.189670-7-s.rufinatscha@proxmox.com>

On January 8, 2026 12:26 pm, Samuel Rufinatscha wrote:
> 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.

this doesn't need to be in nearly every commit here.

adding the dependency and initializing things without using them also
has no stand-alone value, so this doesn't need to be its own commit.

we could have two commits:
- add proxmox-acme-api and use it for client and API
- remove src/acme since it is now unused

or three or more if you want to split out some of the API replacement where
there isn't a 1:1 relation between old and new code..

> 
> 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 <s.rufinatscha@proxmox.com>
> ---
>  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
> 
> 
> 


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


  reply	other threads:[~2026-01-13 13:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 11:26 [pbs-devel] [PATCH proxmox{, -backup} v5 0/9] fix #6939: acme: support servers returning 204 for nonce requests Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 1/4] acme: reduce visibility of Request type Samuel Rufinatscha
2026-01-13 13:46   ` Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 2/4] acme: introduce http_status module Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 3/4] fix #6939: acme: support servers returning 204 for nonce requests Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 4/4] acme-api: add helper to load client for an account Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 1/5] acme: clean up ACME-related imports Samuel Rufinatscha
2026-01-13 13:45   ` [pbs-devel] applied: " Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 2/5] acme: include proxmox-acme-api dependency Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler [this message]
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 3/5] acme: drop local AcmeClient Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 4/5] acme: change API impls to use proxmox-acme-api handlers Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 5/5] acme: certificate ordering through proxmox-acme-api Samuel Rufinatscha
2026-01-13 13:45   ` Fabian Grünbichler
2026-01-13 13:48 ` [pbs-devel] [PATCH proxmox{, -backup} v5 0/9] fix #6939: acme: support servers returning 204 for nonce requests Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1768309161.9y1q4pzth1.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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