Repository navigation
feat(api): Let getsentry add API authentication classes - #127086
Merged
Merged
Conversation
Adds SENTRY_EXTRA_API_AUTHENTICATION, import paths of authentication classes tried before Sentry's own. getsentry will use it to accept Vercel's OIDC tokens from builds, so the Vercel code stays in getsentry. Also registers organizations:integrations-vercel-oidc-auth to gate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
they can't import sentry.api.base at the top level, even indirectly, or you get a circular import Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
markstory
approved these changes
Oct 13, 2026
3 tasks done
scttcper
added a commit
that referenced
this pull request
Oct 16, 2026
`AuthenticationMiddleware` doesn't know about `SENTRY_EXTRA_API_AUTHENTICATION` (#127086), so getsentry's Vercel build tokens get rate limited per IP instead of per org like the token they replace. The middleware now tries those classes first, and `get_rate_limit_key` uses the token's org when there's no `ApiToken` row. No change without getsentry, tested end to end in getsentry/getsentry#22522. refs https://linear.app/getsentry/issue/IE-89/rate-limit-vercel-build-tokens-per-org-not-per-ip Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
RudraPatel2003
pushed a commit
that referenced
this pull request
Oct 19, 2026
`AuthenticationMiddleware` doesn't know about `SENTRY_EXTRA_API_AUTHENTICATION` (#127086), so getsentry's Vercel build tokens get rate limited per IP instead of per org like the token they replace. The middleware now tries those classes first, and `get_rate_limit_key` uses the token's org when there's no `ApiToken` row. No change without getsentry, tested end to end in getsentry/getsentry#22522. refs https://linear.app/getsentry/issue/IE-89/rate-limit-vercel-build-tokens-per-org-not-per-ip Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
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.
Vercel Marketplace builds are moving from
SENTRY_AUTH_TOKENto short-lived OIDC tokens from Vercel. The class that checks them lives in getsentry (getsentry/getsentry#22439), this adds a hook so getsentry can put it in front of our token auth. Empty by default, also adds theorganizations:integrations-vercel-oidc-authflag.getsentry builds an AuthenticatedToken(kind="api_token") from the org’s Vercel internal integration, since there’s no ApiToken row behind it.