Agentic Data Plane

rpk ai policy analyze

Analyze a draft using PermissionService. Does not read or write stored policies or make authorization decisions. Requires an environment and authentication. Source is limited to 64 KiB of UTF-8. Diagnostics are printed even when analysis fails; parse or validation errors return a nonzero exit status. Warnings alone do not fail.

This command was introduced in ai version 0.2.94.

Usage

rpk ai policy analyze [flags]

Examples

This section provides examples of how to use rpk ai policy analyze.

rpk ai policy analyze --cedar-file draft.cedar -o json
cat draft.cedar | rpk ai policy analyze --cedar-file=- -o json
rpk ai policy analyze --cedar 'permit(principal, action, resource);'

Flags

Value Type Description

--cedar

string

inline Cedar policy text. Mutually exclusive with --cedar-file.

--cedar-file

string

Cedar input file, or - for stdin. Never overwritten. Mutually exclusive with --cedar.

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.