Instead of configuring permissions for each employee by hand, the administrator defines roles — “developer”, “on-call engineer”, “accountant” — and attaches permissions to them. The approach saves time and reduces the risk of excess privileges, which is why RBAC is built into databases, cloud platforms and Kubernetes.
How the model works
The base NIST model has four elements: users, roles, permissions and sessions. The administrator defines two kinds of relation — who holds which role and what a role is allowed to do — and an access check at request time looks like this:
| Element | Example |
|---|---|
| User | Anna, an employee |
| Role | release-manager, “the one who ships releases” |
| Permission | run deployments to production |
| Session | Anna logs in and activates the role for the duration of her work |
Permissions are attached to the role, so when a person changes position they are given a different role rather than a rebuilt list of permissions; a new employee gets access with a single assignment.
The NIST standard
David Ferraiolo and Rick Kuhn formalised the model in 1992, and in 2004 it became the American standard ANSI/INCITS 359 (the current edition is INCITS 359-2012). The standard describes the model through four components:
- Core RBAC — the mandatory minimum: the “user — role” and “role — permission” relations, present in any RBAC system.
- Hierarchical RBAC — roles inherit permissions from one another: a senior engineer has everything an engineer can do.
- Static separation of duties — on role assignment: one person cannot hold conflicting roles, for example creating a payment and approving it.
- Dynamic separation of duties — the same restriction, but for the duration of a session: within a single session, conflicting roles cannot be activated together.
The hierarchy and both restrictions are independent of one another: adopt them as needed.
RBAC in Kubernetes
In Kubernetes, RBAC is one of the API server’s authorisation modes. A role lists actions (verbs) on objects; a binding grants the role to a user, group or service account; a Role applies within a single namespace, a ClusterRole across the whole cluster. There are four object kinds: Role, ClusterRole, RoleBinding and ClusterRoleBinding.
apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata: name: deployment-reader namespace: shoprules: - apiGroups: ["apps"] resources: ["deployments"] verbs: ["get", "list", "watch"]To check what an account is actually allowed to do, run kubectl auth can-i create deployments --namespace prod --as dave: it asks the API server’s authorisation layer.
Sources
the term is written from these pages- NIST CSRC — Role-Based Access Controlcsrc.nist.gov/glossary/term/role_based_access_control(opens in a new tab)
- NIST CSRC — Role Based Access Control (проект и стандарт INCITS 359-2012)csrc.nist.gov/projects/role-based-access-control(opens in a new tab)
- Kubernetes — Using RBAC Authorizationkubernetes.io/docs/reference/access-authn-authz/rbac/(opens in a new tab)
Verified 9 Nov