pub enum S3Credentials {
Static {
access_key_id: SecretString,
secret_access_key: SecretString,
session_token: Option<SecretString>,
},
DefaultChain {
profile: Option<String>,
},
}Expand description
S3 credential source (#437). Tagged on the inner source field.
Static credential fields use SecretString so an incidental
tracing::debug!(?cfg) or panic backtrace cannot leak the
material — the wrapper redacts itself in Debug output, and
its Serialize impl emits a non-reversible hashed placeholder
rather than the cleartext, so any incidental serialization of the
config is redacted too (see SecretString for the full
contract). The codebase already redacts HTTP-origin URL credentials
(see decdn_config_types::redact_for_log); this is the same pattern
for TOML-borne secrets.
[cache.origin.credentials]
source = "static"
access_key_id = "AKIA..."
secret_access_key = "..."
# session_token = "..." # optional
# — or —
[cache.origin.credentials]
source = "default-chain"
# profile = "my-profile" # optional, override default profileVariants§
Static
Static IAM credentials embedded in the config file. Common for R2/B2/MinIO operator deployments where simple key-pair audit is preferred; for AWS S3, prefer the default credential chain so credentials live outside the TOML.
Fields
access_key_id: SecretStringAWS access key ID. Stored in SecretString so it
redacts in Debug output alongside the secret key.
secret_access_key: SecretStringAWS secret access key. Redacted in Debug output.
session_token: Option<SecretString>Optional STS session token (for assume-role / SSO flows where a static key isn’t enough on its own). Redacted.
DefaultChain
Use the standard AWS credential chain: AWS_ACCESS_KEY_ID /
AWS_SECRET_ACCESS_KEY env vars, then ~/.aws/credentials
profile, then IAM role / instance profile.
Trait Implementations§
Source§impl Clone for S3Credentials
impl Clone for S3Credentials
Source§impl Debug for S3Credentials
impl Debug for S3Credentials
Source§impl<'de> Deserialize<'de> for S3Credentials
impl<'de> Deserialize<'de> for S3Credentials
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for S3Credentials
impl RefUnwindSafe for S3Credentials
impl Send for S3Credentials
impl Sync for S3Credentials
impl Unpin for S3Credentials
impl UnsafeUnpin for S3Credentials
impl UnwindSafe for S3Credentials
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more