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

feat: support PENUMBRA_INDEXER_CA_CERT env var override #56

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Sep 19, 2024

Adds opt-in support for declaring a CA certificate value for the database TLS connection. Some managed postgres solutions, such as DigitalOcean's, require this setting. In order to use it:

  1. set the PENUMBRA_INDEXER_CA_CERT env var with the string contents of the db's CA
  2. remove the sslmode=require from the connection auth string

The need for 2 is because the connectionString param clobbers any manual ssl opts in the db config, and is documented here [0].

Closes #55.

[0] https://node-postgres.com/features/ssl#usage-with-connectionstring

@conorsch
Copy link
Contributor Author

I deployed a custom build from this tag to https://dex-explorer.testnet.plinfra.net, and confirmed the setting resolved the db connection issues I was experiencing.

@conorsch conorsch force-pushed the support-ca-cert-for-db-tls branch 2 times, most recently from b75de80 to bfa7f28 Compare September 19, 2024 22:01
@conorsch conorsch changed the title feat: support CA_CERT env var override feat: support PENUMBRA_INDEXER_CA_CERT env var override Sep 19, 2024
Adds opt-in support for declaring a CA certificate value for the
database TLS connection. Some managed postgres solutions, such as
DigitalOcean's, require this setting. In order to use it:

  1. set the PENUMBRA_INDEXER_CA_CERT env var with the string contents of the db's CA
  2. remove the `sslmode=require` from the connection auth string

The need for 2 is because the `connectionString` param clobbers
any manual `ssl` opts in the db config, and is documented here [0].

Closes #55.

[0] https://node-postgres.com/features/ssl#usage-with-connectionstring
@conorsch conorsch force-pushed the support-ca-cert-for-db-tls branch from bfa7f28 to e2cff0e Compare September 19, 2024 22:36
@conorsch conorsch merged commit 0679a10 into main Sep 20, 2024
3 checks passed
conorsch added a commit that referenced this pull request Sep 25, 2024
Adds a nix config so that tooling like `pnpm` is available immediately.
Fleshes out the documentation around connecting to managed database
instances, since merge of #56.
conorsch added a commit that referenced this pull request Sep 25, 2024
Adds a nix config so that tooling like `pnpm` is available immediately.
Fleshes out the documentation around connecting to managed database
instances, since merge of #56.
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.

App cannot connect to a managed postgresql cluster on digitalocean
2 participants