[CDTOOL-1332] Honor --profile when resolving the API token#1792
Open
jedisct1 wants to merge 1 commit into
Open
[CDTOOL-1332] Honor --profile when resolving the API token#1792jedisct1 wants to merge 1 commit into
jedisct1 wants to merge 1 commit into
Conversation
The deprecated `--profile` flag (`-o`) was silently ignored during token lookup, so commands ran against the default token regardless of the profile the user named on the command line. Token resolution now consults `--profile` after `--token` and before the environment variable, the manifest profile, and the default token. An unknown profile name is a hard error rather than a silent fallback, so the wrong token can no longer slip through under `--quiet`.
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.
Change summary
The deprecated
--profile/-oflag was parsed intoData.Flags.Profilebut never consulted during token lookup, so commands silently ran against the default token instead of the profile the user named on the command line.Token resolution now consults
--profileafter--tokenand beforeFASTLY_API_TOKEN.An unknown profile name is treated as a hard error rather than a silent fallback, so the wrong token can no longer slip through under
--quiet.All Submissions:
Changes to Core Features:
User Impact
Users who pass
--profile <name>(or-o <name>) will now have the command run against the named profile's token, as the help text already promised.Users who pass an unknown profile name will see a clear remediation error instead of the command silently using the wrong token.
Are there any considerations that need to be addressed for release?
No breaking changes to documented behavior.
Scripts that relied on
--profile <bogus>silently being ignored will now exit with an error.