ON-PREM CHOREO CLOUD BOTH

What you will learn

  • Explain how a permission, a role and a scope in a token relate to each other
  • Name the four default roles and tell two of them apart by what they may do
  • Read a route's required permission and decide whether a role passes
  • Say why deploying to production needs two permissions

Before you start

On this page

You meet a scope in two places. A route says “I need amp:agent:build”, and your token says “I carry these scopes”. This lesson explains where the scopes in the token come from and how the two sides meet.

Three layers

  1. Permissions are listed in a catalog

    The Agent Manager service defines 103 permissions. Each is written resource:action, for example agent:create. In a token it becomes the amp:agent:create. They belong to one , urn:wso2:amp.

  2. Roles bundle permissions

    Four default roles are created in ThunderID by the bootstrap files of the Agent Manager install, each bound to a list of scopes on that resource server. The service’s code keeps a matching copy of the four lists, and a test checks that the two agree. A person is given roles, and the that results lives in the identity provider, not in an AMS user table.

  3. The token carries the result

    When you sign in, your roles’ permissions arrive in the scope claim of your token. Each route in AMS names the permission it needs, and the scope gate compares the two.

Component

RBAC (amp:* scopes)

Shared or other Other BOTH

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.

The four default roles

RolePermissionsWorth knowing
Agent Manager Admin103All of them
Platform Engineer69Has amp:agent:env-production, not amp:agent:create
Developer56Has amp:agent:create, not amp:agent:env-production
AI Lead51The smallest of the four. No amp:agent:create

All four hold amp:agent:build and amp:agent:env-non-production. These are the roles as shipped.

The route side

A route declares what it needs when it is registered. Most routes need one permission. A few accept any one of a list, and a few need all of a list.

RouteNeeds
GET /orgsamp:org:view
POST an agent’s buildsamp:agent:build
POST an agent’s deploymentsamp:agent:env-non-production
POST an agent’s deployments/stateamp:agent:suspend and amp:agent:env-non-production

Registering a gated route with an empty permission list makes the service panic at startup, so a gate cannot be left empty by accident. A few routes deliberately have no scope check, such as the static list of build options.

Two permissions for production

Environments add a second axis. amp:agent:env-non-production is the floor needed to act on environments at all. When the environment is flagged production, amp:agent:env-production is needed too. With the default roles, a Developer can deploy to a non-production environment but cannot act on one flagged production.

Your turn

Under Try it, open Who can call what. Choose a role from the first table and a route from the second, decide the answer yourself, and then read the verdict: does the role’s scope list cover the route? The lens checks only the permissions a route declares, so it does not show the extra production check. In the token inspector, find the scope claim. Finish with the two matchers.

Recap

  • A permission such as agent:create becomes a scope with the amp: prefix, here amp:agent:create, in your token.
  • Roles bundle permissions. The four defaults are Admin (103), Platform Engineer (69), Developer (56) and AI Lead (51), as shipped.
  • Your roles’ permissions arrive in the scope claim, and each route names the one it needs.
  • Production needs amp:agent:env-production on top of amp:agent:env-non-production.

Try it

Who can call what

What to do: choose a role and an API route, then see whether the call is allowed.

Loading the simulator...

Token inspector

What to do: pick a token, then click a claim to see what it means and who checks it.

Loading the token examples...

Match them up

What to do: pick an item on the left, then its partner on the right.

Loading the matching game...

Match them up

What to do: pick an item on the left, then its partner on the right.

Loading the matching game...

Wrap up

Recap

Tick each one when you could explain it to a colleague.

Finished?

Quick check

Loading the quick check...

Spotted something wrong or unclear in this lesson? Report an inaccuracy (opens GitHub in a new tab)