Services

Resources

Company

RBAC (role-based access control)

Role-based access control (RBAC) is an authorization model where permissions belong to roles, such as "viewer", "billing admin" or "deployer", and users get access by being given a role. Changing what a role can do changes it for everyone who holds it, which keeps permissions reviewable as a team grows.

How it works

A role lists allowed actions on resources. A binding assigns that role to users, groups or service accounts, sometimes within a scope such as one tenant or one namespace. Each request is checked against the roles the caller holds.

In Kubernetes, a Role named pod-reader might allow the verbs get, list and watch on pods in namespace dev. A RoleBinding grants it to user asha. Then kubectl auth can-i delete pods -n dev --as asha answers no.

Why it matters in production

Most access incidents come from roles that grew too broad: everyone is admin because it was quicker. Start from least privilege, keep roles few and named after jobs, and review bindings regularly. In multi-tenant products, every role check also has to respect tenant boundaries.

See also

On the One2N blog

References

  1. Using RBAC authorization (Kubernetes documentation)

  2. Role based access control (NIST)

Four-panel comic about role-based access control: everyone on the team has admin and a namespace gets deleted because nothing said no; permissions attach to roles like deployer and viewer, and users get roles; a Kubernetes Role pod-reader allows get, list and watch on pods in dev, bound to asha, so kubectl auth can-i delete pods answers no; least privilege means reviewing who holds which role.