-
Notifications
You must be signed in to change notification settings - Fork 89
CLOUDP-329787: Make Service Account transport available in httpClient() #4090
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
CLOUDP-329787: Make Service Account transport available in httpClient() #4090
Conversation
Public Preview: The atlas api sub-command, automatically generated from the MongoDB Atlas Admin API, offers full coverage of the Admin API and is currently in Public Preview (please provide feedback at https://feedback.mongodb.com/forums/930808-atlas-cli). | ||
Admin API capabilities have their own release lifecycle, which you can check via the provided API endpoint documentation link. | ||
|
||
|
||
|
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.
Out-of-date doc remnant after merge from master.
internal/cli/commonerrors/errors.go
Outdated
case "invalid_client": // oauth2 error | ||
return ErrUnauthorized |
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.
if incorrect service account clientID or clientSecret is provided, we get an oauth2 error with error code "invalid_client"
To keep consistent behaviour as when incorrect credentials are provided for PAK and user account, we will listen out for this error and return ErrUnauthorized
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.
Could you turn invalid_client
into a constant? (like the other entries)
0042311
to
4e26dfe
Compare
APIx Bot |
internal/cli/commonerrors/errors.go
Outdated
case "invalid_client": // oauth2 error | ||
return ErrUnauthorized |
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.
Could you turn invalid_client
into a constant? (like the other entries)
Proposed changes
atlas auth whoami
Future work
Jira ticket: CLOUDP-329787
Checklist
make fmt
and formatted my code