Cloud

rpk security role assign

Assign a Redpanda role to a principal.

The --principal flag accepts principals with the format '<PrincipalPrefix>:<Principal>'. If 'PrincipalPrefix' is not provided, then defaults to 'User:'.

Usage

rpk security role assign <role> --principal <principals...> [flags]

Aliases

rpk security role add

Examples

This section provides examples of how to use rpk security role assign.

Assign role redpanda-admin to user red.

rpk security role assign redpanda-admin --principal red

Assign role redpanda-admin to users red and panda.

rpk security role assign redpanda-admin --principal red,panda

Assign role topic-reader to group analytics.

rpk security role assign topic-reader --principal Group:analytics

Assign role ops-admin to both a user and a group.

rpk security role assign ops-admin --principal alice,Group:sre

Flags

Value Type Description

--principal

stringSlice

Principal to assign the role to (repeatable).

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.