Using SSL certificates in Mongo (AWS DocumentDB) connection workaround
Hi,
As you may know, connecting to a AWS DocumentDB requires an SSL connection. This path can be provided with a flag in the uri, e.g.:
mongodb://<user>:<pass>@<ip>:<port>/<db>?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem
I would like to find a workaround for pointing the JDBC connector this cert. Because currently, since the driver doesn't know where the file is i'm getting the following error:
{sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Is there any room for path tricks in here? Maybe putting the SSL cert in java path?
Answers
-
Hello,
You should be able to set any option to the MongoDB URL by going in your connection and selecting the "Use advanced URI syntax" option.
Hope this helps,
Pierre -
Hi Pierre, i'm already using the advanced URI syntax. However the file name i'm specifying in the URI (ca bundle) isn't found by the JDBC driver. That's the gist of this question. How do i make the ca-bundle available to driver?