Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to client SSL PEM cert and key and root CA PEM cert #2390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elichai
Copy link

@elichai elichai commented Oct 10, 2024

PR Info

Currently if you want to use SSL client certificate and key you can currently do it via a few options:

  1. Manually create a PgPool or MySqlPool and create a DatabaseConnection.
  2. For postgres:
    A. You can set sslrootcert=PATH, sslkey=PATH, sslca=PATH in the URI params.
    B. You can set env variables PGSSLCERT=PATH, PGSSLKEY=PATH, PGSSLROOTCERT=PATH
  3. For mysql: You can set ssl-cert, ssl-key=PATH, ssl-ca=PATH in the URI params

Both 3 and 2 require you to mount the keys/certs to a volume and pass a PATH to that.
Only 1 allows you to pass the certs/keys themselves which allows nicer integrations with KMS/Secret Manager but comes at the cost of building the pools yourself,
Which is why I only added the _pem variants of sqlx

@elichai elichai changed the title Add support to client SSL PEM cert and key Add support to client SSL PEM cert and key and root CA PEM cert Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant