MongoDb authentication using Hibernate OGM MongoDb authentication using Hibernate OGM mongodb mongodb

MongoDb authentication using Hibernate OGM


Hibernate OGM is currently using the database name as authentication database. This is a bug, I'm working on it right now.

In your example (all seems correct by the way), you want to connect to the"lvdb" db but you defined the user in the "admin" database. Hiebernate OGM is actually looking for the user in the "lvdb" database.

UPDATE: This problem has now been fixed in the latest stable release (5.1.0.Final), you can use the property hibernate.ogm.mongodb.authentication_database to select the name of the authentication database (admin is the default name).