Skip to content

Docs around SSL support for RDS#635

Open
HarshCasper wants to merge 1 commit intomainfrom
doc-206-doc-rds-add-ssl-support-at-proxy-level
Open

Docs around SSL support for RDS#635
HarshCasper wants to merge 1 commit intomainfrom
doc-206-doc-rds-add-ssl-support-at-proxy-level

Conversation

@HarshCasper
Copy link
Copy Markdown
Member

Fixes DOC-206

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 6, 2026

Deploying localstack-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9c948db
Status: ✅  Deploy successful!
Preview URL: https://1b18e045.localstack-docs.pages.dev
Branch Preview URL: https://doc-206-doc-rds-add-ssl-supp.localstack-docs.pages.dev

View logs

Copy link
Copy Markdown
Member

@cloutierMat cloutierMat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this to the documentation. I think we should probably be more forward about what we do not support, since this seems to indicate we have mostly full parity with aws, but only sslmode=require is supported and we do not enforce ssl as is suggested by force_ssl

Comment on lines +314 to +330
### Force SSL connections

To require every client to connect over SSL, set the `rds.force_ssl` parameter on a DB parameter group and associate it with your instance:

```bash
awslocal rds create-db-parameter-group \
--db-parameter-group-name force-ssl \
--db-parameter-group-family postgres17 \
--description "Force SSL connections"

awslocal rds modify-db-parameter-group \
--db-parameter-group-name force-ssl \
--parameters "ParameterName=rds.force_ssl,ParameterValue=1,ApplyMethod=pending-reboot"
```

Pass `--db-parameter-group-name force-ssl` when creating the DB instance, or attach the parameter group to an existing instance and reboot it.
Setting `rds.force_ssl=0` disables the SSL requirement, allowing clients to connect with `sslmode=disable`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not support this. Currently SSL is always enabled (like in AWS), but never enforced (force-ssl=1 is ignored)

Comment on lines +332 to +334
:::note
The `pg_stat_ssl` view always reports `ssl = false`, even when the client connection is encrypted.
:::
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could enhance this note with the technical reason why it won't?

Suggested change
:::note
The `pg_stat_ssl` view always reports `ssl = false`, even when the client connection is encrypted.
:::
:::note
As we are terminating the SSL connection at the proxy, the PostgreSQL `pg_stat_ssl` view always reports `ssl = false`, even when the client connection is encrypted.
:::


## SSL/TLS Support

LocalStack's RDS PostgreSQL emulation supports SSL/TLS-encrypted client connections, so you can test applications that require `sslmode=require` (or stricter modes) the same way they would connect to AWS RDS.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not currently support stricter mode

PGPASSWORD=$MASTER_PW psql "host=$HOST port=$PORT dbname=$DB_NAME user=$MASTER_USER sslmode=require"
```

The DB instance uses a self-signed certificate, so clients that pin certificate authorities (`sslmode=verify-ca` or `sslmode=verify-full`) will need to disable certificate verification or supply their own trust anchors.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sslmode=verify-ca or sslmode=verify-full currently not supported

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