{
  "schema_version": 2,
  "id": "operate/iris/identity-service/self-managed/authentication",
  "title": "Authentication and authorization",
  "url": "https://redis.io/docs/latest/operate/iris/identity-service/self-managed/authentication/",
  "summary": "Understand the Identity Service credentials, agent keys, tenants, and roles, let operators sign in with your identity provider, and recover from a lockout.",
  "aliases": [
    "/operate/iris/identity-service/authentication/"
  ],
  "tags": [
    "docs",
    "operate",
    "iris"
  ],
  "last_updated": "2026-11-05T17:22:10-05:00",
  "page_type": "content",
  "content_hash": "e9fa736e42f90306c1dc8aee69880cb18cb68146455bdf5beaae16f04b54d1b4",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The Identity Service uses a separate credential for each job: operators manage agent keys through its control API, service planes call its runtime API, and agents present agent keys to service data planes. This page lists each credential, the agent key grants, tenants, and the roles on the control API. It then shows how to let operators sign in with your identity provider (IdP)."
    },
    {
      "id": "credentials",
      "title": "Credentials",
      "role": "content",
      "text": "| Credential | Held by | What it does |\n| --- | --- | --- |\n| Control token | The operator, in a Kubernetes Secret | The rescue credential. It can do every control operation. |\n| Operator access token | An operator who signs in to your IdP | Gives the operator's control roles, from `global.iris.auth.roleBindings`. |\n| Runtime credential | A service data plane, for example `memory-dp` | Lets the data plane check agent keys. |\n| Internal token | A service control plane and the Identity Service | Lets the Identity Service ask the control plane whether a grant is valid. |\n| Agent key | An agent | Gives the agent access to service resources. |\n\nEach credential has one job, so don't use one value for two jobs. The Identity Service doesn't start when two of the control token, the runtime credentials, and the internal tokens have the same value.\n\nThe control token is a shared secret, and the audit log can't name a person for it. Keep it for setup and recovery, and let operators [sign in with your IdP](#operator-sign-in-with-your-identity-provider) for daily work."
    },
    {
      "id": "agent-keys-and-grants",
      "title": "Agent keys and grants",
      "role": "content",
      "text": "An agent key looks like `iris_<key-id>.<secret>`. The Identity Service returns the full key only once, in the response to a create or a rotation, and stores only a SHA-256 hash of it. If you lose a key, rotate it or create a new one.\n\nEach key has one or more grants:\n\n| Grant field | Meaning | Example |\n| --- | --- | --- |\n| `product` | The Iris service. | `memory` |\n| `resourceType` | The type of resource in that service. | `mem-store` |\n| `resourceId` | One resource. Wildcards aren't accepted. | `<store-id>` |\n| `actions` | What the key can do with the resource. | `[\"read\", \"write\"]` |\n| `tenant` | The resource's tenant. The Identity Service adds it. | `default` |\n\n| Service | `product` | `resourceType` | Actions |\n| --- | --- | --- | --- |\n| Agent Memory | `memory` | `mem-store` | `read`; `write` (includes `read`); `full` (includes `write`) |\n| Agent Playbooks | `playbook` | `playbook` | `read`; `write`, `publish`, and `propose` (each includes `read`); `full` (includes all) |\n| Lens | `lens` | `lens-instance` | `ingest` and `read`, independent of each other; `full` (includes both) |\n| Context Gateway | `context-gateway` | `gateway` | `use`; `full` (includes `use`) |\n| Intent Router | `intent` | `intent-router` | `read`; `write` (includes `read`); `full` (includes `write`) |\n\nBefore the Identity Service stores a grant, it asks the service's control plane whether the resource exists and the actions are valid. Each service's authentication page explains what its actions allow. To create and manage keys, see [Give an agent access with an agent key](https://redis.io/docs/latest/operate/iris/identity-service/self-managed/operations#give-an-agent-access-with-an-agent-key).\n\nA data plane caches each key check. After you revoke a key, it can keep working for up to `runtime.cache.hardTtlSeconds`, 300 seconds by default."
    },
    {
      "id": "subject-grants",
      "title": "Subject grants",
      "role": "content",
      "text": "The control API also has routes for subject grants, `/v1/subject-grants`. They have no effect in a `redis-iris` installation. By default the chart allows no subject-grant shape, so the Identity Service refuses new subject grants. The chart also gives no data plane the `subject-grant-lookup` operation, so no data plane reads them. IdP users get access from their roles in each service, and agents use agent keys."
    },
    {
      "id": "tenants",
      "title": "Tenants",
      "role": "content",
      "text": "A tenant is a boundary for keys, grants, and service data, such as one customer or one business unit. A caller in one tenant can't see the keys of another tenant: the Identity Service returns `404` for them.\n\nThe Identity Service has no tenant object, and no API creates, lists, or deletes tenants. A tenant is only an ID that each key, grant, and service resource carries.\n\nA `redis-iris` release serves one tenant, set once in `global.iris.tenantId`. The chart gives this ID to the Identity Service and to each service. To serve more than one tenant, install one release for each tenant, each in its own namespace.\n\n| Task | What to do |\n| --- | --- |\n| Create a tenant | Choose the ID before the first install, and set `global.iris.tenantId`. |\n| Change the ID | Not supported. Keys, grants, and service data keep the old ID, and no tool moves them. A new `global.iris.tenantId` doesn't make the old data available. |\n| Remove a tenant | Uninstall its release, and delete its data. There is no tenant object to delete. |\n\nA grant's `tenant` field works like this:\n\n| `tenant` in the grant | Result |\n| --- | --- |\n| Not set | The Identity Service uses `global.iris.tenantId`. |\n| `global.iris.tenantId` | Accepted. |\n| Another tenant | `400`. |\n\nAll the grants of one key must have the same tenant."
    },
    {
      "id": "roles-on-the-control-api",
      "title": "Roles on the control API",
      "role": "content",
      "text": "| Caller | How it gets the role | What it can do |\n| --- | --- | --- |\n| Control token | It holds the token | Every operation. |\n| `suite_admin` | A role binding without `product` | Every operation for every service, in its own tenant. |\n| `product_admin` | A role binding with `product` | Every operation for that service, in its own tenant. |\n| `operator`, `viewer` | A role binding with `product` | No key operations. These roles apply only in the service. |\n| Any other caller with a valid token | None | No key operations. |\n\nThe Identity Service also has a `deployment_admin` role, for installations with more than one tenant. A `redis-iris` release has one tenant, so it doesn't need this role, and the suite role bindings can't give it.\n\nFor each control API request, the Identity Service finds the caller's role like this:\n\n1. If the bearer value is the control token, the caller can do every operation, and there are no more checks.\n1. Otherwise, the Identity Service reads the value as a JSON Web Token (JWT) from your IdP. It checks the issuer, the signature, the audience, and the expiry. If a check fails, it returns `401`.\n1. It compares the values of the role claim, `groups` by default, with the `group` of each role binding. Each matching binding gives its role, so an operator can have more than one role.\n1. It checks the roles against the operation and the service. If no role allows the operation, it returns `403`.\n\nA caller with a valid token and no role can still read `GET /v1/products`. `GET /v1/api-keys` returns `200` with only the keys the caller can manage, so for such a caller the list is empty.\n\nFor example, an operator's token has `groups: [memory-admins]`, and the binding `{group: memory-admins, role: product_admin, product: agent_memory}` matches. The operator can create keys for Agent Memory, and a key for Agent Playbooks returns `403`."
    },
    {
      "id": "operator-sign-in-with-your-identity-provider",
      "title": "Operator sign-in with your identity provider",
      "role": "content",
      "text": "Operators can call the control API with an access token from your IdP, using OpenID Connect (OIDC). The audit log then names each operator. The control token keeps working."
    },
    {
      "id": "1-register-iris-in-your-idp",
      "title": "1. Register Iris in your IdP",
      "role": "content",
      "text": "1. Register the Iris console as a web application.\n1. Register one API for the whole suite with one audience, for example `api://redis-iris`.\n1. Create groups for key administrators, for example `iris-suite-admins` and `memory-admins`, and add operators to them."
    },
    {
      "id": "2-configure-globalirisauth",
      "title": "2. Configure `global.iris.auth`",
      "role": "content",
      "text": "Add these values to `iris-values.yaml`, together with the `ui.sso` values from the [suite install](https://redis.io/docs/latest/operate/iris/self-managed#3-write-iris-valuesyaml):\n\n[code example]\n\n- `issuer` is the issuer of the IdP discovery document. If the access tokens' `iss` claim differs, for example on Active Directory Federation Services (AD FS), set `accessTokenIssuer` to that value. The Identity Service compares it with the `iss` claim exactly.\n- `jwksURI`, the JSON Web Key Set (JWKS) URI, must use `https://`. The pods must reach it and trust its certificate authority (CA). See [TLS, FIPS, and network](https://redis.io/docs/latest/operate/iris/identity-service/self-managed/configuration#tls-fips-and-network).\n- Role bindings read the `groups` claim by default. Set `roleClaims` to read other claims. A `group` matches without regard to letter case.\n- The service names in `roleBindings` are `agent_memory`, `playbook`, `lens`, `context_gateway`, and `intent`.\n- On the Identity Service, only `suite_admin` and `product_admin` can manage keys.\n- A binding for a service that isn't enabled has no effect. The chart keeps it, and uses it again when you enable the service.\n\nThe console sends the operator's access token to the Identity Service. The chart sets the same audience and issuer in the console and the Identity Service, so they always match."
    },
    {
      "id": "3-apply-and-check",
      "title": "3. Apply and check",
      "role": "content",
      "text": "1. Run `helm upgrade` for the release.\n1. Get an access token for an operator from your IdP, and save it in `OPERATOR_TOKEN`.\n1. Create a key for a resource of one of the operator's services, as in [Give an agent access with an agent key](https://redis.io/docs/latest/operate/iris/identity-service/self-managed/operations#give-an-agent-access-with-an-agent-key), with the operator's token. Then delete it:\n\n   [code example]\n\n| Status | Meaning |\n| --- | --- |\n| `201` | The token is valid and a role binding allows the operation. |\n| `401` | The issuer, audience, or signature is wrong, or the token expired. Compare the token's `iss` and `aud` claims with `global.iris.auth.oidc`. |\n| `403` | No role binding gives `suite_admin`, or `product_admin` for that service, to the operator's groups. |\n\nDon't use `GET /v1/api-keys` for this check: without a role, it returns `200` with an empty list. Keep the control token for recovery."
    },
    {
      "id": "recover-from-a-lockout",
      "title": "Recover from a lockout",
      "role": "content",
      "text": "- **Your IdP is down, or the role bindings are wrong.** Use the control token. It always works.\n- **The console can't sign in.** Switch the console to [admin token mode](https://redis.io/docs/latest/operate/iris/self-managed#admin-token-mode) until the IdP works again.\n- **You don't have the control token Secret.** If the chart generated the token (`global.iris.secrets.generate: true`), delete the Secret, if it still exists, and run `helm upgrade`. The chart generates a new token. If you supplied the Secret, create a new one with a new token yourself.\n- **You lost the metadata Redis.** Restore it from your backup. See [Back up and restore](https://redis.io/docs/latest/operate/iris/identity-service/self-managed/operations#back-up-and-restore). Without it, every agent key and grant stops working."
    }
  ],
  "examples": [
    {
      "id": "2-configure-globalirisauth-ex0",
      "language": "yaml",
      "code": "global:\n  iris:\n    publicURL: https://<console-host>\n    auth:\n      oidc:\n        issuer: https://<idp-host>/<issuer-path>\n        jwksURI: https://<idp-host>/<jwks-path>\n        audience: api://redis-iris\n      roleBindings:\n        - {group: iris-suite-admins, role: suite_admin}\n        - {group: memory-admins, role: product_admin, product: agent_memory}\n        - {group: memory-ops, role: operator, product: agent_memory}",
      "section_id": "2-configure-globalirisauth"
    },
    {
      "id": "3-apply-and-check-ex0",
      "language": "bash",
      "code": "curl -sS -X POST \"$IRIS_IDENTITY_URL/v1/api-keys\" \\\n     -H \"Authorization: Bearer $OPERATOR_TOKEN\" \\\n     -H 'Content-Type: application/json' \\\n     -d '{\"name\": \"sso-check\", \"grants\": [<grant>]}'\n   curl -sS -X DELETE \"$IRIS_IDENTITY_URL/v1/api-keys/<key-id>\" \\\n     -H \"Authorization: Bearer $OPERATOR_TOKEN\"",
      "section_id": "3-apply-and-check"
    }
  ]
}
