-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Requirement
REQ-CLI-024 — Credential fallback chain for CLI authentication
Summary
Implement a prioritized credential resolution chain for all authenticated CLI operations.
Fallback Order
FORKZERO_TOKENenv var — direct access token (CI/pipelines)FORKZERO_CREDENTIALS_FILEenv var — path to credential JSON- Encrypted keyring — OS keychain from
lattice auth login - Encrypted file —
~/.forkzero/credentials.enc(headless fallback) - Interactive device flow — prompt user to authenticate
Behavior
- Fail hard on explicit config errors (e.g., FORKZERO_CREDENTIALS_FILE points to missing file)
- Fall through silently on ambient sources (keyring not available → try file)
- Attempt token refresh on 401 before failing (anti-pattern from GWS: they only retry on 429)
Lattice
- Depends on: REQ-CLI-023
- Source: SRC-AUTH-PATTERNS (Lattice CLI auth: adopt credential storage patterns from GWS CLI analysis #6)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request