Skip to content

feat: authenticate with LFC_API_KEY for non-interactive use - #22

Merged
vigneshrajsb merged 3 commits into
mainfrom
feat/api-key-env-auth
Nov 4, 2026
Merged

vigneshrajsb merged 3 commits into
mainfrom
feat/api-key-env-auth

Conversation

@vigneshrajsb

Copy link
Copy Markdown
Collaborator

Summary

  • lfc now reads an API key from LFC_API_KEY, so it can run in CI without lfc login or a config file (only LIFECYCLE_API_URL is needed).
  • The key takes precedence over any cached SSO login and is sent as a Bearer token. A malformed key fails fast, and a 401 is not retried.
  • lfc whoami reports the key's principal and scopes; lfc doctor notes the key is set.

Testing

  • Lint, typecheck and unit tests pass.
  • With a personal API key and an empty config dir: whoami, builds find, and builds env set/get/unset all worked.
  • A well-formed but invalid key returns a 401 from the API.

@vigneshrajsb
vigneshrajsb marked this pull request as ready for review November 4, 2026 22:19
@vigneshrajsb
vigneshrajsb merged commit 89ffd83 into main Nov 4, 2026
1 check passed
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.

1 participant