Skip to content

feat: profile-aware config + credentials loader - #26

Merged
chmmou merged 1 commit into
mainfrom
feature/config-loader
May 3, 2026
Merged

feat: profile-aware config + credentials loader#26
chmmou merged 1 commit into
mainfrom
feature/config-loader

Conversation

@chmmou

@chmmou chmmou commented May 3, 2026

Copy link
Copy Markdown
Owner

Adds internal/config: TOML multi-profile credentials file under the OS user-config path, env fallbacks (KAS_LOGIN, KAS_AUTHDATA, KAS_AUTHTYPE), and a Resolve step applying precedence flag > env > profile > default profile. Credentials.String redacts auth_data so secrets stay out of logs and --help. Validates auth_type and reports missing fields aggregated into one error.

Closes #2.

Add internal/config package implementing the credentials surface for
KAS API calls:

- TOML config file under the OS user-config path (XDG on Linux),
  multi-profile schema with default_profile selector.
- Env fallbacks KAS_LOGIN, KAS_AUTHDATA, KAS_AUTHTYPE.
- Resolve precedence flag > env > config(profile) > config(default).
- Credentials.String redacts auth_data so it never appears in logs
  or --help output.
- Validates auth_type (plain or session) and reports a single
  aggregated error listing every missing field.

Closes #2.
@chmmou
chmmou merged commit 332e388 into main May 3, 2026
1 check passed
@chmmou
chmmou deleted the feature/config-loader branch May 3, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration & credentials handling

1 participant