-
Notifications
You must be signed in to change notification settings - Fork 135
Scopes support in auth commands #4327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Commit: 1a8a970
16 interesting tests: 8 RECOVERED, 5 SKIP, 3 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
| // wrapAuthErrorWithScopeContext adds context to an authentication error when the | ||
| // configuration does not include the 'all-apis' scope, which may cause validation | ||
| // API calls to fail even though the token itself is valid for its intended purpose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of insufficient scopes, the server responds with Provided OAuth token does not have required scopes: .... I could instead match on the error and determine auth to be valid instead of adding a note saying the error may just be due to insufficient scopes.
This is, of course, brittle but perhaps gives a nicer experience.
Changes
auth logincommand to take--scopesas an argumentauth describeandauth profilescommands to also display scopes. They give a warning that validation of authentication may not work correctly when using scopes. This is because we validate by making calls requiring specific scopes which the user may not have requested.Why
These changes come as part of an effort to support fine-grained, user-provided scopes in all our tools.
Tests