Repository navigation
fix(bff): require UPDATE in the pending-login managed-schema check - #118
Merged
Merged
Conversation
PostgresPendingLoginStore.Put is an INSERT ... ON CONFLICT DO UPDATE, which needs UPDATE on the table, but WithPendingLoginManagedSchema's start-up check verified only SELECT, INSERT and DELETE. A role granted exactly those passed the check and then failed every sign-in. The check now names UPDATE too, and the doc comment lists all four privileges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKRxaeYxyDhmt42cehLsGA
3 of 6 tasks
Resolve the CHANGELOG conflict with #117: keep both Unreleased entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKRxaeYxyDhmt42cehLsGA
ovander
pushed a commit
that referenced
this pull request
Oct 11, 2026
Resolve the CHANGELOG conflict with #118: the conformance entry stays under Added, the pending-login fix under Fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKRxaeYxyDhmt42cehLsGA
ovander
pushed a commit
that referenced
this pull request
Oct 11, 2026
Moves [Unreleased] under [1.26.0] - 2026-10-11 (#117 scopes, #118 pending-login UPDATE check, #119 conformance suite), updates the compare links and the README install snippet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKRxaeYxyDhmt42cehLsGA
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 and why
PostgresPendingLoginStore.Putis anINSERT … ON CONFLICT (state) DO UPDATE, which needs theUPDATEprivilege on the table. ButWithPendingLoginManagedSchema's start-up check verified onlySELECT,INSERTandDELETE(a slip from #111). A role granted exactly those three passed the check, then failed every sign-in atPut. This was found while moving the monitoring console's BFF to the managed schema, and confirmed in psql.UPDATE, as the session store's check already does.How it was tested
New
TestPostgresPendingLoginStore_ManagedSchemaNeedsUpdate:SELECT, INSERT, DELETE;UPDATEinstead;UPDATE.Fails without the fix, passes with it. Run against a local Postgres 16 with
TEST_DATABASE_URLset.go mod tidy && git diff --exit-code go.sumleavesgo.sumunchangedgo build ./...passesgo vet ./...passesgo test -race -count=1 -timeout=120s ./...passesgolangci-lint run ./...(v2.14.0) reports no issuegovulncheck ./...: not run locally (vuln.go.devis blocked here); CI runs it. No dependency change.A line is added under
## [Unreleased]inCHANGELOG.md(### Fixed)Compatibility
WithPendingLoginManagedSchema(), a role withoutUPDATEis now refused at start-up instead of failing at the first sign-in.🤖 Generated with Claude Code
https://claude.ai/code/session_01GKRxaeYxyDhmt42cehLsGA
Generated by Claude Code