For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Restrict registry access
Create role-based access control policies with specific permissions and map IdP groups to those policies to control what users can do in the registry.
Solo Enterprise for agentregistry lets you restrict what individual users or groups can do in the registry by creating RBACPolicy resources and matching them to the group claims in the JWT from your OIDC provider. For more information about how to configure access for users with an RBACPolicy, see About user access control. For a conceptual overview of how user access control fits into the access control layers, see About access control.
About this guide
In this guide, you give the members of a developers group read-only access to the agents and MCP servers that are published in the registry catalog. This guide creates the RBACPolicy resources in the default tenant, where the SuperAdmin acts as the admin and writes every policy. In a setup with several teams, the SuperAdmin writes only the first policy of each tenant, and tenant admins create policies for their teams. To give several teams their own tenants in one registry, see Isolate teams with tenants.
Before you begin
Set up an OIDC provider so that users can authenticate with the registry.
Install Solo Enterprise for agentregistry and the
arctlCLI.Port-forward the Solo Enterprise for agentregistry server on port 12121 if you have not done so already. The registry is not exposed externally by default, so you need port-forwarding to reach it from your local machine.
kubectl -n agentregistry-system port-forward svc/agentregistry-enterprise-server 12121:12121
Step 1: Create a Keycloak group and user
Use the Keycloak Admin REST API to create a developers group and a user who belongs to it.
Get an admin token for the Keycloak Admin REST API.
export KEYCLOAK_ADMIN_TOKEN=$(curl -s \ -d "client_id=admin-cli" -d "username=admin" -d "password=admin" \ -d "grant_type=password" \ "${KEYCLOAK_URL}/realms/master/protocol/openid-connect/token" \ | jq -r .access_token)Create the
developersgroup.curl -s -X POST \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ -H "Content-Type: application/json" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/groups" \ -d '{"name": "developers"}'Create a
dev-useraccount and assign it to thedevelopersgroup.curl -s -X POST \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ -H "Content-Type: application/json" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/users" \ -d '{ "username": "dev-user", "email": "dev-user@example.com", "firstName": "Dev", "lastName": "User", "enabled": true, "credentials": [{"type": "password", "value": "password", "temporary": false}] }' export DEV_USER_ID=$(curl -s \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/users?username=dev-user" \ | jq -r '.[0].id') export DEVELOPERS_GROUP_ID=$(curl -s \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/groups?search=developers" \ | jq -r '.[0].id') curl -s -X PUT \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/users/${DEV_USER_ID}/groups/${DEVELOPERS_GROUP_ID}"Verify that the
developersgroup anddev-userwere created and the group assignment is in place.curl -s \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/groups" \ | jq '.[].name' curl -s \ -H "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ "${KEYCLOAK_URL}/admin/realms/${KEYCLOAK_REALM}/users?username=dev-user" \ | jq '.[0].username'Example output:
"developers" "dev-user"
Step 2: Create an RBACPolicy
Create an RBACPolicy resource that defines the operations that users from the developers group can perform. In this example, you allow read access to all agents and MCP servers.
Log in to Solo Enterprise for agentregistry as the SuperAdmin, which is a user that matches the claim in your
rbac.superAdminPrincipalsHelm value. Only a SuperAdmin can write the first RBACPolicy of a tenant, because the registry denies every other user access until a policy grants it. This guide uses theadmin-useruser of theadminsgroup and the passwordpassword. The command uses thear-cli-passwordclient, which exchanges a username and a password for an access token, so you do not need a browser.export OIDC_ISSUER=$KEYCLOAK_ISSUER arctl user login \ --oidc-flow=password-credentials \ --oidc-client-id=ar-cli-password \ --oidc-username=admin-user \ --oidc-password=passwordCreate the RBACPolicy as the SuperAdmin. The policy belongs to the
defaulttenant, because it setsmetadata.namespace: default. Thedefaulttenant holds every object that has no namespace, including the catalog that you built in the prerequisites. The following example creates a read-only policy for thedevelopersgroup. The policy allows listing and viewing all agents and MCP servers, but does not permit publishing or deploying them.cat <<EOF | arctl apply -f - apiVersion: ar.dev/v1alpha1 kind: RBACPolicy metadata: name: developers namespace: default spec: principals: - all: - attribute: Groups values: [developers] grants: - name: read-agents accessLevel: view resource: agents - name: read-mcpservers accessLevel: view resource: mcpservers EOFField Description metadata.namespaceThe tenant that the policy belongs to. The policy grants access only in this tenant. spec.principals[].all[]The users that the policy applies to. Each condition checks one claim in the token that Keycloak issues when the user logs in. In this example, attributeis the exact, case-sensitive claim nameGroups, andvaluesis the group namedevelopers. A user matches this policy when the JWT contains theGroups: developersclaim. For more information about how to configure policy principals, see Principals.spec.grants[].accessLevelThe access level that you want to give. In this example, you grant viewaccess only. For all access levels, see Resources and access levels.spec.grants[].resourceThe key of the resource type, such as agentsormcpserversthat you want to allow access to. For all keys, see Resources and access levels.Example output:
✓ RBACPolicy/developers createdVerify that the policy is created.
arctl get rbacpoliciesExample output:
NAME PRINCIPALS GRANTS developers 1 2
Step 3: Verify access as the new user
Log out of the SuperAdmin session and log in as the
dev-useruser with the passwordpassword. The user belongs to thedevelopersgroup that you created in the first step.export OIDC_ISSUER=$KEYCLOAK_ISSUER arctl user logout arctl user login \ --oidc-flow=password-credentials \ --oidc-client-id=ar-cli-password \ --oidc-username=dev-user \ --oidc-password=passwordInspect the JWT that is returned by Keycloak to confirm that the
developersgroup claim is in the token.arctl user info --show-tokens \ | jq -r '.access_token | split(".") | .[1] | @base64d | fromjson | {sub, email, Groups}'Example output:
{ "sub": "fbb5e028-4ef7-41de-8a6b-88365c26287d", "email": "dev-user@example.com", "Groups": [ "developers" ] }Confirm that the
dev-usercan list agents in the catalog.arctl get agentsExample output:
NAME TAG MODE DESCRIPTION myagent latest <none> My existing agentConfirm that the
dev-useruser cannot publish an agent. The command fails with aforbiddenerror.arctl apply -f - <<EOF apiVersion: ar.dev/v1alpha1 kind: Agent metadata: name: test-agent spec: description: Test agent language: python framework: adk modelProvider: gemini modelName: gemini-2.5-flash source: image: localhost:5001/myagent:latest EOFExample output:
warning: Agent default/test-agent uses deprecated spec.modelProvider/modelName; the values are preserved for compatibility only and do not select a runtime model; migrate each Deployment to spec.modelRef ✗ Agent/test-agent failed: forbidden: Agent access is not granted (forbidden) Error: one or more resources failed to applyConfirm that the
dev-useruser cannot create a deployment.arctl apply -f - <<EOF apiVersion: ar.dev/v1alpha1 kind: Deployment metadata: name: test-agent spec: targetRef: kind: Agent name: myagent tag: "latest" runtimeRef: kind: Runtime name: local EOFExample output:
✗ Deployment/test-agent failed: forbidden: Deployment access is not granted (forbidden) Error: one or more resources failed to apply
Example policies
The following examples show common permission configurations. Each policy belongs to the default tenant. RBACPolicy has no separate levels for publish, edit, and delete. The access level manage includes all of them, so you cannot grant publish access without delete access.
Read and deploy, but not publish or delete:
A deployment write needs manage access to the Deployment and view access to everything that the deployment references. Add view grants for other kinds that your deployments use, such as secrets or prompts.
cat <<EOF | arctl apply -f -
apiVersion: ar.dev/v1alpha1
kind: RBACPolicy
metadata:
name: deployers
namespace: default
spec:
principals:
- all:
- attribute: Groups
values: [deployers]
grants:
- name: view-agents
accessLevel: view
resource: agents
- name: view-mcpservers
accessLevel: view
resource: mcpservers
- name: view-runtimes
accessLevel: view
resource: runtimes
- name: view-models
accessLevel: view
resource: models
- name: manage-deployments
accessLevel: manage
resource: deployments
EOFPublish, edit, delete, and deploy:
cat <<EOF | arctl apply -f -
apiVersion: ar.dev/v1alpha1
kind: RBACPolicy
metadata:
name: publishers
namespace: default
spec:
principals:
- all:
- attribute: Groups
values: [publishers]
grants:
- name: manage-agents
accessLevel: manage
resource: agents
- name: manage-mcpservers
accessLevel: manage
resource: mcpservers
- name: manage-deployments
accessLevel: manage
resource: deployments
- name: view-runtimes
accessLevel: view
resource: runtimes
- name: view-models
accessLevel: view
resource: models
EOFTenant admin: manage access to every resource in the tenant:
Use this pattern for the admins of a tenant. Quote the asterisk in YAML. The grant covers every resource type in the default tenant and nothing in another tenant. The manage access level does not include invoke or approve. The example uses a default-admins group and not the SuperAdmin group, because the SuperAdmin has full access without a policy.
cat <<EOF | arctl apply -f -
apiVersion: ar.dev/v1alpha1
kind: RBACPolicy
metadata:
name: default-admins
namespace: default
spec:
principals:
- all:
- attribute: Groups
values: [default-admins]
grants:
- name: manage-everything
accessLevel: manage
resource: "*"
EOFScoped access to a specific agent:
Use this pattern when a team owns a particular agent and needs full publish rights for it, but needs only read access to everything else. The name constraint limits the manage grant to the myagent agent. The registry checks the constraint on the stored object and on the proposed change.
cat <<EOF | arctl apply -f -
apiVersion: ar.dev/v1alpha1
kind: RBACPolicy
metadata:
name: myagent-owners
namespace: default
spec:
principals:
- all:
- attribute: Groups
values: [myagent-team]
grants:
- name: manage-myagent
accessLevel: manage
resource: agents
constraints:
- all:
- attribute: name
values: [myagent]
- name: view-agents
accessLevel: view
resource: agents
- name: view-mcpservers
accessLevel: view
resource: mcpservers
EOFTo let users chat with an agent, see Restrict chat invocation. To convert AccessPolicies that you created in an earlier release, see About RBACPolicy resources.