Skip to content

Align JS/TS sample SSL configuration#154

Merged
danielfrankcom merged 1 commit intomainfrom
fix/js-ssl
May 27, 2025
Merged

Align JS/TS sample SSL configuration#154
danielfrankcom merged 1 commit intomainfrom
fix/js-ssl

Conversation

@danielfrankcom
Copy link
Copy Markdown
Contributor

This PR aligns the SSL configuration in the various JS/TS samples.

I originally noticed the inconsistencies after spotting mode: 'verify-full' in the Sequelize configuration. From what I could see in the docs this doesn't appear to be a valid configuration, as the ssl block configures the underlying TLSSocket configuration here.

Both of the TS ORMs use node-postgres under the hood, and seem to pass the SSL configuration to the underlying driver. postgres-js seems to configure SSL in the same way according to the docs.

Since all 4 of these samples can be configured the same way, I've aligned their configuration to set rejectUnauthorized: true, which is the equivalent of verify-full in other languages. For some of the drivers this is already the default, but being explicit about the configuration doesn't hurt and we are already explicitly configuring other defaults like the port number.

As part of this change I also removed the certificate download for TypeORM, since Node appears to provide the AWS cert already in its default trust store.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.

@danielfrankcom danielfrankcom merged commit 4350b9e into main May 27, 2025
6 of 7 checks passed
@danielfrankcom danielfrankcom deleted the fix/js-ssl branch May 27, 2025 21:26
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.

2 participants