pharo-nosql / mongotalk

A Pharo driver for MongoDB
MIT License
19 stars 13 forks source link

MongoClient: Support authentication #87

Open tinchodias opened 3 years ago

tinchodias commented 3 years ago

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 commented 3 years ago

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