Problem Service registry with Mongo

30 views
Skip to first unread message

Francisco Morote

unread,
Dec 8, 2017, 2:55:53 AM12/8/17
to CAS Community
Hi,
we are using cas 5.1.5. Our MongoDb installation stores all users in 'admin' database
With shell can auth without problem:  bin/mongo -u cas-adm -p cas-adm  --authenticationDatabase admin then use the cas database

Is there any way to tell CAS the authenticationDatabase parameter?

My cas properties:
##
# MongoDb Ticket Registry
#
cas.ticket.registry.mongo.idleTimeout=30000
cas.ticket.registry.mongo.port=27017
cas.ticket.registry.mongo.dropCollection=false
cas.ticket.registry.mongo.socketKeepAlive=false
cas.ticket.registry.mongo.password=cas-adm
cas.ticket.registry.mongo.collectionName=cas-ticket-registry
cas.ticket.registry.mongo.databaseName=cas-mongo-database
cas.ticket.registry.mongo.timeout=5000
cas.ticket.registry.mongo.userId=cas-adm
cas.ticket.registry.mongo.writeConcern=NORMAL
cas.ticket.registry.mongo.host=localhost

cas.ticket.mongo.conns.lifetime=60000
cas.ticket.mongo.conns.perHost=10

Of course if i set databaseName=admin, the collections are created in 'admin' db not in 'cas-mongo-database'

It seems to me that the only way to auth is that the user is in 'cas-mongo-database' not in 'admin' :(

Thanks

Francisco Morote

unread,
Dec 8, 2017, 3:13:38 AM12/8/17
to CAS Community
Hi again,
another approach will try to connect with an URI like this

uri = 'mongodb://cas-adm:cas-adm@localhost:27017/cas-mongo-database?authSource=admin'


any idea?
Thanks
Reply all
Reply to author
Forward
0 new messages