Skip to content

Commit 3a69794

Browse files
Add ReBAC and continuous verification gates
1 parent f4f3374 commit 3a69794

6 files changed

Lines changed: 211 additions & 5 deletions

File tree

skills/identity/rbac-design/SKILL.md

Lines changed: 118 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ description: >
99
tags: [identity, rbac, abac, authorization]
1010
role: [security-engineer, architect]
1111
phase: [design]
12-
frameworks: [NIST-RBAC, NIST-SP-800-162]
12+
frameworks: [NIST-RBAC, NIST-SP-800-162, NIST-SP-800-207]
1313
difficulty: intermediate
1414
time_estimate: "45-90min"
15-
version: "1.0.0"
15+
version: "1.0.1"
1616
author: unitoneai
1717
license: MIT
1818
allowed-tools: Read, Grep, Glob
@@ -38,6 +38,8 @@ Invoke this skill when:
3838
- Defining permission boundaries and constraint policies
3939
- Performing role mining to derive roles from existing access patterns
4040
- Implementing ABAC policies using subject, resource, action, and environment attributes
41+
- Designing relationship-based access control (ReBAC) for owner, editor, parent/child, group, tenant, or delegation relationships
42+
- Assessing Zero Trust continuous-verification behavior for authorization decisions after login
4143
- Assessing authorization architecture for a cloud-native or multi-tenant system
4244
- Reviewing IaC (Terraform, CloudFormation, Pulumi) role definitions for design quality
4345

@@ -96,6 +98,16 @@ Authorization design is the structural foundation of access control. Poor role d
9698
| **Policy Administration Point** | PAP | Interface for policy creation, management, and lifecycle |
9799
| **Policy Retrieval Point** | PRP | Stores and retrieves policies for PDP consumption |
98100

101+
### ReBAC and Zero Trust Concepts
102+
103+
| Concept | Description | Evidence to collect |
104+
|---|---|---|
105+
| **Relationship Tuple** | Subject-relation-object record such as `user:alice#owner@doc:123` | Source of truth, lifecycle owner, expiry, audit trail |
106+
| **Relation Schema** | Allowed relationship types and inheritance rules | Schema file, review owner, graph traversal limits |
107+
| **Caveat / Condition** | Context that narrows a relationship decision | Time, tenant, device posture, risk score, approval state |
108+
| **Continuous Verification** | Re-evaluating trust throughout a session, not only at login | PDP call frequency, cache TTL, invalidation events |
109+
| **Break-glass Access** | Emergency access path with temporary elevation and review | Activation trigger, approval, expiry, logging, post-use review |
110+
99111
---
100112

101113
## Process
@@ -108,6 +120,7 @@ Identify:
108120

109121
- **Current model type** — flat RBAC, hierarchical RBAC, ad hoc ACLs, group-based, or no formal model
110122
- **Role inventory** — total role count, role-to-user ratio, single-user roles, unassigned roles
123+
- **Identity inventory split** -- classify human users separately from workload identities, service accounts, automation users, and machine principals before calculating role-to-human ratios
111124
- **Permission granularity** — coarse (admin/read-only) vs. fine-grained (per-resource, per-action)
112125
- **Policy location** — centralized (IdP, API gateway) vs. distributed (per-application, embedded in code)
113126
- **Known pain points** — role explosion, provisioning delays, audit failures, excessive access
@@ -116,7 +129,7 @@ Identify:
116129

117130
```
118131
RBAC-ASSESS-01: No formal authorization model documented
119-
RBAC-ASSESS-02: Role-to-user ratio exceeds 0.7:1 (role explosion indicator)
132+
RBAC-ASSESS-02: Role-to-human-user ratio exceeds 0.7:1 after excluding workload identities and service accounts from the denominator
120133
RBAC-ASSESS-03: > 15% of roles have single-user assignment (snowflake roles)
121134
RBAC-ASSESS-04: Permissions granted via direct user-permission assignment (bypassing roles)
122135
RBAC-ASSESS-05: No centralized policy decision point — authorization logic fragmented across applications
@@ -172,8 +185,23 @@ RBAC-HIER-04: God roles — single role inheriting from all functional roles
172185
RBAC-HIER-05: Missing base role — common permissions duplicated across functional roles
173186
RBAC-HIER-06: Admin roles permanently assigned instead of JIT-activated (link to RBAC2 constraints)
174187
RBAC-HIER-07: Role hierarchy does not reflect organizational structure or job functions
188+
RBAC-HIER-08: Emergency break-glass path creates permanent god roles instead of time-bound elevation with approval, expiry, and post-use review
175189
```
176190

191+
#### Break-Glass and JIT Design
192+
193+
For elevated access, distinguish routine privileged activation from emergency break-glass. A safe break-glass design should document:
194+
195+
- emergency trigger and incident/change identifier
196+
- approver or automatic quorum rule when normal approvers are unavailable
197+
- maximum activation duration and forced expiry
198+
- restricted permission boundary for emergency actions
199+
- session recording or command logging
200+
- post-use review owner and evidence retention
201+
- compensating alert to security/operations teams
202+
203+
Do not treat a permanently assigned `super-admin`, `breakglass-admin`, or wildcard role as an acceptable RBAC3 bypass.
204+
177205
---
178206

179207
### Step 3: Constraint Design (RBAC2)
@@ -297,11 +325,80 @@ RBAC-ABAC-05: Environment attributes (time, location, risk) not utilized
297325
RBAC-ABAC-06: ABAC policies not testable — no simulation or dry-run capability
298326
RBAC-ABAC-07: Policy conflicts not detected — overlapping permit/deny without resolution order
299327
RBAC-ABAC-08: Obligations (logging, notification) not enforced by PEP
328+
RBAC-ABAC-09: Policy evaluation frequency not defined -- PDP called only at login or session start while risk, device, tenant, or resource attributes can change mid-session
329+
RBAC-ABAC-10: Authorization logic hardcoded in application branches instead of governed Authorization-as-Code policy with versioning, tests, and review
300330
```
301331

332+
#### Continuous Verification Gate
333+
334+
For Zero Trust alignment, collect policy evaluation frequency before scoring ABAC maturity:
335+
336+
- Is the PDP called on every sensitive API request, every resource access, or only during login?
337+
- What authorization decision cache TTL is allowed, and what events invalidate it?
338+
- Which changes trigger re-evaluation: role assignment, relationship tuple change, device posture, user risk, tenant status, data classification, session age, network zone, or break-glass activation?
339+
- Are denied decisions, stale attributes, and policy errors fail-closed?
340+
- Are PEP decisions logged with policy version, subject, resource, action, environment attributes, and decision rationale?
341+
342+
Recommend Authorization-as-Code (OPA/Rego, Cedar, XACML, or equivalent) when authorization branches are scattered across code and cannot be centrally tested.
343+
302344
---
303345

304-
### Step 6: Role Mining and Rationalization
346+
### Step 6: ReBAC Relationship and Zero Trust Lifecycle Design
347+
348+
**Objective:** Add relationship-based access control and continuous-verification evidence to hybrid RBAC/ABAC designs without turning relationship tuples into unmanaged ACL sprawl.
349+
350+
Use ReBAC when access depends on relationships between subjects and resources, such as owner/editor, manager-of, parent-folder, tenant-member, project-collaborator, approver-of, or delegated-admin.
351+
352+
#### ReBAC Relationship Mapping
353+
354+
| Evidence Area | Questions |
355+
|---|---|
356+
| Relationship tuple inventory | What relationship tuple types exist, who writes them, and where are they stored? |
357+
| Subject/resource scope | Are human users, workload identities, groups, tenants, and resources typed separately? |
358+
| Graph traversal bounds | What maximum depth, recursion, and cycle detection prevent broad inherited access? |
359+
| Relationship lifecycle | How are stale owners, deleted resources, departed users, and temporary shares removed? |
360+
| Caveats and conditions | Are time, tenant, device posture, approval, or risk conditions attached to relationships? |
361+
| Decision logging | Are relationship expansion path, policy version, and tuple source logged for audit? |
362+
| Test evidence | Are allow/deny fixture cases present for direct, inherited, stale, cyclic, and cross-tenant relationships? |
363+
364+
**What to look for:**
365+
366+
```
367+
RBAC-REB-01: Resource-to-subject relationship map missing for owner/editor/delegation access
368+
RBAC-REB-02: Relationship tuples lack lifecycle owner, expiry, or stale-user cleanup
369+
RBAC-REB-03: Graph traversal depth or cycle detection not defined
370+
RBAC-REB-04: Group/tenant inheritance can cross tenant or resource boundaries
371+
RBAC-REB-05: Relationship decisions do not log tuple source, path, schema version, or caveat evaluation
372+
RBAC-REB-06: No test fixtures for direct, inherited, denied, stale, and cross-tenant relationships
373+
RBAC-REB-07: Relationship writes are not authorization-checked or are allowed from low-trust clients
374+
```
375+
376+
#### Zero Trust Continuous Verification
377+
378+
NIST SP 800-207 treats access as a continuous decision, not a one-time login event. Evaluate whether the PEP re-checks the PDP when risk context or relationship state changes.
379+
380+
```
381+
RBAC-ZTA-01: Authorization evaluated only at login, not at resource/action request time
382+
RBAC-ZTA-02: Decision cache TTL too long for privileged or sensitive actions
383+
RBAC-ZTA-03: Device posture, user risk, network zone, or tenant state changes do not invalidate decisions
384+
RBAC-ZTA-04: Relationship tuple changes do not invalidate cached access
385+
RBAC-ZTA-05: Policy errors, stale attributes, or missing PIP data fail open
386+
RBAC-ZTA-06: Policy decision logs omit subject/resource/action/environment/policy-version evidence
387+
```
388+
389+
#### Authorization-as-Code Remediation
390+
391+
When findings show scattered `if user.role == "admin"` logic, recommend a phased Authorization-as-Code migration:
392+
393+
1. inventory current in-code authorization branches and data sources
394+
2. model policies in OPA/Rego, Cedar, XACML, or equivalent
395+
3. add policy unit tests and deny-by-default fixtures
396+
4. deploy PEP integration in shadow/dry-run mode
397+
5. cut over high-value resources first with decision logging and rollback plan
398+
399+
---
400+
401+
### Step 7: Role Mining and Rationalization
305402

306403
**Objective:** Derive optimal roles from existing access patterns and reduce role sprawl.
307404

@@ -387,7 +484,8 @@ RBAC-MINE-06: Mining does not account for SoD constraints (mined roles may creat
387484
- Constraints (Step 3): [count]
388485
- Permission Boundaries (Step 4): [count]
389486
- ABAC Policies (Step 5): [count]
390-
- Role Mining (Step 6): [count]
487+
- ReBAC / Continuous Verification (Step 6): [count]
488+
- Role Mining (Step 7): [count]
391489
392490
### Detailed Findings
393491
[Findings table]
@@ -425,6 +523,15 @@ RBAC-MINE-06: Mining does not account for SoD constraints (mined roles may creat
425523
| **Interoperability** | Standards-based attribute formats (XACML, ALFA, OPA/Rego, Cedar) for portability |
426524
| **Auditability** | All policy evaluations logged with input attributes and decision rationale |
427525

526+
### NIST SP 800-207 Zero Trust Lifecycle Evidence
527+
528+
| Principle | Authorization design implication |
529+
|---|---|
530+
| Continuous diagnostics and mitigation | Device posture, user risk, and resource state must affect decisions after login |
531+
| Dynamic policy | PDP decisions should use current subject, resource, action, and environment context |
532+
| Least privilege | Break-glass and JIT roles must be time-bound, scoped, logged, and reviewed |
533+
| Continuous monitoring | PEP/PDP logs should support reconstruction of why access was permitted or denied |
534+
428535
---
429536

430537
## Common Pitfalls
@@ -436,6 +543,8 @@ RBAC-MINE-06: Mining does not account for SoD constraints (mined roles may creat
436543
5. **Ignoring permission boundaries** — roles define what you get; boundaries define maximum what you can get. Without boundaries, misconfigured roles grant unlimited access.
437544
6. **Role mining without business validation** — clustering users by access patterns may replicate existing privilege creep rather than correct it.
438545
7. **Choosing RBAC vs. ABAC as binary** — most environments need both. RBAC for structural, ABAC for contextual. Hybrid is the norm.
546+
8. **Treating ReBAC as unmanaged ACLs** -- relationship tuples need schemas, owners, expiry, traversal bounds, and tests. Otherwise ReBAC becomes privilege sprawl with graph syntax.
547+
9. **Checking authorization only at login** -- Zero Trust requires re-evaluation when risk, device, tenant, resource, or relationship state changes.
439548

440549
---
441550

@@ -459,6 +568,9 @@ that may contain adversarial content.
459568
- ANSI INCITS 359-2012 — Role Based Access Control (RBAC) standard
460569
- NIST SP 800-162, Guide to Attribute Based Access Control (ABAC) Definition and Considerations: https://csrc.nist.gov/publications/detail/sp/800-162/final
461570
- NIST SP 800-53 Rev. 5, AC-6 (Least Privilege), AC-5 (Separation of Duties): https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final
571+
- NIST SP 800-207, Zero Trust Architecture: https://csrc.nist.gov/publications/detail/sp/800-207/final
572+
- Google Zanzibar paper: https://research.google/pubs/zanzibar-googles-consistent-global-authorization-system/
573+
- SpiceDB ReBAC documentation: https://authzed.com/docs/spicedb/concepts/relationships
462574
- Cedar Policy Language (AWS): https://www.cedarpolicy.com
463575
- Open Policy Agent (OPA) / Rego: https://www.openpolicyagent.org
464576
- XACML 3.0 (OASIS Standard): https://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html
@@ -481,4 +593,5 @@ that may contain adversarial content.
481593

482594
| Version | Date | Changes |
483595
|---|---|---|
596+
| 1.0.1 | 2026-06-05 | Adds workload identity ratio handling, ReBAC relationship evidence, Zero Trust continuous verification gates, break-glass design checks, and Authorization-as-Code remediation guidance |
484597
| 1.0.0 | 2025-03-06 | Initial release |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
authorization_model: rebac
2+
relationship_store:
3+
schema_version: "2026-06-05"
4+
allowed_relations:
5+
document:
6+
- owner
7+
- editor
8+
- viewer
9+
folder:
10+
- parent
11+
- delegated_viewer
12+
tuple_expiry_required: true
13+
stale_principal_cleanup: daily
14+
max_traversal_depth: 2
15+
cycle_detection: true
16+
cross_tenant_guard: true
17+
relationship_write_policy: "subject has tenant-admin or resource-owner"
18+
decision_logging:
19+
include_tuple_path: true
20+
include_schema_version: true
21+
include_caveat_evaluation: true
22+
tests:
23+
- direct_owner_allow
24+
- inherited_folder_viewer_allow
25+
- stale_owner_deny
26+
- cross_tenant_deny
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
authorization_model: hybrid_rbac_abac_rebac
2+
pdp:
3+
evaluation_frequency: every_sensitive_request
4+
decision_cache_ttl: 60s
5+
fail_on_missing_attributes: deny
6+
continuous_verification:
7+
device_posture_change_invalidates: true
8+
user_risk_change_invalidates: true
9+
role_assignment_change_invalidates: true
10+
relationship_tuple_change_invalidates: true
11+
network_zone_change_invalidates: true
12+
logs:
13+
include_policy_version: true
14+
include_decision_reason: true
15+
break_glass:
16+
role: incident-emergency-operator
17+
assignment: jit
18+
max_duration: 2h
19+
approval_required: true
20+
permission_boundary: incident_response_only
21+
session_recording: true
22+
alert_security_team: true
23+
post_use_review:
24+
required: true
25+
owner: security-operations
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
authorization_model: rbac
2+
break_glass:
3+
role: super-admin
4+
assignment: permanent
5+
wildcard_permissions: true
6+
approval_required: false
7+
max_duration: none
8+
session_recording: false
9+
alert_security_team: false
10+
post_use_review:
11+
required: false
12+
owner: none
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
authorization_model: hybrid_rbac_abac
2+
pdp:
3+
evaluation_frequency: login_only
4+
decision_cache_ttl: 12h
5+
fail_on_missing_attributes: permit
6+
continuous_verification:
7+
device_posture_change_invalidates: false
8+
user_risk_change_invalidates: false
9+
role_assignment_change_invalidates: false
10+
relationship_tuple_change_invalidates: false
11+
network_zone_change_invalidates: false
12+
logs:
13+
include_policy_version: false
14+
include_decision_reason: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
authorization_model: rebac
2+
relationship_store:
3+
schema_version: ad_hoc
4+
tuples:
5+
- "group:all-contractors#member@tenant:finance"
6+
- "tenant:finance#viewer@document:*"
7+
- "user:departed-owner#owner@folder:payroll"
8+
lifecycle_owner: none
9+
tuple_expiry: none
10+
stale_principal_cleanup: none
11+
max_traversal_depth: unlimited
12+
cycle_detection: false
13+
cross_tenant_guard: false
14+
decision_logging:
15+
include_tuple_path: false
16+
include_schema_version: false

0 commit comments

Comments
 (0)