Requirement
REQ-CLI-023 — Auth login command with device flow and encrypted credential storage
Summary
Implement lattice auth login using OAuth2 device flow with encrypted credential storage. Based on auth team recommendations in #6.
Specification
- Device flow authentication via Hydra (OIDC discovery at
/.well-known/openid-configuration)
- Credential storage: OS keyring (
keyring crate) primary, AES-256-GCM encrypted file fallback (~/.forkzero/credentials.enc) for headless
- File permissions: directories
0o700, credential files 0o600
- Auto-migrate from file to keyring when keyring becomes available
- Atomic file writes (temp + rename) to prevent corruption
Dependencies
Lattice
Requirement
REQ-CLI-023 — Auth login command with device flow and encrypted credential storage
Summary
Implement
lattice auth loginusing OAuth2 device flow with encrypted credential storage. Based on auth team recommendations in #6.Specification
/.well-known/openid-configuration)keyringcrate) primary, AES-256-GCM encrypted file fallback (~/.forkzero/credentials.enc) for headless0o700, credential files0o600Dependencies
Lattice