What is typed role-based access control with constraints?
- Simple authorization mechanism for microservices
- Declarative RBAC definitions as configuration
- Language agnostic contstraints through shell scripts
-
Users of the library provide a Context implementation that provides an
Action
on aResourceType
and theRoles
of the requesting agent as well as any metadata your constraints need. -
Users of the library also provide a
Privileges
definition in TOML. -
auth.May(c Context) bool
drawing: https://docs.google.com/drawings/d/19gKj3q9ITIahSrRXr3Ul76ntMTrowK3g0XbVQ4jOquo/edit?usp=sharing
- Resource Types: Anything managed by the service being protected
- Resources: a particular instance of a resource type
- Action: Something the service being protected can do with resources (Read, Write, List, etc.)
- Permissions: The general right to take an action on resource of a type under Constraints
- Roles: Classes of actors on protected resources
- Context: The particular properties of a request to take an action on a
resource
- For a proxy, this could be the
*http.Request
object
- For a proxy, this could be the
- Constraint: Arbitrary rule that may deny permission depending on context
- [Future work] Dependant constraint: Constraint that depends on particular resources that the request applies to
- Privileges: The assignment of a Permission to a role
- [Future work] declarative constraints on Privileges, and Privileges state changes