fix(db): make Resources.DB sslmode configurable (dev-sim TLS)#132
Merged
Conversation
The vended-credential pool hardcoded sslmode=require (correct for prod's RDS Proxy), so a local dev-sim Postgres with no TLS refused every deployed-module DB connection. Default stays require; the dev runner sets MS_MODULE_DB_SSLMODE=disable. Unset always resolves to the secure default. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Resources.DB pool (
db/pool_cache.gocreatePool) hardcodedsslmode=require. That's correct for prod (the RDS Proxy endpoint mandates TLS), but a local dev-sim Postgres has no TLS, so every deployed-module DB connection failed withtls error: server refused TLS connection.Fix
Read
MS_MODULE_DB_SSLMODE, defaulting torequire. The dev runner setsMS_MODULE_DB_SSLMODE=disable. Unset always resolves to the secure default — prod behaviour is unchanged.Surfaced while bringing the local stack onto merged main (the decision-13 Resources.DB vend path). Pairs with a compose change setting the env on the dev runner.
🤖 Generated with Claude Code