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-6407): use conversationId returned by the server instead of hardcoded integer in SASL implementation for MONGODB-AWS. #4258

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kggau
Copy link

@kggau kggau commented Sep 30, 2024

Description

MONGODB-AWS authentication mechanism should follow SASL spec. Current implementation ignores the conversationId sent by the server and uses a hardcoded integer for all saslContinue messages across all conversations.

What is changing?

Changing the hardcoded integer for conversationId to utilize the one that gets returned in the saslStart response.

Is there new documentation needed for these changes?

No. This change brings the implementation to spec.

What is the motivation for this change?

This is a bug. MONGODB-AWS authentication failed on database emulating MongoDB.

Release Highlight

Fixes SASL implementation for MONGODB-AWS to use conversationId returned by the server instead of hardcoded integer.

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

integer in SASL implementation for MONGODB-AWS.
@alexbevi
Copy link
Contributor

alexbevi commented Oct 1, 2024

Hey @kggau, thanks for sharing this patch. Our team will give it a once over to validate it addresses the problem (it looks like it does on a quick inspection).

This is a bug. MONGODB-AWS authentication failed on database emulating MongoDB.

Can you clarify which emulating database this issue occurred in?

@kggau
Copy link
Author

kggau commented Oct 1, 2024

Thanks @alexbevi!

Can you clarify which emulating database this issue occurred in?

This issue happened when using MONGODB-AWS auth mechanism with Amazon DocumentDB. Given loss of conversationId information, I am not sure why it is functional with MongoDB (assuming it works).

@dariakp dariakp added tracked-in-jira Ticket filed in MongoDB's Jira system External Submission PR submitted from outside the team labels Oct 1, 2024
@dariakp dariakp changed the title fix: use conversationId returned by the server instead of hardcoded integer in SASL implementation for MONGODB-AWS. fix(NODE-6407): use conversationId returned by the server instead of hardcoded integer in SASL implementation for MONGODB-AWS. Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Submission PR submitted from outside the team tracked-in-jira Ticket filed in MongoDB's Jira system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants