Skip to content

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

Merged
merged 3 commits into from
Aug 6, 2025

Conversation

cveticm
Copy link
Collaborator

@cveticm cveticm commented Aug 6, 2025

Proposed changes

  • Plugs SA transport method into httpClient()
  • Gets SA credentials in WithAuthentication()
  • Adds SA support in atlas auth whoami

Future work

  • e2e testing using SA will be done as a part of CLOUDP-329808
  • Supporting logging in as SA will be done as a part of CLOUDP-329796

Jira ticket: CLOUDP-329787

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

Comment on lines -17 to -21
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.



Copy link
Collaborator Author

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.

Comment on lines 69 to 70
case "invalid_client": // oauth2 error
return ErrUnauthorized
Copy link
Collaborator Author

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

Copy link
Collaborator

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)

@cveticm cveticm force-pushed the CLOUDP-329787_implement_SA branch from 0042311 to 4e26dfe Compare August 6, 2025 09:19
@cveticm cveticm marked this pull request as ready for review August 6, 2025 09:35
@cveticm cveticm requested review from a team as code owners August 6, 2025 09:35
@github-actions github-actions bot added the need-doc-review Improvements or additions to documentation, will be reviewed by the docs team label Aug 6, 2025
Copy link
Contributor

github-actions bot commented Aug 6, 2025

APIx Bot :bowtie:: a message has been sent to Docs Slack channel 🚀.

@cveticm cveticm removed the need-doc-review Improvements or additions to documentation, will be reviewed by the docs team label Aug 6, 2025
Comment on lines 69 to 70
case "invalid_client": // oauth2 error
return ErrUnauthorized
Copy link
Collaborator

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)

@cveticm cveticm requested a review from jeroenvervaeke August 6, 2025 09:53
@github-actions github-actions bot added the need-doc-review Improvements or additions to documentation, will be reviewed by the docs team label Aug 6, 2025
@cveticm cveticm merged commit 4a49db9 into SA_refactor_feature_branch Aug 6, 2025
22 checks passed
@cveticm cveticm deleted the CLOUDP-329787_implement_SA branch August 6, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-doc-review Improvements or additions to documentation, will be reviewed by the docs team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants