pub struct ResolvedCredential {
pub secret_access_key: String,
pub session_token: Option<String>,
pub principal: Principal,
pub session_policies: Vec<String>,
pub mfa_present: bool,
pub token_issued_at: Option<DateTime<Utc>>,
pub federated_provider: Option<String>,
}Expand description
Credentials resolved from an access key ID.
Returned by CredentialResolver::resolve. Holds both the secret access
key (needed for SigV4 verification) and the resolved Principal
(needed for IAM enforcement and GetCallerIdentity consolidation).
Fields§
§secret_access_key: String§session_token: Option<String>§principal: Principal§session_policies: Vec<String>Session policies passed to the STS call that minted this credential. Empty for IAM user access keys.
mfa_present: boolTrue iff the underlying STS credential was minted with MFA. Drives
aws:MultiFactorAuthPresent for downstream IAM evaluation. Always
false for raw IAM user access keys.
token_issued_at: Option<DateTime<Utc>>Wall-clock time at which the underlying STS credential was issued.
Drives aws:TokenIssueTime and aws:MultiFactorAuthAge (the latter
computed at evaluation time as now - token_issued_at when
Self::mfa_present is true). None for raw IAM user access keys
— AWS does not expose aws:TokenIssueTime for long-lived credentials.
federated_provider: Option<String>aws:FederatedProvider — SAML provider ARN for AssumeRoleWithSAML,
OIDC provider ARN for AssumeRoleWithWebIdentity. None for raw IAM
user keys, plain AssumeRole, GetSessionToken, GetFederationToken.
Implementations§
Source§impl ResolvedCredential
impl ResolvedCredential
Sourcepub fn principal_arn(&self) -> &str
pub fn principal_arn(&self) -> &str
Convenience accessors for the flat fields batch 3 callers use. Kept
as methods rather than re-adding the fields to avoid making the
shape inconsistent with Principal itself.
pub fn user_id(&self) -> &str
pub fn account_id(&self) -> &str
Trait Implementations§
Source§impl Clone for ResolvedCredential
impl Clone for ResolvedCredential
Source§fn clone(&self) -> ResolvedCredential
fn clone(&self) -> ResolvedCredential
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedCredential
impl Debug for ResolvedCredential
impl Eq for ResolvedCredential
Source§impl PartialEq for ResolvedCredential
impl PartialEq for ResolvedCredential
Source§fn eq(&self, other: &ResolvedCredential) -> bool
fn eq(&self, other: &ResolvedCredential) -> bool
self and other values to be equal, and is used by ==.