Fine-Grained RBAC
Complex role-based and attribute-based access controls are handled independently from the core microservice logic.
- A central Cerbos policy decision point evaluates policy. It is not duplicated per module.
- Roles and attributes are decided outside the service, so modules stay small.
- Routes that match no known policy fail closed.
- Auth Gateway
- Cerbos policy
- Module
Customer reads own order200 OK
policy: customers may read their own orders
policy: customers may read their own orders
Customer refunds an order403 Forbidden
policy: refund requires the finance role
policy: refund requires the finance role
Finance refunds an order200 OK
policy: finance may refund
policy: finance may refund
Auditable Policies
Since permissions are defined as code, access rules can be code-reviewed, tested, and audited systematically.
- A change to who may do what goes through review like any other change.
- Policies are tested before they ship.
- Version history shows who changed access, and when.
- 1Write the policyCerbos
Access rules live in policy files next to the code, not inside each service.
- 2Code reviewpull request
A change to who may do what is reviewed like any other change.
- 3Testautomated
Policies are tested, so a rule change cannot silently open access.
- 4Audithistory
Every rule is versioned, so you can show who changed access and when.
Ready to see how it fits together?
See where Cerbos policy evaluation sits in the request path, alongside the modules it protects.