Services

Resources

Company

/

Role-based access control

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)

RBAC diagram in three columns: who, roles, and what each role can do. User asha and the dev group are bound to the pod-reader role, which allows get, list and watch on pods in namespace dev. Red dashed lines bind asha, the dev group and a service account to an admin role that can do everything: everyone is admin. Below, kubectl auth can-i delete pods -n dev --as asha answers no.

Putting this into practice?

Talk to One2N about our backend engineering services

Talk to One2N about our backend engineering services