Repository navigation
docs(capability-matrix): add specs for auth.session - get_claims and get_user - #177
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Having implemented these in our new, official supabase-go SDK (incubating, internal for now). Co-Authored-By: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
QuintinWillison
marked this pull request as ready for review
September 11, 2026 14:09
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.
Coming out of work I'm doing on the Go SDK (currently internal, will be public later): supabase/supabase-go#78
I realised that there was a fair bit of complexity here, certainly in terms of order of operations, without a single place I could look (or could have looked) in to have it explained end to end. So this PR aims to address that.
🤖 Claude's Analysis, which led me to raise this PR...
What stood in for a spec: the research plan grounded behaviour in four independent source families and cross-checked them against each other:
supabase/authsource for the JWK Set handler, key configuration and token issuance - so our verifier matches what the server actually signs and publishes rather than what any client assumes.auth/integrationtest, including tamper tests, proving the implementation and the real server agree.Where the siblings were not consistent, the divergence was surfaced and resolved deliberately rather than papered over: Swift binds the verification algorithm from the matched JWK where js and Python dispatch from the attacker-controlled token header (we chose Swift's stance, which defeats algorithm confusion by construction), and Python's exact-string
HS256fallback check has a robustness gap an HS512 token would fall through (we route on the supported-set instead).My take: it was neither "obvious enough" nor "all consistent" - it was consistent in the large, divergent in the security-relevant details, and the research earned its keep precisely there. That said, a spec should exist for
get_claims: it is the most security-sensitive capability in the session group and the one where sibling behaviour genuinely differs. The matrix has a home for exactly this prose.