Skip to content

Conversation

durran
Copy link
Member

@durran durran commented Sep 30, 2025

Removes supplying credentials for MONGODB-AWS in the URI or client options in the auth spec and adds new tests.

Tools changes: mongodb-labs/drivers-evergreen-tools#691

Node implementation: mongodb/node-mongodb-native#4689

Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?
  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, and sharded
    clusters).

@durran durran marked this pull request as ready for review September 30, 2025 16:39
@durran durran requested a review from a team as a code owner September 30, 2025 16:39
@durran durran requested review from JamesKovacs and removed request for a team September 30, 2025 16:39
@dariakp dariakp requested review from dariakp and removed request for JamesKovacs September 30, 2025 18:02
mongodb://<AccessKeyId>:<SecretAccessKey>@localhost/?authMechanism=MONGODB-AWS
mongodb://localhost/?authMechanism=MONGODB-AWS
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the other prose tests that are no longer relevant in this file (strike-through, or replace the title with *Removed* per prose test guidelines)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the the prose tests are still valid and I updated the assume role test to note as well to pass --nouri

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe Case 1 above would fall into the category of "no longer relevant" after this set of changes, so I was suggesting the strike-through method. There is also a callout about URI encoding in L15-16 of this file that should probably be amended.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the Removed label to the titles.

Copy link
Contributor

@dariakp dariakp Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think those are the tests we want to remove. In addition, the guidelines for removing tests say to either remove the whole test and replace the title with "Removed" OR strikethrough the entire content - just adding a "removed" label and keeping everything else in place might be confusing.

@dariakp dariakp changed the title DRIVERS-3131: No URI credentials with MONGODB-AWS DRIVERS-3131: No explicitly provided properties with MONGODB-AWS Sep 30, 2025
@durran durran requested a review from dariakp October 1, 2025 14:25
mongodb://<AccessKeyId>:<SecretAccessKey>@localhost/?authMechanism=MONGODB-AWS
mongodb://localhost/?authMechanism=MONGODB-AWS
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe Case 1 above would fall into the category of "no longer relevant" after this set of changes, so I was suggesting the strike-through method. There is also a callout about URI encoding in L15-16 of this file that should probably be amended.

@blink1073 blink1073 self-requested a review October 1, 2025 20:03
@durran durran requested a review from dariakp October 6, 2025 19:06
Drivers MUST test the following scenarios:

1. `Regular Credentials`: Auth via an `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` pair
1. `Regular Credentials`: Auth via an `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` pair *Removed*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we still want to test this with env vars?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is now fixed.

Expect authentication to succeed and the custom credential provider was called.

## Regular credentials
## Regular credentials *Removed*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right test to remove, #### Case 1: Credentials in URI Take Precedence is the one that isn't relevant with the new changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brought back.

mongodb://<AccessKeyId>:<SecretAccessKey>@localhost/?authMechanism=MONGODB-AWS
mongodb://localhost/?authMechanism=MONGODB-AWS
```

Copy link
Contributor

@dariakp dariakp Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think those are the tests we want to remove. In addition, the guidelines for removing tests say to either remove the whole test and replace the title with "Removed" OR strikethrough the entire content - just adding a "removed" label and keeping everything else in place might be confusing.

@durran
Copy link
Member Author

durran commented Oct 6, 2025

#1847 (comment)

This has been fixed.

@durran durran requested a review from dariakp October 6, 2025 22:06
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.

3 participants