Roles and access control

KCM decides what each account can see and do from its global role, its roles on environments and clusters, its fine-grained grants, and the role groups it belongs to. Access only adds up: there is no deny rule.

Several users from Team Manage it as code: KCM as code

Global roles

Each account has one global role, set in Settings > Users.

RoleWhat it can do
ADMINEverything, on every resource. Only an ADMIN can change settings, SSO providers, trusted certificates and the license, give the ADMIN role, or manage another ADMIN account. KCM refuses to demote or disable the last enabled ADMIN.
USEROnly what its roles and grants give.
AUDITOR TeamReads everything, administration and audit included, but changes nothing and never sees message or schema content. It counts as a VIEWER on every resource.
SECURITY_ADMIN EnterpriseManages users, service accounts and their tokens, role groups and grants everywhere, and reads the audit trail. It gets no Kafka data and no settings, and never touches an ADMIN account.

Service accounts act through their roles and grants only, like a USER, unless you give them a global role.

Limits of a security administrator

A SECURITY_ADMIN cannot:

Creating a security administrator, or promoting a user to that role, needs the Enterprise edition.

Roles on resources

Three roles can be granted on an environment (a KCM group), a Kafka cluster, a Kafka Connect cluster or a ksqlDB endpoint: VIEWER, EDITOR and ADMIN.

RoleOn a Kafka cluster, it allows
VIEWERBrowse topics and read messages, describe consumer groups, read connectors and schemas.
EDITORAlso every topic operation (create, alter, delete, produce), delete consumer groups and reset their offsets, change connectors, write schemas.
ADMINAlso edit or delete the cluster, add or delete its Kafka Connect clusters and ksqlDB endpoints, manage Kafka users, ACLs and client quotas, Schema Registry connections and global compatibility, partition reassignment and leader rebalancing, and grant access within the cluster (see delegated administration).

Inheritance

An environment ADMIN can also edit the environment and create, edit or delete its clusters.

Fine-grained grants

Grants give a list of operations on resources matching a name or a prefix (LITERAL or PREFIXED). They add access: a user with no role on a cluster can still see the topics granted to it, and a role on the cluster already gives every resource of that cluster.

ResourceOperations
TopicsREAD, WRITE, DESCRIBE, CREATE, DELETE, ALTER, ALL
Consumer groupsDESCRIBE, DELETE, RESET_OFFSETS, ALL
ConnectorsDESCRIBE, UPSERT (create, update, restore, reset offsets), DELETE, CONTROL (pause, resume, restart, stop), ALL
Schema Registry subjectsDESCRIBE, CREATE, DELETE, ALTER, ALL

Each grant can be enabled or disabled and carries an optional description.

Changed in 1.4.0

Before 1.4.0, grants restricted a cluster VIEWER or EDITOR to the granted resources. They now add access. The API lists the users whose grants sit under a cluster role (and so no longer restrict them) in its log at each start, and in GET /api/v1/authz/reports/grants.

Role groups

A role group bundles roles and grants, and gives them to all its members. Manage them in Settings > Role groups:

Only enabled role groups give access. My profile shows each user which role group grants each permission. Members can also come from your identity provider at each SSO sign in, see Role groups from identity provider groups Enterprise.

Delegated administration

Enterprise The ADMIN of an environment, a Kafka cluster or a Kafka Connect cluster can manage access within that scope, without being a global administrator:

A delegated administrator sees only the grants of its scopes (and its own), never touches global roles, role groups or accounts, and cannot give more than ADMIN on its own scope. Without the Enterprise edition, scope ADMINs can still read these grants, but only global ADMINs and security administrators can change them.

Why does a user have access?

The explain API tells whether a user has a role on a resource, and where it comes from:

GET /api/v1/authz/explain?username=alice@example.com&resourceType=KAFKA_CLUSTERS&resourceId=12&permission=EDITOR,ADMIN
{
  "username": "alice@example.com",
  "globalRole": "USER",
  "resourceType": "KAFKA_CLUSTERS",
  "resourceId": 12,
  "permissions": ["EDITOR", "ADMIN"],
  "allowed": true,
  "grants": [
    { "source": "ROLE_GROUP:payments-team", "resourceType": "KCM_GROUPS", "resourceId": 3, "permission": "EDITOR" }
  ]
}

source is DIRECT, ROLE_GROUP:<name>, GLOBAL_ADMIN or GLOBAL_AUDITOR, and the grant may sit on a parent (here, the environment of the cluster). Global ADMINs, auditors and security administrators can ask about anyone; every user can ask about themselves.

The explain API covers roles. For a topic, use GET /api/v1/authorizations/topic-permissions/check.

Manage access as code

Role groups, service accounts and role bindings can be declared in YAML, reviewed in Git and applied by a pipeline. Objects applied that way become read only in the console. See KCM as code.