Skip to content

ref(seer): Narrow request.user in Seer endpoints - #129420

Draft
gricha wants to merge 1 commit into
ref/sa-narrow-issuesfrom
ref/sa-narrow-seer
Draft

gricha wants to merge 1 commit into
ref/sa-narrow-issuesfrom
ref/sa-narrow-seer

Conversation

@gricha

@gricha gricha commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Seer endpoints read the caller through sentry.auth.principal: user ids sent to Seer, run lookups and coding-agent polling use acting_user_id(); autofix, push-changes and issue summary get acting_user(); the agent-approve grant uses require_user().

  • A service account can start and read autofix runs (new test), and issue summary, issue-view titles, chat suggestions and supergroups send Seer no user id instead of a service-account id. Continuing or updating a chat and search-agent state deny it like token callers.
  • Users, agents and token callers see no change.

Left: organization_agent_token.py passes the caller to resolve_minting_principal, which should reject callers with no user explicitly; today a service account is denied only because its id fails as an int.

@gricha
gricha added this pull request to stack #129364 October 31, 2026 02:27
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 31, 2026
@sentry

sentry Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 780 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@gricha
gricha removed this pull request from stack #129364 November 1, 2026 04:24
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from a0a3dd2 to aaeb5eb Compare November 1, 2026 04:24
@gricha
gricha added this pull request to stack #129440 November 1, 2026 04:24
Seer endpoints read the caller through `sentry.auth.principal`: user ids sent to Seer, run lookups and coding-agent polling use `acting_user_id()`; autofix, push-changes and issue summary get `acting_user()`; the agent-approve grant uses `require_user()`.

- A service account can start and read autofix runs (new test), and issue summary, issue-view titles, chat suggestions and supergroups send Seer no user id instead of a service-account id. Continuing or updating a chat and search-agent state deny it like token callers.
- Users, agents and token callers see no change.

Left: `organization_agent_token.py` passes the caller to `resolve_minting_principal`, which should reject callers with no user explicitly; today a service account is denied only because its id fails as an int.
@gricha
gricha force-pushed the ref/sa-narrow-seer branch from aaeb5eb to 8196ec2 Compare November 1, 2026 04:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant