Closed lio-p closed 9 months ago
I feel like the easiest fix here is not to fail validation, but instead just debug that "hey we can't validate anything" if we don't have the permission.
Warn is gonna be too noisy IMO, so debug
is the way to go
This is interesting. I created a couple of read-only users for Cresty in Atlas and all of them worked as expected. Did you see this error while using a local MongoDB instance?
I had same with read-only users in https://mongodb.com. The behaviour above I reproduced with our functional test container, so I assume this problem happens only with on-prem (maybe some managed services can do it too)
Bug Description
The documentation says
The user must have access to the configured database and collection. You may want to create a dedicated, read-only user for each connector.
However, using an user with read only access to a user database, the connector sync fails with the following error:
Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed'}
To Reproduce
Steps to reproduce the behavior:
Use this user with the MongoDB connector.
Expected behavior
The sync should be successful. Or at least, we shouldn't have to provide an user with
root
permission onadmin
db.