[pbs-devel] [PATCH proxmox-backup v11 03/46] api: config: implement endpoints to manipulate and list s3 configs
Lukas Wagner
l.wagner at proxmox.com
Tue Jul 22 14:18:28 CEST 2025
On Tue Jul 22, 2025 at 12:10 PM CEST, Christian Ebner wrote:
> +
> +#[api(
> + input: {
> + properties: {
> + id: {
> + schema: JOB_ID_SCHEMA,
> + },
> + },
> + },
> + returns: { type: S3ClientConfig },
> + access: {
> + permission: &Permission::Privilege(&[], PRIV_SYS_AUDIT, false),
> + },
> +)]
> +/// Read an s3 client configuration.
> +pub fn read_s3_client_config(
> + id: String,
> + rpcenv: &mut dyn RpcEnvironment,
> +) -> Result<S3ClientConfig, Error> {
> + let (config, digest) = s3::config()?;
> + let s3_client_config: S3ClientConfig = config.lookup(S3_CFG_TYPE_ID, &id)?;
> + rpcenv["digest"] = hex::encode(digest).into();
> +
> + Ok(s3_client_config)
> +}
Hmm, maybe we should mask the secret_key in the response? Usually we
don't return any secrets from the API.
More information about the pbs-devel
mailing list