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:.

Examples

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

Usage

rpk security role assign [ROLE] --principal [PRINCIPALS...] [flags]

Aliases

assign, add

Flags

Value Type Description

-h, --help

-

Help for assign.

--principal

strings

Principal to assign the role to (repeatable).

--config

string

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

-X, --config-opt

stringArray

Override rpk configuration settings. See rpk -X or execute rpk -X help for inline detail or rpk -X list for terser detail.

--format

string

Output format. Possible values: json, yaml, text, wide, help. Default: text.

--profile

string

Profile to use. See rpk profile for more details.

-v, --verbose

-

Enable verbose logging.