Configuring ReactiveMongo in Play Silhouette Seed to connect via SSL

112 views
Skip to first unread message

Anthony Stephens

unread,
May 6, 2017, 9:19:33 AM5/6/17
to ReactiveMongo - http://reactivemongo.org
I'd like to configure the Play Silhouette ReactiveMongo seed to connect to MongoDB Atlas with sslEnabled. I started to refactor the seed without using the play-silhouette-persistence-reactivemongo dependency, though I think I'd like to keep it. Any recommendations on the best way to enable SSL in the PlaySilhouette ReactiveMongo seed?

Some Scala Dude

unread,
May 6, 2017, 3:35:55 PM5/6/17
to ReactiveMongo - http://reactivemongo.org
After looking through the Play-ReactiveMongo module source, it appears that adding the following to application.conf should enable ssl: 

mongodb.options.ssl.enabled = "true"

This doesn't seem to work though. Also getting the following warnings and errors:

[warn] r.a.MongoDriver - Some options were ignored because they are not supported (yet): replicaSet, ssl
[info] play.api.Play - Application started (Dev)

I thought SSL was added in 0.11, am I wrong?

Cédric Chantepie

unread,
May 6, 2017, 4:46:10 PM5/6/17
to ReactiveMongo - http://reactivemongo.org
Such configuration format isn't ReactiveMongo one. The documentation about connection URI that can be used to configured it is available online: http://reactivemongo.org/releases/0.12/documentation/tutorial/connect-database.html

Anthony

unread,
May 6, 2017, 6:30:06 PM5/6/17
to ReactiveMongo - http://reactivemongo.org
The Play-ReactiveMongo module provides a layer of abstraction that instantiates the connection. Trying to figure out where in the Play Framework project is best/right to configure/override the default connection.

Cédric Chantepie

unread,
May 7, 2017, 6:54:15 AM5/7/17
to ReactiveMongo - http://reactivemongo.org
The best is to first read the documentation.

Somedude

unread,
May 8, 2017, 9:42:26 PM5/8/17
to ReactiveMongo - http://reactivemongo.org
You're totally right. I think I was making this more complicated than I needed to. Configuring database access using the URI syntax had the answer needed. I was also using ssl = true as apposed to sslEnabled = true. Hence, the warning ssl not implemented yet.

So, for others with the issue. If you copy and paste the URL provided by MongoDB Atlas you should remove the replicaSet parameter, as it is inferred from providing multiple server addresses, and change ssl = true to sslEnabled = true. 
Reply all
Reply to author
Forward
0 new messages