Repository navigation
Gate the dashboard API by the permission of the data each section shows #8561
Copy link
Copy link
Closed
Description
Problem
Every dashboard endpoint requires the single dashboard:view permission:
GET /dashboard/overview/dashboard/workflow-trends/dashboard/recent-activity/dashboard/needs-attention/dashboard/workflow-hotspots
Elsa Studio is making the Dashboard reachable by every signed-in user, with each widget gated by the permission of the data it shows (elsa-workflows/elsa-studio#1099). The design decisions are recorded on that issue. For that gating to be real and not cosmetic, the API has to apply the same rule.
Change
Keep dashboard:view as the permission for the whole operational overview, so existing roles keep working. Also accept the permission of the data a section shows:
| Endpoint / section | Readable with dashboard:view or |
|---|---|
overview → WorkflowInstances metrics, and the metric cards and panels built from them |
workflows/instances:view |
overview → Runtime status |
workflows/runtime:view |
overview → Diagnostics.StructuredLogs |
diagnostics/structured-logs:view |
overview → Diagnostics.ConsoleLogs |
diagnostics/console-logs:view |
workflow-trends, recent-activity, needs-attention, workflow-hotspots |
workflows/instances:view |
overviewrequires an authenticated caller (anonymous callers still get 401). A section the caller may not read is returned withCapability = Unauthorizedand no data, using the existingDashboardCapabilityStatus.Unauthorized. The overview therefore never leaks data, and never refuses a user who can read part of it.- Metric cards and panels that summarise a section follow that section's permission.
- Contributions from other modules declare the permission of the data they add, so the same filtering applies to them.
- The single-purpose endpoints answer 403 unless the caller holds
dashboard:vieworworkflows/instances:view. RequirePermissionhas no "any of" form. Check permissions in the handler with the evaluator, usingHttpContext.GetPermissionEvaluator()from fix(authorization): let a definition viewer open the designer #8556. WhenEndpointSecurityOptions.SecurityIsEnabledis false, allow everything, asRequirePermissiondoes.- Update the
dashboardpermission description, and document the change indoc/migrations/authorization-model.md.
Acceptance criteria
- A caller with only
workflows/instances:viewgets the instance metrics, trends, recent activity, needs-attention and hotspots. - The same caller gets the runtime and diagnostics sections of the overview marked
Unauthorized, with no data. - A caller with only
diagnostics/structured-logs:viewgets that summary and every other overview section markedUnauthorized. The single-purpose endpoints refuse them with 403. dashboard:viewalone still returns everything, as today.- Anonymous callers get 401 on every dashboard endpoint.
- Tests follow
InstalledFeaturesAuthorizationTestsandDescriptorCatalogAuthorizationTests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
sfmskywalker commentedon Sep 30, 2026
Picking this up — autonomous delivery started.
feat(dashboard): gate each dashboard section by the permission of its…
sfmskywalker commentedon Oct 1, 2026
Delivered in #8562 (80cb2a9) on release/3.9.0.
dashboard:viewstill reads everything. Each overview section, and the four workflow-instance endpoints, also accept the permission of their data.Unauthorizedwith no data, and a caller who can read nothing gets no deployment metadata.Unavailablewith no figures, so partial totals are never presented as complete.dashboard:view. On the overview only, contributors are skipped when the caller can read none of their declared permissions.doc/migrations/authorization-model.mddescribes all of this.Studio counterpart: elsa-workflows/elsa-studio#1103.
feat(dashboard): gate each dashboard section by the permission of its…