2

I am running mongd with Auth enabled

mongod --auth

I have a read write user on a DB.

db.system.users.find()

Logs - 
{ "_id" : "products_development.user_rw", "user" : "user_rw", "db" : "products_development", "credentials" : { "MONGODB-CR" : "0e857eaebba13dca9b53eb4440ab1657" }, "roles" : [ { "role" : "readWrite", "db" : "products_development" } ] } 

I am able to login with the above user credentials using mongo client - Authentication works fine

mongo -uuser_rw -p123456 --authenticationDatabase  products_development

Reading the tables inside the collection works as well

use products_development
db.table1.find()

So the user is getting Authorised.

But when i try to Read from Reactivemongo i am getting the below error.

assertion 13 not authorized for query on products_development.table1 ns:products_development.table1 query:{ _id: ObjectId('5564ba210b00009900150c72') }

Authentication is working fine connection is getting setup.

I am using 0.10.5.0.akka23 version, mongodb 2.6.8.

Kiran Raj
  • 187
  • 1
  • 9
  • Does reactive mongo work with mongodb Auth enabled? With Auth disabled my app is working fine. With Auth enabled i get the authorization error even if the user has required role. – Kiran Raj May 29 '15 at 18:04
  • According to the specified tag `play-reactivemongo`, you are using Play Framework. Could you provide the configuration file of your application? – HEX Sep 26 '15 at 14:06

0 Answers0