Skip to content
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

fix(NODE-5944): make AWS session token optional #4002

Merged
merged 9 commits into from
Feb 27, 2024

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Feb 26, 2024

Description

According to spec:

Users MAY have obtained temporary credentials through an AssumeRole request. If so, then in addition to a username and password, users MAY also provide an AWS_SESSION_TOKEN as a mechanism_property.

The AWS_SESSION_TOKEN is optional, so we should not check for it when making temp credentials: https://github.com/mongodb/node-mongodb-native/blob/main/src/cmap/auth/mongodb_aws.ts

What is changing?

Do not throw the MongoMissingCredentialsError('Could not obtain temporary MONGODB-AWS credentials') exception when the AWS token is missing.

Is there new documentation needed for these changes?

None

What is the motivation for this change?

NODE-5747

Release Highlight

The AWS token is now optional

Users may provide an AWS_SESSION_TOKEN as a client option or AWS configuration in addition to a username and password. But if the token is not provided, the driver won't throw an exception and let AWS SDK handle the request.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@alenakhineika alenakhineika marked this pull request as ready for review February 26, 2024 19:28
@durran durran changed the title fix(NODE-5944): make AWS token optional fix(NODE-5944): make AWS session token optional Feb 27, 2024
@durran durran self-assigned this Feb 27, 2024
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Feb 27, 2024
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Feb 27, 2024
@durran durran merged commit f26de76 into main Feb 27, 2024
22 of 27 checks passed
@durran durran deleted the NODE-5944-make-aws-token-optional branch February 27, 2024 17:31
@alenakhineika alenakhineika removed the Team Review Needs review from team label Feb 27, 2024
aditi-khare-mongoDB pushed a commit that referenced this pull request Mar 6, 2024
Co-authored-by: Durran Jordan <durran@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants