pub struct IamState {Show 34 fields
pub account_id: String,
pub users: BTreeMap<String, IamUser>,
pub access_keys: BTreeMap<String, Vec<IamAccessKey>>,
pub roles: BTreeMap<String, IamRole>,
pub policies: BTreeMap<String, IamPolicy>,
pub role_policies: BTreeMap<String, Vec<String>>,
pub role_inline_policies: BTreeMap<String, BTreeMap<String, String>>,
pub user_policies: BTreeMap<String, Vec<String>>,
pub user_inline_policies: BTreeMap<String, BTreeMap<String, String>>,
pub groups: BTreeMap<String, IamGroup>,
pub instance_profiles: BTreeMap<String, IamInstanceProfile>,
pub login_profiles: BTreeMap<String, LoginProfile>,
pub saml_providers: BTreeMap<String, SamlProvider>,
pub oidc_providers: BTreeMap<String, OidcProvider>,
pub server_certificates: BTreeMap<String, ServerCertificate>,
pub signing_certificates: BTreeMap<String, Vec<SigningCertificate>>,
pub account_aliases: Vec<String>,
pub account_password_policy: Option<AccountPasswordPolicy>,
pub virtual_mfa_devices: BTreeMap<String, VirtualMfaDevice>,
pub service_linked_role_deletions: BTreeMap<String, ServiceLinkedRoleDeletion>,
pub credential_identities: BTreeMap<String, CredentialIdentity>,
pub sts_temp_credentials: BTreeMap<String, StsTempCredential>,
pub credential_report_generated: bool,
pub ssh_public_keys: BTreeMap<String, Vec<SshPublicKey>>,
pub access_key_last_used: BTreeMap<String, AccessKeyLastUsed>,
pub service_specific_credentials: BTreeMap<String, Vec<ServiceSpecificCredential>>,
pub extra_tags: BTreeMap<String, Vec<(String, String)>>,
pub organizations_root_credentials_management: bool,
pub organizations_root_sessions: bool,
pub service_last_accessed_jobs: BTreeMap<String, ServiceLastAccessedJob>,
pub organizations_access_reports: BTreeMap<String, OrganizationsAccessReport>,
pub global_endpoint_token_version: Option<String>,
pub delegation_requests: BTreeMap<String, DelegationRequest>,
pub outbound_web_identity_federation_enabled: bool,
}Fields§
§account_id: String§users: BTreeMap<String, IamUser>§access_keys: BTreeMap<String, Vec<IamAccessKey>>§roles: BTreeMap<String, IamRole>§policies: BTreeMap<String, IamPolicy>§role_policies: BTreeMap<String, Vec<String>>§role_inline_policies: BTreeMap<String, BTreeMap<String, String>>§user_policies: BTreeMap<String, Vec<String>>§user_inline_policies: BTreeMap<String, BTreeMap<String, String>>§groups: BTreeMap<String, IamGroup>§instance_profiles: BTreeMap<String, IamInstanceProfile>§login_profiles: BTreeMap<String, LoginProfile>§saml_providers: BTreeMap<String, SamlProvider>§oidc_providers: BTreeMap<String, OidcProvider>§server_certificates: BTreeMap<String, ServerCertificate>§signing_certificates: BTreeMap<String, Vec<SigningCertificate>>§account_aliases: Vec<String>§account_password_policy: Option<AccountPasswordPolicy>§virtual_mfa_devices: BTreeMap<String, VirtualMfaDevice>§service_linked_role_deletions: BTreeMap<String, ServiceLinkedRoleDeletion>§credential_identities: BTreeMap<String, CredentialIdentity>Maps access key ID to the identity that should be returned by GetCallerIdentity.
sts_temp_credentials: BTreeMap<String, StsTempCredential>Temporary credentials issued by STS, keyed by access key ID. Includes the secret access key and session token — required for SigV4 verification and IAM enforcement. Expired entries are purged lazily on lookup.
credential_report_generated: bool§ssh_public_keys: BTreeMap<String, Vec<SshPublicKey>>§access_key_last_used: BTreeMap<String, AccessKeyLastUsed>§service_specific_credentials: BTreeMap<String, Vec<ServiceSpecificCredential>>Per-user service-specific credentials (Codecommit/Keyspaces).
Per-resource-arn tag map for SAML/Server cert/MFA device tags.
organizations_root_credentials_management: boolOrganizations integration toggles.
organizations_root_sessions: bool§service_last_accessed_jobs: BTreeMap<String, ServiceLastAccessedJob>Generated ServiceLastAccessed jobs keyed by job id.
organizations_access_reports: BTreeMap<String, OrganizationsAccessReport>Organizations access reports keyed by job id.
global_endpoint_token_version: Option<String>SetSecurityTokenServicePreferences value (e.g. v1Token,
v2Token). None means caller hasn’t configured a preference.
delegation_requests: BTreeMap<String, DelegationRequest>Delegation requests keyed by id. Records every state transition
(PENDING -> ACCEPTED/REJECTED/SENT) and the parameters
supplied at create-time so GetDelegationRequest can roundtrip
them.
outbound_web_identity_federation_enabled: boolWhether outbound web identity federation is enabled for this
account. Toggled by EnableOutboundWebIdentityFederation /
DisableOutboundWebIdentityFederation.
Implementations§
Source§impl IamState
impl IamState
pub fn new(account_id: &str) -> Self
pub fn reset(&mut self)
Sourcepub fn credential_secret(&mut self, access_key_id: &str) -> Option<SecretLookup>
pub fn credential_secret(&mut self, access_key_id: &str) -> Option<SecretLookup>
Look up the secret access key, session token, and resolved principal for a given access key ID.
Searches IAM user access keys first, then STS temporary credentials. Expired STS temporary credentials are purged in-place and skipped.
Returns None if the AKID is unknown or its STS credential has
expired.
Required for SigV4 signature verification (batch 3) and principal
resolution (batch 4). Callers must hold a write lock on
IamState to allow the lazy purge; read-only callers should use
IamState::credential_secret_readonly.
Sourcepub fn credential_secret_readonly(
&self,
access_key_id: &str,
) -> Option<SecretLookup>
pub fn credential_secret_readonly( &self, access_key_id: &str, ) -> Option<SecretLookup>
Read-only variant of IamState::credential_secret that does not
purge expired entries. Prefer the mutable variant wherever possible
to keep the temp-credential table small.
Trait Implementations§
Source§impl AccountState for IamState
impl AccountState for IamState
Source§fn new_for_account(account_id: &str, _region: &str, _endpoint: &str) -> Self
fn new_for_account(account_id: &str, _region: &str, _endpoint: &str) -> Self
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.