Skip to content

fix(db): make Resources.DB sslmode configurable (dev-sim TLS)#132

Merged
I-am-nothing merged 1 commit into
mainfrom
fix/module-db-sslmode-dev
Jul 3, 2026
Merged

fix(db): make Resources.DB sslmode configurable (dev-sim TLS)#132
I-am-nothing merged 1 commit into
mainfrom
fix/module-db-sslmode-dev

Conversation

@I-am-nothing

Copy link
Copy Markdown
Contributor

Problem

The Resources.DB pool (db/pool_cache.go createPool) hardcoded sslmode=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 with tls error: server refused TLS connection.

Fix

Read MS_MODULE_DB_SSLMODE, defaulting to require. The dev runner sets MS_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

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>
@I-am-nothing I-am-nothing merged commit ae6a174 into main Jul 3, 2026
1 check passed
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