Component ยท Shared or other
RBAC (amp:* scopes)
What it is
RBAC (role-based access control) in Agent Manager is a catalog of permissions. Each one appears in tokens as a scope of the form amp:<resource>:<action>, for example amp:agent:create. Roles are bundles of permissions held in the identity provider, and a user's role permissions arrive in the scope claim of the token. Every API route and every MCP tool names the permissions it needs.
Permissions are the individual keys, and roles are key rings. A badge carries the keys of the rings you were given, and every door checks for the one key it needs.
Why it exists
People should do only what their job needs. Keeping the rules as scopes in the token means any service can check them without a call back to a user database.
How it works
- The Go catalog (rbac/permissions.go) defines 103 permissions and the resource server urn:wso2:amp that owns them.
- A route declares its permissions when it is registered. A request whose token lacks one gets 403 insufficient permissions. A test fails the build if a route has no permission check and is not on an allow list.
- Four default roles are created by the ThunderID bootstrap: Agent Manager Admin, Developer, AI Lead and Platform Engineer. A test checks that the chart matches the Go declarations.
- Environments add a second axis. amp:agent:env-non-production is needed to act on environments at all, and amp:agent:env-production is needed in addition for production ones.
- On Choreo Cloud the same scope names are used: the cloud console requests the same amp:* scopes.
Identity and access
The checks read the scope claim of the signed JWT of the caller.
Key facts
- Permissions
- 103
- Scope format
- amp:<resource>:<action>
- Resource server
- urn:wso2:amp
- Default roles
- Agent Manager Admin, Developer, AI Lead, Platform Engineer
- Denied request
- 403 insufficient permissions
Talks to (1)
- depends on Platform ThunderID 1.0.0 Roles assigned in Thunder yield scopes
Inside and around
Part of: agent-manager-service (AMS)