pub enum S3Credentials {
Static {
access_key_id: String,
secret_access_key: String,
session_token: Option<String>,
},
DefaultChain {
profile: Option<String>,
},
}Expand description
How S3Origin obtains AWS credentials.
Static carries the cleartext bytes — the wiring layer in decdn-node
is responsible for unwrapping decdn_common::config::secret::SecretString
before passing them here. By the time credentials reach the SDK they
are plain bytes either way (the SDK’s Credentials::new takes
&str/String).
The Debug impl is manual to preserve the redaction discipline
across the resolve→runtime boundary: Static’s key fields print as
"***" so a stray tracing::debug!(?creds) or panic-backtrace cannot
leak the credential bytes. DefaultChain’s profile is operator-set
configuration and prints in cleartext (no secret content).
Variants§
Static
Explicit IAM access key + secret + optional STS session token.
Fields
DefaultChain
Use the AWS default credential chain. Identical to aws-cli’s
discovery: AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY env vars,
then ~/.aws/credentials (selecting profile if set), then
container / instance role via IMDS.
Trait Implementations§
Source§impl Clone for S3Credentials
impl Clone for S3Credentials
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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