Mongodb auth failure investigation #785
Draft
+267
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ Description
This PR resolves a MongoDB authentication failure (LINTEST-206) by correcting the case sensitivity of the
authSourceparameter and enhancing authentication flexibility.The primary issue was that the
MongoDBCrawlerused"authsource"(lowercase 's') instead of the standard"authSource"(uppercase 'S') in the connection string'sextraparameters, leading to authentication failures.This PR also introduces an optional
auth_mechanismparameter to allow explicit specification of authentication mechanisms (e.g., SCRAM-SHA-256) and significantly improves the documentation for MongoDB authentication, including troubleshooting tips and user role examples.Jira link: LINTEST-206
🧩 Type of change
Select all that apply:
auth_mechanismparameterauthSourcecase fix✅ How has this been tested? (e.g. screenshots, logs, workflow links)
The changes have been thoroughly tested with unit tests:
MongoDBCrawler.MongoDBCrawlerwith theauth_mechanismparameter.test_mongodb_with_auth_mechanism) was added totests/unit/test_packages.pyto validate theauth_mechanismparameter.authSourcecase change.📋 Checklist