|
MongoDB 3 brings a new authentication support SCRAM-SHA-1 and deprecated MONGODB-CR.
The support came with Java's driver 2.13 but requires some migrations https://github.com/mongodb/mongo-java-driver/releases/tag/r2.13.0
-
Upgrade to Java's driver 2.13
-
replace the default MongoDBProperties.AUTHENTICATION_MECHANISM from MONGODB-CR to SCRAM-SHA-1 (and add the latter in AuthenticationMechanismType)
-
write in the migration guide how to explicitly set the auth mechanism for people with older MongoDB databases
-
Change to use MongoCredential.html#createCredential instead of MongoCredential#createMongoCRCredential
That should do the trick.
The workaround according to Dean is to do
db.system.version.save(
{ "_id" : "authSchema", "currentVersion" : 3 }
)
|