Per-tenant resource governance on the authenticator role (ADR 0007 Phase 0)#13
Merged
Merged
Conversation
…tor role ADR 0007 (Phase 0) — bound one tenant's blast radius on the shared cluster. Every provisioned authenticator role now gets, idempotently: - connection limit 20 (peak real usage ~7, well under max_connections 100) - statement_timeout 60s - idle_in_transaction_session_timeout 60s GoTrue connects as `postgres` (not the authenticator) and migrations run as superuser, so this bounds the data plane without touching auth or schema apply. Existing 27 tenant roles were backfilled out of band; this makes new projects born-governed. Co-Authored-By: Claude Opus 4.8 <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.
What
Every provisioned
*_authenticatorrole now gets, idempotently, on each provision:connection limit 20— peak real usage is ~7, well undermax_connections100statement_timeout 60sidle_in_transaction_session_timeout 60sWhy
ADR 0007 (Phase 0) — bound one tenant's blast radius on the shared cluster so a single tenant leaking connections or running a runaway/idle-in-transaction query can't lock out the whole fleet.
Safety
postgres(not the authenticator) → auth untouched.statement_timeoutnever blocks a schema apply.🤖 Generated with Claude Code