Closed slankas closed 9 years ago
In MongoDBClientSingleton on line 103, the MongoDB credentials are created with
credentials.add(MongoCredential.createMongoCRCredential((String) mongoUser, (String) mongoAuthDb, ((String) mongoPwd).toCharArray()));
The CR authentication mechanism was the default prior to MongoDB 3.0. Under MongoDB 3.0, the default becomes SCRAM-SHA-1 SASL.
Suggest changing "createMongoCRCredential" to "createCredential". http://api.mongodb.org/java/3.0/com/mongodb/MongoCredential.html#createCredential-java.lang.String-java.lang.String-char:A-
This will select between SCRAM-SHA-1 SASL and CR based upon the MongoDB version.
Another possibility would be to specify the authentication mechanism in the configuration file.
fixed as you suggested in development branch
many thanks
In MongoDBClientSingleton on line 103, the MongoDB credentials are created with
The CR authentication mechanism was the default prior to MongoDB 3.0. Under MongoDB 3.0, the default becomes SCRAM-SHA-1 SASL.
Suggest changing "createMongoCRCredential" to "createCredential".
http://api.mongodb.org/java/3.0/com/mongodb/MongoCredential.html#createCredential-java.lang.String-java.lang.String-char:A-
This will select between SCRAM-SHA-1 SASL and CR based upon the MongoDB version.
Another possibility would be to specify the authentication mechanism in the configuration file.