Skip to content
Latest (currently 2026.10.0) has the newest features, bug fixes, and CVE patches of Solo Enterprise for agentregistry.

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

Page as Markdown

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

  1. Set up an OIDC provider so that users can authenticate with the registry.

  2. Install Solo Enterprise for agentregistry and the arctl CLI.

  3. 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
  1. Build a catalog for AI artifacts

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.

  1. 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)
  2. Create the developers group.

    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"}'
  3. Create a dev-user account and assign it to the developers group.

    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}"
  4. Verify that the developers group and dev-user were 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.

  1. Log in to Solo Enterprise for agentregistry as the SuperAdmin, which is a user that matches the claim in your rbac.superAdminPrincipals Helm 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 the admin-user user of the admins group and the password password. The command uses the ar-cli-password client, 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=password
  2. Create the RBACPolicy as the SuperAdmin. The policy belongs to the default tenant, because it sets metadata.namespace: default. The default tenant 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 the developers group. 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
    EOF
    FieldDescription
    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, attribute is the exact, case-sensitive claim name Groups, and values is the group name developers. A user matches this policy when the JWT contains the Groups: developers claim. 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 view access only. For all access levels, see Resources and access levels.
    spec.grants[].resourceThe key of the resource type, such as agents or mcpservers that you want to allow access to. For all keys, see Resources and access levels.

    Example output:

    ✓ RBACPolicy/developers created
    
  3. Verify that the policy is created.

    arctl get rbacpolicies

    Example output:

    NAME         PRINCIPALS   GRANTS
    developers   1            2
    

Step 3: Verify access as the new user

  1. Log out of the SuperAdmin session and log in as the dev-user user with the password password. The user belongs to the developers group 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=password
  2. Inspect the JWT that is returned by Keycloak to confirm that the developers group 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"
      ]
    }
    
  3. Confirm that the dev-user can list agents in the catalog.

    arctl get agents

    Example output:

    NAME      TAG      MODE     DESCRIPTION
    myagent   latest   <none>   My existing agent
    
  4. Confirm that the dev-user user cannot publish an agent. The command fails with a forbidden error.

    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
    EOF

    Example 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 apply
    
  5. Confirm that the dev-user user 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
    EOF

    Example 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
EOF

Publish, 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
EOF

Tenant 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: "*"
EOF

Scoped 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
EOF

To let users chat with an agent, see Restrict chat invocation. To convert AccessPolicies that you created in an earlier release, see About RBACPolicy resources.