[pbs-devel] [PATCH proxmox-backup v11 03/46] api: config: implement endpoints to manipulate and list s3 configs
Christian Ebner
c.ebner at proxmox.com
Tue Jul 22 14:32:20 CEST 2025
On 7/22/25 2:18 PM, Lukas Wagner wrote:
> 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.
Oh, right, will have a look how we handle this normally, e.g. for the
remotes.
More information about the pbs-devel
mailing list