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

Add Support for the PLAIN authMechanism #223

Merged
merged 4 commits into from
Nov 6, 2023
Merged

Conversation

JD-Robertson
Copy link
Contributor

PLAIN authentication is supported by MongoDB Enterprise Edition and MongoDB Atlas when those servers are configured to an external LDAP identity provider for user management. I needed to support this mechanism from Elixir for a customer engagement. Posting those changes here for potential upstreaming.

The mechanism itself is extremely simple. Username and password are sent to the server in plain text and either accepted or rejected. It is assumed that the underlying connection is encrypted but this is not enforced. I did need to tweak the URL parser code to allow url-encoded values for the authSource option. The auth source must be set to "$external" when using this mechanism and so will be encoded.

Unfortunately, I don't currently have a solution for automated testing of this mechanism, as it requires a paid version of the database and a bit of setup to use.

* Add support for LDAP authentication

* Unit test for url parser changes
* Mention PLAIN auth support in the Readme

* tweak wording
@zookzook zookzook merged commit f01d497 into zookzook:master Nov 6, 2023
2 of 3 checks passed
@zookzook
Copy link
Owner

zookzook commented Nov 6, 2023

Thank you!

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