Expand description
AWS credentials and config file parser.
Parses ~/.aws/credentials and ~/.aws/config into a flat list of
AwsConfigEntry values without resolving or validating credentials.
§Security contract
access_key_id, secret_access_key, and session_token are:
- Declared
pub(crate)— not accessible outside this crate. - Annotated
#[serde(skip_serializing)]— they can never be emitted through Tauri’s IPC boundary, even by accident.
§OCP contract
AwsConfigSourceis open for new variants (Sso,WebIdentity,EcsContainer, …) without touching existing arms.parse_aws_config_filestakes explicit&Patharguments so every parsing behavior is unit-testable against fixture files without hitting the real filesystem.discover_aws_profilesis the thin wrapper that resolves~/.aws/*and delegates to the pure function.
Structs§
- AwsConfig
Entry - A single AWS profile as parsed from credentials / config files or env vars.
- Profile
Chain Ref - Role-chaining metadata surfaced when
role_arnis present on a profile.
Enums§
- AwsConfig
Source - Where a profile’s configuration was read from.
Functions§
- discover_
aws_ profiles - Discover AWS profiles from the real
~/.aws/credentialsand~/.aws/config. - home_
dir 🔒 - Resolve the home directory.
- parse_
aws_ config_ files - Parse explicit credentials and config file paths into a list of AWS profiles.
- parse_
ini_ 🔒file - Parse an INI file at
path, returning aHashMap<section_name, key_values>. Returns an empty map (not an error) when the file does not exist. - strip_
config_ 🔒prefix - Strip the
profileprefix that~/.aws/configuses for non-default sections.