mongodb-container icon indicating copy to clipboard operation
mongodb-container copied to clipboard

Having an external route for mongo

Open alikhajeh1 opened this issue 8 years ago • 9 comments

Using the openshift mongo template, has anyone found a way to expose an external route for mongo? We can set mongo to require authentication and bind to 0.0.0.0 so it accepts non-localhost connections, but I've not found a way to make it work with external routes.

https://github.com/openshift/origin/issues/3415#issuecomment-137902453 suggests there might be a way if mongo support SNI, which if I understand it correctly, does: https://jira.mongodb.org/browse/DRIVERS-320

Any ideas?

alikhajeh1 avatar Apr 26 '17 01:04 alikhajeh1

i don't know enough about mongo to advise you about enabling sni (but if you do, you should be able to create a passthrough route to it), but another option would be configuring either an external ip service, or a nodeport for your mongodb pod.

bparees avatar Apr 26 '17 03:04 bparees

Using SNI does not require using SSL/TLS on the server too?

Currently it is not possible to enable SSL for mongodb container - I plan to add this after s2i support is added (#239)

omron93 avatar Apr 26 '17 11:04 omron93

Using SNI does not require using SSL/TLS on the server too?

yes, it does. I figured that was implied when I said enabling SNI.

bparees avatar Apr 26 '17 13:04 bparees

yes, it does. I figured that was implied when I said enabling SNI.

Not sure we talk about same "server" :-) I thought a mongod server... I was asking because I am not familiar with "Edge Termination" of OpenShift routes. And if this can be somehow used.

omron93 avatar Apr 27 '17 11:04 omron93

edge termination of a route means the router terminates the SSL connection and then uses a non-encrypted connection to the backend. https://docs.openshift.org/latest/architecture/core_concepts/routes.html#secured-routes

bparees avatar Apr 27 '17 11:04 bparees

@bparees So it is possible to connect to service port (different than 80/443) without encrypted connection?

omron93 avatar Apr 27 '17 13:04 omron93

@bparees So it is possible to connect to service port (different than 80/443) without encrypted connection?

services can be on any port you want and any protocol you want. but routes cannot.

bparees avatar Apr 27 '17 14:04 bparees

Ok. So this issue is waiting for SSL support in mongodb-container. And that is blocked by s2i support - #239

omron93 avatar Apr 28 '17 06:04 omron93

any updates on this?

pooriaidani avatar Jul 08 '17 06:07 pooriaidani

mongodb container is not maintained any more in this org. closing.

hhorak avatar Apr 10 '24 11:04 hhorak