Help with SSL connection on Amazon DocumentDB

default discord avatar
upcase-chefs
2 years ago
1 2

Hey folks! First, congratulations. Payload CMS looks amazing.
We, here in Chefsclub, are excited to use Payload in some of our usecases.
A little (and perhaps silly) question comes up to my mind:
We are trying to connect payload on a DocumentDB cluster that requires a SSL .pem certificate. Since we can just pass on the init the URI, we are not getting any success to connect without (1 have to disable ssl :( or 2 use it on the same VPC).
Is there any plans to make the parameter passed on the Payload init to include the mongoose options, or at least the CA SSL certificate?

Thank you so much.
Filipe Baeta
CTO @ChefsClub

  • discord user avatar
    DanRibbens
    Payload Team
    2 years ago

    This feature is up now in the published v0.2.10! You can update your package.json Payload dependency to "^0.2.10" get this change.

    3 replies
  • default discord avatar
    upcase-chefs
    2 years ago

    Hey Dan! Thank you and the team so much!
    Now the fun begins :)

  • default discord avatar
    prove-ability
    last year

    yarn update payload@0.2.10 did i misunderstand?

    스크린샷 2022-06-08 15 32 13

    Thanks in advance!

  • discord user avatar
    jmikrut
    Payload Team
    last year

    Hey @prove-ability — Payload version 0.2.10 is now quite out of date. This discussion was from Feb 2021. We're now at 0.17.3. You should use the latest version of Payload instead.

  • discord user avatar
    jmikrut
    Payload Team
    2 years ago

    Hi @upcase-chefs — great question and great request. We would be happy to support the passing of Mongoose options.

    Give us a bit here and we will make it happen! You can expect this functionality to be released in 1 to 2 days from now.

    We will report back to this discussion when we have it added!

    2 replies
    default discord avatar
    upcase-chefs
    2 years ago

    Hey Folks,

    My suggested steps:

    1. on the index.js add the follow parameter besides the url: mongoAdditionalOptions

    On the connect.js, receive the mongoAdditionalOptions object and append it to the connectionOptions...

    var finalOptions = {...connectionOptions, ...mongoAdditionalOptions}
    Also, on the index.js it's needed read Amazon's .pem file and pass the buffer (or the string. I'm not quite sure) to the mongoose parameters.

    https://mongoosejs.com/docs/tutorials/ssl.html

    I hope this helps.

    We are Eager to buy the Payload licenses. But we still need to fix this one and another bug on Relationship that I just opened there. This is blocking our workload to be implemented.

    Cheers.
    Chefsclub team.

    discord user avatar
    DanRibbens
    Payload Team
    2 years ago

    This is similar to what I came up with.

    I named it mongoOptions instead of mongoAdditionalOptions, but the functionality is the same as you described.

    Here is the PR:
    https://github.com/payloadcms/payload/pull/56/files

Open the post
Continue the discussion in GitHub
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.