--
You received this message because you are subscribed to the Google Groups "obiba-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/LO4P265MB37924F85DE2719F2D8E625A4B9D39%40LO4P265MB3792.GBRP265.PROD.OUTLOOK.COM.
Hi Yannick,
I hope you had a good trip back from Rotterdam.
I am still looking at moving some of our set ups onto a Docker approach and have another security question.
This might be a similar answer to the one about setting a password for Rock. I notice that there are no environment variables in Opal for a MongoDB username and password. Is this because the container does not expose a port to the host? And therefore without sudo, one cannot connect to the container?
I was wondering if I could use a mongo client on my host to connect to mongoDB in a container without a password if I knew the IP address.
I.e. do something like:
mongo --host 172.22.0.5
At the moment this gives me an error, but that might be because I am doing something wrong. What do you think?
Thanks
Tom
From: obiba...@googlegroups.com <obiba...@googlegroups.com>
On Behalf Of Yannick Marcon
Sent: 20 May 2022 10:41
To: obiba...@googlegroups.com
Subject: Re: [OBiBa] Security approach for running Opal as a Docker container
Hi Tom,
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/CAGrE6ov20-cK7MCp4_66qPHbJHNQ88JCMCbEju5wtT9fWFnqcw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/LO4P265MB379238F624476299FBD9CAA9B9829%40LO4P265MB3792.GBRP265.PROD.OUTLOOK.COM.
Hi Yannick,
Thanks for confirming these environment variables. I have given them a quick go and I think I am missing something. I have:
opal:
……..
environment:
………
- MONGO_USER=root
- MONGO_PASSWORD=password
mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
My understanding is that this creates a super user in the admin database of mongoDB. However, this information is not used by Opal during the set up:
JSON file:
{
"usedForIdentifiers": false,
"name": "mongodb",
"usage": "STORAGE",
"defaultStorage": true,
"mongoDbSettings": {
"url": "mongodb://@host@:@port@/@db@",
"username": "@user@",
"password": "@pwd@",
"properties": ""
}
}
The URL needs to be set to have ?authSource=admin appended if a username and password are set, otherwise the connection fails.
Is it the right thing to do to change this in the Opal Docker image, to make the set up easier?
Thanks
Tom
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/CAGrE6osj4DKi9RD152VTU5Dog3-x3%2BLXceo1YczUw_eb6iCFUw%40mail.gmail.com.