Repository navigation
Reject access tokens issued before a per-user cutoff - #9990
Draft
harshithmullapudi wants to merge 1 commit into
Draft
harshithmullapudi wants to merge 1 commit into
harshithmullapudi wants to merge 1 commit into
Conversation
Adds nullable auth.users.tokens_valid_after. The API already loads the user row for every bearer request, so the check adds no query. Null means no effect.
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
harshithmullapudi
temporarily deployed
to
preview
November 18, 2026 23:09 — with
GitHub Actions
Inactive
Contributor
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
|
Preview update published for development build |
This branch was previously deployed
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.
Revoking a CLI token in the DB does not stop its 7-day JWT. This adds nullable
auth.users.tokens_valid_after.sessionFromOAuthBearerrejects a token whoseiatis before it. Null = no effect, other users untouched, JWKS key not rotated.apps/api/src/trpc/context.ts. It reuses the user row already loaded per request: no extra query.0199is a nullable column add with no default (metadata-only). It takes a brief ACCESS EXCLUSIVE lock onauth.users; the db-migrations checklist is not yet cleared, and the migration has not been run anywhere.verifyJWT(relay, realtime) andpackages/mcp/src/auth.tshave no DB access and still accept the token until expiry.bun test src/trpc/isIssuedBeforeCutoff(4 pass).Summary by cubic
Revoking a CLI token in the DB now stops its 7-day JWT instead of leaving it valid until expiry. This adds a nullable
auth.users.tokens_valid_aftercolumn;sessionFromOAuthBearerrejects any bearer token whoseiatpredates the user's cutoff. A null cutoff leaves behavior unchanged, other users are untouched, and no JWKS keys are rotated. The check lives inapps/api/src/trpc/context.tsand reuses the user row already loaded per request, so no extra query is added.Migration
0199adds the nullable column with no default and takes a brief ACCESS EXCLUSIVE lock onauth.users; it has not been run anywhere yet.Not covered
verifyJWT(relay, realtime) andpackages/mcp/src/auth.tshave no DB access and still accept the token until expiry.Written for commit 40df53b. Summary will update on new commits.