0

community. I am having a hard time connecting to Cosmos Db using Reactive Mongo client. I am able to connect to it using shell and NoSqlBooster client but failing using Reactive Mongo.

Authentication Mechanism |-------| Result
 **scram-sha1**                   Authentication failed, SaslFailed
 **mongocr**                      Authentication failed

URI tried:

mongodb://****:*****@******.documents.azure.com:10255/c360?ssl=true&authenticationMechanism=scram-sha1&sslAllowsInvalidCert=true
mongodb://****:*****@******.documents.azure.com:10255/c360?ssl=true

Any help will be very much appreciated. Thanks.

Ravinder Payal
  • 2,884
  • 31
  • 40

1 Answers1

0

Finally, I was able to make it work using this configuration:

mongodb://****:*****@****.documents.azure.com:10255/c360?ssl=true&authenticationMechanism=mongocr&sslAllowsInvalidCert=true&authenticationDatabase=admin


?ssl=true
&authenticationMechanism=mongocr
&sslAllowsInvalidCert=true
&authenticationDatabase=admin

I tried this configuration group earlier as well, but, I guess I might have spilled something extra in username and password.

Ravinder Payal
  • 2,884
  • 31
  • 40
  • 1
    Requiring `authenticationMechanism=mongocr` means the DB is using old authentication, whereas MongoScram is recommanded since 3.0 – cchantep May 26 '19 at 12:13