Skip to content

docs(capability-matrix): recommend exponential backoff for forced JWK Set refetches in the get_claims spec - #178

Merged
QuintinWillison merged 1 commit into
mainfrom
auth.session.get_claims-refetch-backoff
Sep 14, 2026
Merged

QuintinWillison merged 1 commit into
mainfrom
auth.session.get_claims-refetch-backoff

Conversation

@QuintinWillison

Copy link
Copy Markdown
Member

🤖 Claude's Summary

Step 4 of the get_claims spec mandates a JWK Set refetch on any unknown kid with no rate limit, so a storm of attacker-minted key ids can drive one discovery fetch per bogus token against the project's JWKS endpoint. Every SDK implementing the step as written inherits that amplification, and supabase-js currently refetches unconditionally on every miss.

The amendment recommends exponential backoff on forced refetches: while consecutive forced fetches fail to resolve the kid that forced them, the wait before the next one doubles (for example one second up to a sixteen-second backstop), and a fetch that resolves its kid clears the wait. Misses inside the wait resolve as unknown and take the existing server-side verification fallback, so tokens signed by a freshly rotated key keep verifying throughout.

Surfaced during review of the Go SDK's implementation in supabase/supabase-go#78.

… Set refetches in the `get_claims` spec

Step 4 of the get_claims spec mandates a JWK Set refetch on any unknown `kid` with no rate limit, so a storm of attacker-minted key ids can drive one discovery fetch per bogus token against the project's JWKS endpoint. Every SDK implementing the step as written inherits that amplification, and supabase-js currently refetches unconditionally on every miss.

The amendment recommends exponential backoff on forced refetches: while consecutive forced fetches fail to resolve the `kid` that forced them, the wait before the next one doubles (for example one second up to a sixteen-second backstop), and a fetch that resolves its `kid` clears the wait. Misses inside the wait resolve as unknown and take the existing server-side verification fallback, so tokens signed by a freshly rotated key keep verifying throughout.

Surfaced during review of the Go SDK's implementation in supabase/supabase-go#78.

Co-authored-by: Claude <noreply@anthropic.com>
@QuintinWillison QuintinWillison self-assigned this Sep 14, 2026
@QuintinWillison QuintinWillison added the documentation Improvements or additions to documentation label Sep 14, 2026
@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 42692c63-8168-42cf-a04c-deeef57c29a9


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@QuintinWillison
QuintinWillison marked this pull request as ready for review September 14, 2026 14:32
@QuintinWillison
QuintinWillison requested a review from a team as a code owner September 14, 2026 14:32
@QuintinWillison
QuintinWillison merged commit b825ed6 into main Sep 14, 2026
7 checks passed
@QuintinWillison
QuintinWillison deleted the auth.session.get_claims-refetch-backoff branch September 14, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants