Repository navigation
feat(sqlstore): report an unknown CIBA handle as not found - #997
Merged
Merged
Conversation
The backchannel store's lookup and decision for a handle it holds no request under wrapped only sqlstore.ErrNotFound, which the server doesn't recognise. Its inbox listing therefore reports an entry whose request is gone (expired and purged, say) as one it couldn't read. Both now also wrap storage.ErrBackchannelAuthenticationNotFound, so the listing leaves such an entry out and DenyBackchannelInteractions clears it. ErrNotFound is still wrapped, and the contract's optional subtests for the sentinel now run against both dialects. The sentinel first ships in fapigo v0.86.0, which sqlstore now requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The example uses sqlstore, which now requires fapigo v0.86.0, so its own requirement has to be at least that for its go.mod to be tidy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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.



This is the sqlstore half of the CIBA lookup not-found error. The root half,
storage.ErrBackchannelAuthenticationNotFound, shipped in fapigo v0.86.0 (#991).feat(sqlstore): report an unknown CIBA handle as not foundFor an unknown handle,
LookupBackchannelAuthenticationandDecideBackchannelAuthenticationnow wrapstorage.ErrBackchannelAuthenticationNotFoundas well assqlstore.ErrNotFound.Why it matters: since v0.86.0,
Server.ListBackchannelInteractionsskips an entry only when the store says its request is gone. Before this change, a sqlstore deployment saw such an entry reported as unreadable until it expired. Now the listing leaves it out again, andDenyBackchannelInteractionsclears it.sqlstore now requires fapigo v0.86.0.
examples/linked-accounts, which uses sqlstore, requires it too, in a separatechore(examples)commit. Without it, that example's go.mod wouldn't be tidy.Tests
LookupUnknownHandleWraps…andDecideUnknownHandleWraps….DecideAgainIsNotNotFoundpasses too.TestBackchannelDecisionsAndExpirychecks both wraps, and checks that a second decision doesn't wrap the new error.replacedropped.sqlstore-ciba-unknown-handle-wraps-notfound, which is killed.🤖 Generated with Claude Code