Repository navigation
feat!: remove API key authentication - #18
Merged
Merged
Conversation
Since server release #38 the server rejects shared API keys: Flux acts on behalf of the signed-in person. The CLI now only sends the saved credentials from `flux auth login`. - `--api-key` stays as a hidden flag that fails with "API keys are no longer supported; run flux auth login", so old scripts get a helpful error instead of "unknown flag". - `FLUX_API_KEY` is ignored with a warning on stderr. - README and skill no longer describe API keys as a credential source. Flux issue 10390265686. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Flux issue 10390265686. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flux issue: 10390265686, "flux CLI: remove the --api-key flag (server rejects API keys since #38)".
Since server release #38 ("Flux is middleware") the server rejects shared API keys. The CLI still offered
--api-keyandFLUX_API_KEY.Changes
--api-keystays registered but hidden. Using it stops withAPI keys are no longer supported; run flux auth login(exit 1, no usage dump), so old scripts fail with a helpful message instead ofunknown flag. The check sits in the rootPersistentPreRunE(there were no other pre-run hooks), so it covers every command.FLUX_API_KEYis ignored. When it's set, a warning goes to stderr and the command continues with the savedflux auth logincredentials.getAPIKey()is renamed togetAccessToken(), and theapi.ClientfieldapiKeytotoken. Both now only carry the saved OAuth access token. Mechanical rename acrosscmd/.skill/SKILL.mdno longer mention API keys,--api-keyorFLUX_API_KEY; they only say to sign in withflux auth login. The README's local-server example now signs in instead of passing--api-key.FLUX_API_KEYor--api-key(checked.github/workflowsand.goreleaser.yml).Tests
TestRemovedAPIKey: no key, the flag after the command, the flag before the command, the flag onauth status, and the env var (warning only). PlusTestAPIKeyFlagHidden.TestAuthStatusVerifiedIdentitynow checks that a setFLUX_API_KEYis ignored and the personal token is sent.--api-key.go test -race ./...,go vet ./...andgo mod tidy -diffall pass. A mutation check (disabling the flag check) makesTestRemovedAPIKeyfail.flux projects list --api-key xandflux --api-key=x issues listexit 1 with the message,--helpno longer lists the flag, andFLUX_API_KEY=x flux projects listwarns and continues.This is a breaking change (
feat!). It ships with the next CLI release.🤖 Generated with Claude Code
Written by an AI agent (Claude Code · claude-opus-5-5, herdr-projects flux · t-0048).