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

MongoClient: Support authentication #87

Open
tinchodias opened this issue Oct 26, 2020 · 1 comment
Open

MongoClient: Support authentication #87

tinchodias opened this issue Oct 26, 2020 · 1 comment

Comments

@tinchodias
Copy link
Contributor

tinchodias commented Oct 26, 2020

There is an authentication chapter of the official specification for mongo clients: https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst
Apart from the username and password, we have other settings such as the authentication database (admin by default) and the mechanism (we have the SCRAM-SHA-1 only for now). I may be okay to follow their suggestion of having a MongoCredential class (or hierarchy).

The spec also specifies a handshake sending a isMaster as the first operation after a socket is open by the pool, and some behavior.

@tinchodias
Copy link
Contributor Author

A link to Python client documentation, to have a reference: https://api.mongodb.com/python/current/examples/authentication.html#scram-sha-1-rfc-5802

rydnr pushed a commit to osoco/mongotalk that referenced this issue Dec 22, 2020
Common logic is moved to a new parent class SCRAMSHAAuthMechanism. Descendant classes SCRAMSHA1AuthMechanism and SCRAMSHA256AuthMechanism only customize the hash function to use.

This PR doesn't implement the handshake mentioned in pharo-nosql#87.
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

No branches or pull requests

1 participant