RBAC implementation patterns: API Gateway enforces authz via dedicated AuthZ service backed by Redis cache and auth_db (users/roles/permissions). OPA sidecar overlays ABAC. Admin role mutations write to auth_db, append to audit_log, publish invalidation events through pub/sub to all authz pods which DEL the user's cache key. Three scenarios: cached gateway check (hot path), hierarchical role inheritance with recursive CTE expansion on cache miss, and role revoke with sub-second cache invalidation contrasted against JWT-claims staleness.
RBAC connects users to roles and roles to permissions. Production implementations preserve role activation, hierarchy, separation of duty, tenant scope, administrative control, and revocation semantics instead of collapsing policy into ad hoc role strings.
| Component | Responsibility |
|---|---|
user | User |
session | Activated Role Session |
enforcement | Authorization Enforcement |
role-service | Role Assignment Service |
permission-store | Role-Permission Store |
hierarchy-store | Role Hierarchy |
sod-engine | Separation-of-Duty Constraints |
tenant-store | Tenant Scope |
audit-log | Administrative and Decision Audit |
role-admin | Constrained Role Administrator |
Topology edges represent authenticated or otherwise explicit communication paths. Responses reuse those physical paths in reverse; no response-only or bypass edges are added.
activate-least-role-set — Activate the least role setA session activates only the subset of assigned roles needed for the current task, reducing ambient authority.
role-hierarchy — Evaluate role hierarchy as a partial orderSenior roles inherit authorized permissions according to a reviewed hierarchy; cycles and accidental privilege amplification are rejected.
static-separation-of-duty — Static separation of dutyConflicting roles cannot be assigned to the same user when that assignment would violate the organizational constraint.
dynamic-separation-of-duty — Dynamic separation of dutyA user may hold multiple roles but cannot activate a conflicting combination in one session or transaction.
tenant-scoped-role — Scope role assignments by tenantThe label admin is not globally meaningful; assignment and permission resolution include tenant or organization identity.
revocation-and-cache — Propagate revocation to decision cachesRemoving a role assignment advances a policy version and invalidates active sessions or cached allows within a defined bound.
constrained-administration — Constrain role administrationPolicy administration is itself authorized and audited; a help-desk operator cannot grant a role above its delegated scope.
Введите числа или выберите пресет