Skip to main content

Module aws_config

Module aws_config 

Source
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

  • AwsConfigSource is open for new variants (Sso, WebIdentity, EcsContainer, …) without touching existing arms.
  • parse_aws_config_files takes explicit &Path arguments so every parsing behavior is unit-testable against fixture files without hitting the real filesystem.
  • discover_aws_profiles is the thin wrapper that resolves ~/.aws/* and delegates to the pure function.

Structs§

AwsConfigEntry
A single AWS profile as parsed from credentials / config files or env vars.
ProfileChainRef
Role-chaining metadata surfaced when role_arn is present on a profile.

Enums§

AwsConfigSource
Where a profile’s configuration was read from.

Functions§

discover_aws_profiles
Discover AWS profiles from the real ~/.aws/credentials and ~/.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 a HashMap<section_name, key_values>. Returns an empty map (not an error) when the file does not exist.
strip_config_prefix 🔒
Strip the profile prefix that ~/.aws/config uses for non-default sections.