Using SSL certificates in Mongo (AWS DocumentDB) connection workaround

Options
Benoni
Benoni Registered Posts: 23 ✭✭✭✭

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>@&lt;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

  • PierreB
    PierreB Dataiker Posts: 6 Dataiker
    Options

    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.

    Screenshot 2020-12-14 at 10.49.20.png

    Hope this helps,
    Pierre

  • Benoni
    Benoni Registered Posts: 23 ✭✭✭✭
    Options

    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?

Setup Info
    Tags
      Help me…