Jiffy

RBAC Capability Matrix

Sprint 76 (F88) introduces org-scoped RBAC backed by the org_role table. Five roles, hard-gated on 12 sensitive write routes. This doc is the canonical source for "what role can do what."

Roles

RoleIntended persona
adminCustomer security owner / tenant admin.
security_leadAppSec or DevSecOps lead.
analystHands-on triage analyst.
viewerRead-only stakeholder (exec / auditor).
auditorRead-only with audit-log access.

The first user in an org is auto-promoted to admin via DB trigger; everyone else defaults to analyst on join.

Capability matrix

Capabilityviewerauditoranalystsecurity_leadadmin
Read issues / attack pathsYYYYY
Read audit logYYYY
Acknowledge issueYYY
Close critical issueYY
Apply attack-path remediationYY
Tune watchlistsYYY
Tune framework mappings / AIL thresholdYY
Rotate signing / API key / webhookY
Agentgateway configY
Reveal webhook secretY
Change RBAC grantsY
Download compliance evidence bundleJiffy staff only

Retrofit routes (Sprint 76 coverage)

The 12 canonical sensitive write routes in the codebase, their method(s), and the role(s) that are permitted:

#RouteMethod(s)Permitted roles
1/api/settings/api-keysPOSTadmin
2/api/settings/api-keys/[id]/rotatePOSTadmin
3/api/settings/api-keys/[id]DELETEadmin
4/api/settings/webhooksPOSTadmin, security_lead
5/api/settings/webhooks/[id]DELETEadmin, security_lead
6/api/settings/webhooks/[id]/reveal-secretPOSTadmin
7/api/admin/signing-keysPOST (create/rotate)Jiffy staff (implicit admin)
8/api/admin/signing-keys/[id]/revokePOSTJiffy staff (implicit admin)
9/api/v1/critical-issues/[id]/acknowledgePOSTadmin, security_lead, analyst
10/api/v1/critical-issues/[id]/closePOSTadmin, security_lead
11/api/settings/policy/ail-thresholdPUTadmin, security_lead
12/api/settings/watchlistsPOST, DELETEadmin, security_lead, analyst
13/api/settings/frameworksPUTadmin, security_lead
14/api/settings/agentgatewayPOSTadmin

(The signing-keys pair is split across rows 7-8 for readability; the canonical count per the Sprint 76 contract is "12 sensitive write routes" — signing-keys counts as one.)

Enforcement mechanics

  • web/src/lib/auth/rbac.ts — canonical requireOrgRole(role | role[]) helper.
  • web/scripts/check-rbac-retrofit.ts — CI gate asserts every retrofit route calls one of requireOrgRole / adminGate / requireJiffyStaff.
  • audit-coverage gate (Sprint 32) continues to enforce that every retrofit route emits a logAudit() call on success.

Attack-path remediation application is gated at the template layer; when that endpoint ships, it joins this table without requiring a doc revision.