pub struct StsTempCredential {
pub access_key_id: String,
pub secret_access_key: String,
pub session_token: String,
pub principal_arn: String,
pub user_id: String,
pub account_id: String,
pub expiration: DateTime<Utc>,
pub session_policies: Vec<String>,
pub mfa_present: bool,
pub issued_at: DateTime<Utc>,
pub federated_provider: Option<String>,
}Expand description
A temporary credential issued by STS (AssumeRole, AssumeRoleWithWebIdentity,
AssumeRoleWithSAML, GetSessionToken, GetFederationToken).
Unlike CredentialIdentity, which only remembers the principal ARN for
GetCallerIdentity, this struct also retains the secret access key and
session token so that SigV4 verification and IAM enforcement (added in
later batches) can look them up when a client signs a request with
temporary credentials. expiration is the absolute wall-clock time at
which the credential becomes invalid.
Fields§
§access_key_id: String§secret_access_key: String§session_token: String§principal_arn: String§user_id: String§account_id: String§expiration: DateTime<Utc>§session_policies: Vec<String>Session policies passed to the STS call that minted this credential.
Raw JSON policy documents. The Policy parameter contributes one
entry; PolicyArns contribute additional entries (resolved to
documents at mint time). Empty when the STS call carried no
session policies.
mfa_present: boolTrue iff the AssumeRole / GetSessionToken call that minted this
credential supplied MFA (SerialNumber + TokenCode). Surfaces
to downstream IAM evaluation as aws:MultiFactorAuthPresent.
issued_at: DateTime<Utc>Wall-clock time at which the credential was issued. Surfaces to
downstream IAM evaluation as aws:TokenIssueTime and feeds
aws:MultiFactorAuthAge (computed at evaluation time as
now - issued_at in seconds when MFA was asserted).
federated_provider: Option<String>aws:FederatedProvider — for AssumeRoleWithSAML this is the
SAML provider ARN; for AssumeRoleWithWebIdentity it is the OIDC
provider ARN (or a friendly host name like
cognito-identity.amazonaws.com); None for plain AssumeRole /
GetSessionToken / GetFederationToken.
Trait Implementations§
Source§impl Clone for StsTempCredential
impl Clone for StsTempCredential
Source§fn clone(&self) -> StsTempCredential
fn clone(&self) -> StsTempCredential
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more