RBAC Policy Template: Roles, Permissions & Reviews
A copy-ready template for defining role-based access control policies: role definitions, assignment rules, approval workflow, review cadence, and break-glass handling.
Overview
Privilege creep is the access-control failure auditors find first: people change teams, collect roles, and nobody revokes the old ones. A Role-Based Access Control (RBAC) policy stops that drift by making the role model explicit — which roles exist, what each one grants, who is allowed to assign it, and when it gets reviewed.
Below is a full RBAC policy document, written to be copied and adapted. Fill in the bracketed placeholders, adapt the sample roles to your systems, and you’ve got an auditable access model that satisfies SOC 2, ISO 27001, and most internal security reviews. Sections 6–10 cover the parts most policies forget: separation of duties, the request workflow, offboarding, break-glass access, and exceptions.
When to Use
- You’re designing access control for a new application or a system that outgrew ad-hoc permissions.
- An audit or certification (SOC 2, ISO 27001, PCI DSS) requires a documented access model.
- Two or more teams share services and each one invented its own permission scheme.
- You’re migrating users away from direct permissions and need the target state written down.
- Onboarding takes days because nobody defined which role a new hire actually needs.
Skip this template when a single-user tool only needs allow/deny rules, or when access depends on relationships between objects — “users can edit documents they own” is a ReBAC or ACL problem, not a role problem. For attribute-driven decisions (time, location, device posture), look at the Implement ABAC recipe instead.
Prerequisites
- An inventory of systems, resources, and the actions each one supports.
- A list of job functions or team responsibilities — what people do, not their titles.
- Agreement on least-privilege: users get the minimum role that lets them work.
- An identity provider, directory, or platform that can map users and teams to groups.
- A place where the policy will live and evolve — a repository, a wiki with version history, or a document management system. Policies kept in slides die quietly.
Solution
The Template
Copy the sections below into your policy document and replace the bracketed placeholders.
1. Purpose and Scope
This policy governs access to [system names, environments, and data classifications]. It applies to all employees, contractors, and service accounts. Access is granted through named roles only; direct permission grants outside this policy require a documented exception approved by [risk committee / security team].
2. Policy Statement
All access to systems, data, and infrastructure is granted based on predefined roles. Roles align with job functions, least privilege, and separation of duties. Every assignment requires documented approval, is logged in the access register, and is reviewed on the cadence defined in section 7.
3. Role Definitions
| Role | Description | Permissions | Scope | Approval Required |
|---|---|---|---|---|
| viewer | Read-only access for reporting and investigation | read | All resources | Manager |
| editor | Modify configuration and non-production data | read, write | Non-production | Manager |
| operator | Deploy, restart, and monitor services | read, deploy, restart | Assigned services | Team lead |
| admin | Full access for break-glass and critical changes | full | Entire system | Security + manager |
| auditor | Read-only access to logs and compliance evidence | read | Logs and audit data | Compliance officer |
Design notes for adapting the table:
vieweris deliberately broad in scope — read-only access is cheap to grant and removes most ad-hoc requests. Tighten it only where data classification demands it.editorstops at non-production on purpose — production writes belong tooperatoror the deploy pipeline, which keeps the change trail clean.adminexists for emergencies and rare structural changes. When someone holdsadminfor daily work, the role model is broken — that’s a finding for the next review.auditorhands compliance a read-only seat at the table. Write access for this role shouldn’t exist, not even “just for a week.”
4. Role Assignment Rules
| Rule | Description |
|---|---|
| Least privilege | Users receive the minimum role needed for their current duties. |
| Separation of duties | No single user holds roles that let them both make and approve sensitive changes. |
| Time-bound | Temporary or elevated roles expire automatically. |
| Manager approval | Role assignment requires documented approval from the user’s manager. |
| Revocation on change | Roles are revoked when a user changes teams or leaves the organization. |
| One privileged identity | Admin duties run on a separate privileged account, never on the daily-use account. |
5. Separation of Duties Matrix
Define which role combinations are forbidden. A user holding two conflicting roles can bypass the controls each one was designed to enforce — and the conflict is invisible until someone checks pairs, not roles. Review assignments pairwise during the quarterly audit; the matrix below is the starting point, extend it with combinations specific to your systems.
| Role A | Role B | Conflict | Resolution |
|---|---|---|---|
| editor | approver | Can write and approve own changes | Split duties or require peer approval |
| operator | auditor | Can act and erase the audit trail | Assign audit to a different team |
| admin | any other role | Superset — other roles are redundant | Hold only admin, time-bound |
| requester | approver (self) | Self-approval defeats the control | Approver must be a different person |
6. Access Request Workflow
| Step | Action | Owner | SLA |
|---|---|---|---|
| 1 | User submits request with business justification | Requester | N/A |
| 2 | Manager reviews and approves | Manager | 2 business days |
| 3 | Role is provisioned by identity or platform team | IAM team | 1 business day |
| 4 | Assignment is logged in access register | IAM team | Same day |
| 5 | Access is reviewed during quarterly audit | System owner | Quarterly |
Emergency requests bypass the SLA, not the control: an incident commander can approve a time-bound operator grant verbally, but it must be logged within 24 hours and expire automatically.
7. Review and Compliance
| Activity | Frequency | Owner | Evidence |
|---|---|---|---|
| Role inventory review | Annually | Security | Updated role matrix |
| Privileged access review | Quarterly | System owner | Attestation record |
| Orphan account cleanup | Quarterly | IAM team | Disabled account list |
| Exception approval | As needed | Risk committee | Risk acceptance form |
Reviews only work when the evidence survives the review. Store attestation records and the access register somewhere auditors can reach — a shared drive works, an access-review tool works better. The Access Control Review Template covers the certification process in detail.
A register entry is small — six fields per assignment are enough:
| Field | Example |
|---|---|
requested_at | 2026-10-02 |
user | alice@company.com |
role_granted | operator |
approver + ticket | j.smith + SEC-1143 |
provisioned_at | 2026-10-03 |
expires_or_review | 2027-01-15 |
Any store works — a spreadsheet, an IdP report export, a table in the ITSM tool. What auditors actually check is that entries exist for every grant and that expired rows were followed up, not which tool produced them.
8. Offboarding and Role Changes
When someone changes teams or leaves, their roles are revoked the same day the HR system marks the transition — not when someone remembers. Automate this through the identity provider’s group sync: remove the user from the source group and let provisioning remove the role. Manual deprovisioning is the top source of orphan accounts in access reviews.
9. Break-Glass Access
Emergency access uses dedicated break-glass accounts, not someone’s daily login. The accounts are sealed — credentials in a vault or sealed envelope — and every use triggers an alert and a mandatory post-incident review within 24 hours. Break-glass usage is itself an auditable event: if nobody reviews it, the control doesn’t exist.
10. Exceptions
Every rule above will meet a legitimate exception: a contractor who needs editor for a fixed engagement, a legacy system that can’t join the IdP, a migration window where an operator temporarily needs admin. Exceptions are allowed only when they’re written down — the requester, the compensating control, the approver, and the expiry date. Without an expiry date, an exception is just a permanent grant wearing extra paperwork.
Explanation
RBAC collapses the permission matrix. Assigning 20 permissions directly to 200 users means managing 4,000 grants; grouping those permissions into five roles means managing ~200 assignments plus five definitions. The model also makes intent legible — a manager reviewing “carol has editor” understands more than “carol has rows 1,247 through 1,268 in a grants table.”
The trade-off is rigidity. Roles capture what someone is, not what they’re allowed to touch right now. Three model families handle the cases RBAC can’t:
- RBAC — access follows job function. Simple, auditable, and the right default for most systems.
- ABAC — access follows attributes (
department,mfa_verified,env=production). Handles context RBAC can’t express, at the cost of harder audits. See Implement ABAC for the mechanics. - ReBAC / ACL — access follows relationships (“owner of this project”). Collaborative tools need per-resource grants that roles can’t model; Zanzibar-style systems solve that problem at scale.
Most production systems end up hybrid: RBAC for the coarse layer, attributes or resource checks for the edges. Write the role policy first anyway — it’s the document auditors ask for and the fallback when dynamic systems misbehave.
The model also can’t do one thing on its own — keep a record of anything. The access register works as the system’s memory — who asked, who approved, when it was provisioned, when it was last reviewed. Skip that log and the policy describes intent without being able to prove it. Auditors rarely ask whether your rules are right; what they actually want is the last three quarters of evidence.
How to Roll Out This Template
-
Fill the role table with real functions. Pull the list of actual job functions from HR or team leads, not from the org chart. If a role exists for one person, merge it — single-user roles are permission grants wearing a costume.
-
Map roles to your identity provider. Each role row should translate to a group in Okta/Entra/Google Workspace or a namespace-scoped binding in Kubernetes. Whatever the policy document says, the IdP must say too — if the two disagree, the IdP wins in practice and the document becomes fiction. A mapping table keeps both sides honest:
Policy role Okta group K8s binding AWS role viewer app-viewers developer-read-only ViewOnlyAccess operator platform-operators deployer — admin sec-admins rbac-object-manager AdministratorAccess auditor compliance-auditors — SecurityAudit -
Migrate users alongside, not instead. Assign roles while keeping existing direct permissions, verify users still work, then remove direct grants in a maintenance window with a rollback plan.
-
Version the document. Keep the policy in a repository right next to the IAM code it describes. Changes to the role model go through the same review as code changes.
-
Wire reviews into the calendar. Quarterly privileged reviews and annual role inventories fail when they live in a wiki nobody opens. Attach them to tickets or recurring tasks with an owner.
-
Automate enforcement where you can. Policy-as-code (OPA, Sentinel, cloud permission boundaries) turns the document from aspirational to enforced.
Expect the first review cycle to surface drift — roles nobody uses, gaps the template didn’t cover, teams that quietly kept direct grants. That’s the template working: write down what changed, update the role matrix, and let the next cycle confirm the fix. Treat the policy as a living document that ages with the organization, not an artifact you write once and file away.
For the implementation side — role hierarchies, permission checks in code, and middleware enforcement — the Implement RBAC recipe walks through working examples in Python, Node.js, and Java.
Measuring Whether the Policy Works
A policy nobody measures is a policy nobody follows. Track a small set of numbers quarterly:
| Metric | Healthy target | Warning sign |
|---|---|---|
Users with admin | < 2 % of staff | Permanent admin for daily work |
| Unused role assignments (90d) | < 5 % | Roles granted “just in case” |
| Orphan accounts per review | 0 | Accounts active after offboarding |
| Provisioning SLA hit rate | > 95 % | Requests waiting on manual steps |
| Exceptions open > 90 days | 0 | Exceptions becoming permanent grants |
| Break-glass uses per quarter | 0-2 | Routine operations on break-glass |
A spike in unused assignments means the role model drifted from reality — either the roles don’t match the work anymore, or approvals became rubber stamps. Both are review findings, not emergencies. Review the numbers in the same meeting that certifies privileged access, so the metrics and the attestation stay in sync.
Variants
- ABAC policy: grants access on attributes like department, project, or clearance level. More expressive than roles and harder to audit — use it when context changes who should get in, not as the default.
- Cloud IAM policy: maps the role table to AWS IAM roles, Azure RBAC definitions, or GCP IAM bindings. Each cloud adds its own primitives (permission boundaries on AWS, deny assignments on Azure) that the policy should name explicitly.
- Application-level RBAC: roles inside one application, independent of corporate identity. Common in multi-tenant SaaS where
tenant-adminmeans something different per customer. - Customer-facing RBAC: models end-user roles (owner, member, guest) in a product. Same structure, different audience — the “auditor” row becomes your support team’s read role.
- Hybrid RBAC+ABAC: roles for the coarse model plus attribute checks on top — for example,
editorplusenv=productionrequires MFA. Most cloud platforms support this natively through condition keys.
What Works
- Start with three to five roles and expand only when a real request can’t be served. Every role you add is a permanent maintenance cost.
- Name roles after functions (
editor,operator), never after people or job titles — titles change, functions don’t. - Document the business justification on every assignment. “Needed for Q4 launch” ages better than “approved by Dave.”
- Use groups and roles, not individual grants, for everyone except break-glass accounts.
- Enforce MFA on every privileged role, and require it again before sensitive actions where the platform supports step-up auth.
- Automate revocation on team change or exit through IdP group sync — manual offboarding lists go stale within a quarter.
- Review the role inventory annually and delete roles nobody used. A role with zero assignments for two cycles is dead weight.
- Implement break-glass with full audit: a separate sealed account, alerting on every login, and a mandatory review afterward:
# Alert on break-glass usage
def on_break_glass_login(user: str, resource: str) -> None:
alert_security_team(
f"Break-glass account {user} accessed {resource}. "
f"Post-incident review required within 24 hours."
)
create_incident_ticket(user, resource)
- Compose roles from smaller permission sets instead of minting a new role per combination — it slows down role explosion:
# Role composition example
roles:
deployer:
inherits: [viewer, editor]
adds: [deploy, restart]
incident_commander:
inherits: [viewer, deployer]
adds: [scale, rollback, toggle_feature_flag]
Common Mistakes
- Role explosion. Twenty fine-grained roles for a five-person team means nobody knows which one to request. Merge aggressively; the sweet spot for most systems is three to seven.
- Direct grants outside the model. Every “just this once” permission bypasses the review cycle. Route exceptions through the exception process with an expiry date — that’s what it’s for.
- Stale roles after transfers. Users keep the old team’s roles “temporarily” forever. Lateral moves count as offboarding for the old team’s roles — same-day revocation, no exceptions for “temporary” overlap.
- No separation of duties. Let one person deploy and approve their own deploy and there’s no control left — just extra steps with a false sense of security.
adminas a shortcut during incidents. Granting permanent admin during an outage and forgetting to revoke it’s the classic finding. Use time-bound elevation instead — a Vault token with a hard 4-hour cap works:
# Issue a 4-hour token for the temp-admin policy
vault token create -policy=temp-admin -ttl=4h -explicit-max-ttl=4h
- Skipping staging. RBAC changes that look harmless break workflows. Test the new role set against real user paths first:
# Verify a developer can read but not write
kubectl auth can-i get pods --as=developer@company.com -n staging
# Expected: yes
kubectl auth can-i create pods --as=developer@company.com -n staging
# Expected: no
- Auditor roles with write access. Granting the compliance team edit rights “temporarily” compromises the independence the role exists to protect.
Advanced Solutions
Kubernetes RBAC with role bindings
Define Kubernetes RBAC roles and bindings for a multi-team cluster:
# Role: developer-read-only
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: developer-read-only
namespace: team-payments
rules:
- apiGroups: [""]
resources: ["pods", "services", "configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["deployments", "replicasets"]
verbs: ["get", "list", "watch"]
---
# RoleBinding: bind developers to the role
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: developers-read-only
namespace: team-payments
subjects:
- kind: Group
name: team-payments-developers
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: developer-read-only
apiGroup: rbac.authorization.k8s.io
---
# ClusterRole: platform team manages RBAC objects cluster-wide
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rbac-object-manager
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
AWS IAM policy with least-privilege boundaries
Define an IAM policy with permission boundaries to limit what developers can do even with broader roles:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowS3ReadWrite",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::team-payments-data",
"arn:aws:s3:::team-payments-data/*"
]
},
{
"Sid": "DenyDeleteBucket",
"Effect": "Deny",
"Action": [
"s3:DeleteBucket",
"s3:DeleteBucketPolicy"
],
"Resource": "*"
},
{
"Sid": "RequireMFAForSensitiveActions",
"Effect": "Deny",
"Action": [
"iam:CreateAccessKey",
"iam:DeleteAccessKey",
"iam:AttachUserPolicy"
],
"Resource": "*",
"Condition": {
"BoolIfExists": {
"aws:MultiFactorAuthPresent": "false"
}
}
}
]
}
RBAC policy as code with OPA Gatekeeper
Enforce RBAC rules using Open Policy Agent (OPA) Gatekeeper in Kubernetes. The constraint below blocks bindings to cluster-admin outside the platform and security teams:
# Constraint: prevent privilege escalation
apiVersion: constraints.gatekeeper.sh/v1
kind: K8sRequiredRoleBindings
metadata:
name: prevent-privilege-escalation
spec:
match:
kinds:
- apiGroups: ["rbac.authorization.k8s.io"]
kinds: ["RoleBinding", "ClusterRoleBinding"]
parameters:
# Block bindings to cluster-admin for non-platform namespaces
forbiddenRoles:
- cluster-admin
allowedGroups:
- platform-team
- security-team
# OPA policy: validate role bindings
package k8srequiredrolebindings
violation[{"msg": msg}] {
input.review.object.roleRef.name == "cluster-admin"
not input.review.object.subjects[_].name in input.parameters.allowedGroups
msg := sprintf("cluster-admin role cannot be bound to %v", [input.review.object.subjects[_].name])
}
Further Reading
- Companion repository — downloadable role matrix, Kubernetes RBAC manifests, AWS IAM boundary policy, and OPA constraint template.
- Access Control Review Template — periodic certification of the access model this template defines.
- Compliance Gap Analysis Template — maps access controls like these to framework requirements and tracks remediation.
- Container Security Baseline Template — applies RBAC least privilege to Kubernetes workloads.
- NIST — Role-Based Access Control — the reference model behind RBAC.
- Kubernetes RBAC authorization — official docs for Roles, ClusterRoles and bindings.
- AWS IAM permission boundaries — how boundaries cap effective permissions.
- OPA Gatekeeper — policy-as-code enforcement for Kubernetes.
Frequently Asked Questions
What is the difference between RBAC and ABAC?
RBAC grants access based on assigned roles — stable groups like editor or operator. ABAC grants access based on attributes of the user, resource, and environment, such as department=engineering and time=business-hours. RBAC is easier to audit and explain; ABAC handles context that roles can't express.
How many roles should a system have?
Most systems need between three and seven roles. More than ten usually indicates role explosion and should be refactored into broader roles composed from permission sets.
Can a user have multiple roles?
Yes — and that's exactly where hidden escalation comes from. Two safe roles can add up to a dangerous one: editor plus approver breaks separation of duties even though each role is fine alone. Review the combined permission set, and track temporary and permanent assignments separately so time-bound ones actually expire on schedule.
How do I migrate from direct permissions to RBAC without disruption?
Start by inventorying all existing direct permissions. Map each permission to a role, assign roles alongside the existing grants, and verify that users can perform their duties with only the role. Then remove direct permissions in a maintenance window with rollback capability.
What is role explosion and how do I prevent it?
Role explosion happens when an organization creates too many fine-grained roles, making the model unmaintainable. Prevent it by using functional role names, composing roles from smaller permission sets, and reviewing roles annually to merge or delete unused ones. Aim for fewer than 10 roles per system.
How should service accounts fit into the role model?
Service accounts get the same treatment as human users: a named role, an owner, and a review date. Avoid dedicated one-off roles per service account — that's direct grants by another name. Shared or orphaned service accounts are usually the first cleanup item in a quarterly review; the User Access Audit Template covers detecting them.
Related Resources
Access Control Review Template
A template for auditing user access rights, verifying least privilege, and documenting access decisions across systems and teams.
DocUser Access Audit Template
A template for reviewing and certifying user access rights across systems, applications, and data repositories.
DocContainer Security Baseline Template
A baseline template for hardening container images, runtimes, and orchestration configurations across environments.
RecipeImplement RBAC: Role-Based Access Control
How to implement role-based access control with hierarchical roles, permission grants, and middleware enforcement across Python, Node.js, and Java.
RecipeImplement ABAC: Attribute-Based Access Control
Implement attribute-based access control with policy engines, live context evaluation, and fine-grained decisions in Python, Node.js, and Java.
GuideZero Trust Architecture — Never Trust, Always Verify
A practical guide to implementing Zero Trust architecture: identity verification, least privilege, micro-segmentation, and continuous validation for modern systems.