quarkus.mongodb.credentials authorization failed

114 views Asked by At

I encounter no issues when I input my login credentials directly within the connection string. However, a problem arises when I attempt to connect to MongoDB using the quarkus.mongodb.credentials property or a custom credentials provider. The following error is generated:


Caused by: com.mongodb.MongoCommandException: Command failed with error 18 (AuthenticationFailed): 'Authentication failed.' on server ac-uftfkim-shard-00-01.joe17mo.mongodb.net:27017. The full response from the server is {"ok": 0.0, "errmsg": "Authentication failed.", "code": 18, "codeName": "AuthenticationFailed", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1697200256, "i": 6}}, "signature": {"hash": {"$binary": {"base64": "1JAzWj4V+H7g8tSoyIUG0DtxGuw=", "subType": "00"}}, "keyId": 7282785085286252549}}, "operationTime": {"$timestamp": {"t": 1697200256, "i": 6}}}

properties I use are:

quarkus.mongodb.connection-string=
quarkus.mongodb.credentials.username=
quarkus.mongodb.credentials.password=
quarkus.mongodb.database=

auth-mechanism is not explicitly configured within the properties. However by default it is set to: SCRAM-SHA-1.

0

There are 0 answers