Skip to content

ref(auth): Simplify dashboard scopes to read and write - #129012

Merged
DominikB2014 merged 1 commit into
masterfrom
dominikbuszowiecki/eng-8922-simplify-dashboard-scopes-to-dashboardread-and
Oct 28, 2026
Merged

DominikB2014 merged 1 commit into
masterfrom
dominikbuszowiecki/eng-8922-simplify-dashboard-scopes-to-dashboardread-and

Conversation

@DominikB2014

Copy link
Copy Markdown
Contributor

We're starting dashboards with read/write scopes instead of full CRUD, and can make them more granular later. This replaces dashboard:create, dashboard:update and dashboard:delete with dashboard:write:

  • dashboard:read lists and views dashboards.
  • dashboard:write creates, updates and deletes dashboards, and implies dashboard:read.

Changes

  • SENTRY_SCOPES, GRANULAR_SCOPES, the scope hierarchy, scope sets, ApiScopes and the granular roles in conf/server.py now list dashboard:read and dashboard:write.
  • The org:read translation adds dashboard:read and dashboard:write.
  • The OAuth consent screen shows Dashboards with Read and Write.
  • Dashboard endpoints accept dashboard:write for POST, PUT and DELETE, and the starred endpoint accepts it for PUT. OrganizationDashboardsCreatePermission only existed to accept dashboard:create, so it's removed.

Rollout

  • Getsentry's granular roles and the granular token UI already use dashboard:write. Neither was updated for the dashboard:update rename (ref(auth): Rename dashboard:write scope to dashboard:update #128801), so this restores update access for members of flagged orgs and makes the token UI's Write level work again.
  • Follow-ups: a getsentry PR removes dashboard:create and dashboard:delete from its granular roles, and a frontend PR offers only Read and Write. Neither is needed for this PR to work.
  • Stored tokens holding dashboard:create, dashboard:update or dashboard:delete lose dashboard access. The granular scope flags are only enabled for test orgs and users, so these are test tokens.

Refs ENG-8922

Replace dashboard:create, dashboard:update and dashboard:delete with dashboard:write. dashboard:read covers viewing dashboards, and dashboard:write covers creating, updating and deleting them. The scope lists, hierarchy, granular roles, OAuth consent groups, org:read translation and dashboard endpoint scope maps are updated. The separate create permission is no longer needed.

Refs ENG-8922
@linear-code

linear-code Bot commented Oct 28, 2026

Copy link
Copy Markdown

ENG-8922

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 28, 2026
@DominikB2014
DominikB2014 marked this pull request as ready for review October 28, 2026 15:42
@DominikB2014
DominikB2014 requested review from a team as code owners October 28, 2026 15:42
@DominikB2014
DominikB2014 requested review from skaasten and removed request for a team October 28, 2026 15:42
@github-actions

Copy link
Copy Markdown
Contributor

decision-model-linter

security

src/sentry/dashboards/endpoints/organization_dashboards_starred.py

  • warn allowsWritesWithoutWriteAccess = TRUE (0.81): Write methods that change shared data should require write or admin scopes, or have an explicit permission check. This file lets read-only or unauthenticated callers use one. If that's intended, add a comment explaining why.

decision-model-linter: 17 calls on 6 files, 36,237 input tokens, $0.0015, model typesafe/jev-1.13-20260917

@DominikB2014
DominikB2014 merged commit 3208480 into master Oct 28, 2026
90 checks passed
@DominikB2014
DominikB2014 deleted the dominikbuszowiecki/eng-8922-simplify-dashboard-scopes-to-dashboardread-and branch October 28, 2026 17:00
DominikB2014 added a commit that referenced this pull request Oct 28, 2026
)

Dashboard scopes are simplified to `dashboard:read` and
`dashboard:write` in #129012. The granular token UI now offers
Dashboards as Read or Write, and Write requests `dashboard:read` and
`dashboard:write`.

Today the Write level also requests `dashboard:create`, which #129012
unregisters, so creating such a token would fail. **Merge after #129012
is deployed.** Until then, Write requests `dashboard:write`, which isn't
registered yet.

The UI is behind `organizations:granular-permission-scopes-ui`.

Refs ENG-8922
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.

2 participants