Skip to content
StackDecode
System Design
13. Security ArchitectureAnimated

Role-Based Access Control (RBAC)

Permissions assigned through roles.

The idea

Users get roles (admin, editor, viewer) and roles carry permissions.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

UserAppAuth serverResource APIclick "Sign in with X"
  • current message
  • earlier
  • failure or attack

The user starts in the app.

step:
1/8
from:
User
to:
App
1/8

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Define roles
  2. 2Attach permissions
  3. 3Assign roles to users
  4. 4Check the role at access time

Where it is used

Most applications.

Watch out for

Role explosion when rules get detailed.

Related