Skip to main content
Writing Sample

This page was originally written for Redpanda as part of the Group-Based Access Control (GBAC) feature. It is reproduced here as a portfolio writing sample.

Configure Group-Based Access Control

note

This feature requires an Enterprise Edition license on your cluster.

Group-based access control (GBAC) extends OIDC authentication to let you manage permissions at the group level instead of per user. You can grant permissions to groups in two ways: create ACLs with Group:<name> principals, or assign groups as members of RBAC roles. Both approaches can be used independently or together. Because group membership is managed by your identity provider (IdP), onboarding and offboarding require no changes in Redpanda.

After reading this page, you will be able to:

  • Configure the cluster properties that enable GBAC
  • Assign an OIDC group to an RBAC role
  • Create a group-based ACL using the Group: principal prefix

Prerequisites

  • OIDC authentication must be configured and enabled on your cluster.
  • Superuser access to configure cluster properties and manage ACLs.
  • Enterprise Edition license on your cluster.

Assign groups to roles

Assigning a group to an RBAC role is the recommended pattern for managing permissions at scale. All users in the group inherit the role's ACLs automatically.

To assign a group to a role:

rpk security role assign <role-name> --group <group-name>

For example, to assign the engineering group to the DataEngineers role:

rpk security role assign DataEngineers --group engineering

To remove a group from a role:

rpk security role unassign <role-name> --group <group-name>

For example:

rpk security role unassign DataEngineers --group engineering

Create group-based ACLs

You can grant permissions directly to a group by creating an ACL with a Group:<name> principal. This works the same as creating an ACL for a user, but uses the Group: prefix instead of User:.

To grant cluster-level access to the engineering group:

rpk security acl create --allow-principal Group:engineering --operation describe --cluster

To grant topic-level access:

rpk security acl create \
--allow-principal Group:engineering \
--operation read,describe \
--topic 'analytics-' \
--resource-pattern-type prefixed

If your groups use path-style names (with nested_group_behavior set to none), use the full path as the principal name:

rpk security acl create --allow-principal 'Group:/departments/eng/platform' --operation read --topic platform-data

View groups and roles

List groups assigned to a role

To see which groups are assigned to a role, use --print-groups:

rpk security role describe <role-name> --print-groups

For example:

rpk security role describe DataEngineers --print-groups

To list all roles assigned to a specific group:

rpk security role list --group <group-name>

For example:

rpk security role list --group engineering