Skip to main content

Analytics — /rbac/analytics and /rbac/analytics/reports

The Analytics surface summarizes how RBAC is being used in this workspace. It is read-only and is driven entirely by the rbacAnalytics(scopeId:, dateRange:) query, which the service aggregates from permission audit logs and configuration counters.

There are two pages:

  • Overview — /rbac/analytics — all-time totals plus top actions / top actors
  • Usage reports — /rbac/analytics/reports — windowed view (7 / 30 / 90 days) with an export button

For the raw, per-event stream see the Audit Log.

Overview — /rbac/analytics​

Permission-check stats​

Four tiles across the top:

  • Total checks — every checkPermission / checkPermissions call that landed against this workspace
  • Access granted — the percentage of allow-decisions, with the absolute allowed count as a subtitle
  • Access denied — the absolute deny count
  • Active roles — number of roles in the workspace, with the total assignment count as a subtitle

System stats​

Three additional tiles:

  • Permission overrides — active PermissionOverride rows (actor-level grants/denials)
  • Registered resources — count of Resource rows with custom rules
  • Visibility rules — total active VisibilityRule rows across the workspace

Top Actions​

A ranked list of the most-checked resourceType:action combinations (e.g. project:read, file:update), sourced from analytics.topActions. The count column is the number of permission checks the service saw for that action over the analytics window. Use this to spot the actions that dominate the workspace's permission traffic.

Top Actors​

A ranked list of the actors with the most permission checks, with their actor type chip alongside. Sourced from analytics.topActors. Useful to identify noisy integrations or bots whose permissions might be miscalibrated.

Usage reports — /rbac/analytics/reports​

The reports view applies a windowed dateRange and compares the window to the all-time totals.

Window picker​

Toggle the time window: Last 7 Days, Last 30 Days, or Last 90 Days. Both the windowed and the all-time rbacAnalytics queries refire on change.

Period vs all-time​

For each stat (checks, allowed, denied, overrides, etc.), the page renders the windowed value plus a delta as a percentage of all-time. Use this to see "of all checks ever, X% landed in the last 30 days".

Export button​

The Export action calls createRbacExport({ entityTypes: ['rbac_roles', 'permission_audit_logs', 'rbac_change_logs'], dateRange: ... }). The export job is created in the workspace's export center; the page emits rbac.export.created on success. To pick up the completed file, open the workspace's export center surface — this UI does not poll for job completion.

Things you can do​

TaskHowPermission
View all-time analyticsOpen /rbac/analyticscanViewAnalytics
View windowed analyticsOpen /rbac/analytics/reports and pick a windowcanViewAnalytics
Refresh the dataRefresh in the page headercanViewAnalytics
Export the period as a jobExport in the reports pagecanViewAnalytics + canExport (export center policy)

Permissions you need​

Both routes require canViewAnalytics (PBAC rbac:read, or auth-level module-rbac:analytics:view; workspace admins/owners bypass). Mutations on this surface are limited to creating an export job, which is gated by the workspace export center, not by RBAC itself.

Tips​

  • Analytics aggregates are computed at query time from the permission audit log — they may lag a few seconds behind the live evaluator. Pull Refresh if a freshly run check has not appeared.
  • The 7 / 30 / 90 day windows are computed against the request time, not a fixed calendar bucket. If you need a calendar month, export and post-process; the UI does not currently expose custom ranges.
  • Empty Top Actions / Top Actors lists mean the service has not yet recorded checks in the selected window — fresh workspaces frequently look empty for a few days.
  • For a permission-decision trail of individual checks (not aggregates), use the Permission Checks tab on the Audit Log. For config changes (role created, override removed, etc.), use the Configuration Changes tab on the same page.