Repository navigation
test(service-accounts): Add a token column to the service account auth matrix - #131473
Merged
Merged
Conversation
…h matrix Re-lands #131441 (reverted in c7135e4), which collided with #131251. Adds a service_account_token column next to the viewer-context column, so every service account row also runs with a bearer token for the same account. #131251 refuses service account tokens on POST to GroupAutofixEndpoint, so that row now expects user-required with token auth only. The viewer context still has to match the oracle. Refs ENG-9059 Co-Authored-By: Shaun Kaasten <[email protected]>
gricha
approved these changes
Nov 17, 2026
joshuarli
added a commit
that referenced
this pull request
Nov 24, 2026
…132105) Refreshes `.github/workflows/scripts/backend-test-durations.json` from recent master runs, following #129569. **Source data:** the per-file median of the `backend-test-durations-*` artifacts from three green full-suite master `backend.yml` runs: [45447921880](https://github.com/getsentry/sentry/actions/runs/45447921880), [45445395411](https://github.com/getsentry/sentry/actions/runs/45445395411) and [45442363055](https://github.com/getsentry/sentry/actions/runs/45442363055) (master `712e106928c` through `6a3df08320e`). All three ran 30 shards with 4 workers on `ubuntu-26.04`. The file is the unedited output of the `merge` then `median` commands in the `backend-test-durations.py` docstring. **What changed vs master** (last resync: #131174) - **25 test files added, 6 removed** (the drift trigger). The added files are all under 11s, the largest being `integrations/supabase/test_integration.py` (10.1s) and `integrations/supabase/test_client.py` (9.3s). The removed files, such as the three `api/endpoints/release_thresholds/*` tests, no longer exist on master. - **`seconds_per_test`:** 0.400 → 0.451 (+12.7%), the other drift trigger. - **Files in both versions:** total time +12.9% (19,640s → 22,178s). Four files moved by more than 25% and 30s: - `tests/sentry/seer/endpoints/test_organization_agent_token.py` 493.8s → 748.5s, +52% (runs: 748.5 / 761.8 / 657.2). This crosses the regression bar. Recent commits touching it include #129239, #131473 and #131113. - `tests/snuba/api/endpoints/test_organization_events_span_indexed.py` 208.8s → 262.2s (+26%) - `tests/relay_integration/test_integration.py` 136.7s → 65.3s and `tests/relay_integration/test_message_filters.py` 111.3s → 49.2s. Both drops line up with #131170. **Acceptance durations aren't refreshed here.** `acceptance-test-durations.json` (#132407) gets refreshed from the median of 3 full master `acceptance.yml` runs that upload `acceptance-test-durations-*`. No such run has finished yet, so the coverage-instrumented seed stays in place. The weekly resync replaces it once three exist. **Not changed:** `WORKER_SECONDS_PER_SHARD` and `TESTS_PER_SHARD`. Shared files shifted +12.9%, under the 15% bar for retuning the budget. Opened by the weekly backend test durations resync. <!-- junior-request-attribution:start --> via [automation `sched_24013c871420a6cbab8d518dae1de4ae`](https://junior-prod.sentry.dev/automations/sched_24013c871420a6cbab8d518dae1de4ae) · Run ID `sched_24013c871420a6cbab8d518dae1de4ae:1795248000000`, @joshuarli. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent-dispatch%3Adispatch_6819e6c570f111d16716e7c099e1d6bc --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_6819e6c570f111d16716e7c099e1d6bc) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_6819e6c570f111d16716e7c099e1d6bc/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Joshua Li <[email protected]>
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.
Re-lands #131441, which was reverted in c7135e47542 because it collided with #131251.
Service accounts can authenticate with a bearer token (#130914) as well as a viewer context. Before GA, both need to follow the same authorization rules. This adds a
service_account_tokencolumn next to the viewer-context column in the service account auth matrix, so every service account row also runs with a bearer token for the same account.#131251 makes POST to
GroupAutofixEndpointreturn 403user-requiredfor service account tokens. So the token is refused there, but the viewer context isn't:SERVICE_ACCOUNT_TOKEN_USER_REQUIREDlists rows that refuse only the token. Right now that's onlyGroupAutofix_post._assert_service_account_outcometakes the authentication. For those rows it expectsuser-requiredwith token auth, and the viewer context still has to match the oracle.OrganizationSeerAgentChatEndpointrefuses tokens the same way, but it isn't in the public matrix, so it isn't listed.Test-only change.
Refs ENG-9059
via @skaasten.
--
View Session [Sentry]