Agentic Data Plane

rpk ai egress-credential attach

Attach an egress credential by writing two policies. One lets sandboxes reach HOST over HTTPS, and the other makes the egress proxy add the credential to their requests. The secret never enters the sandbox.

The policies are a Sandbox.connect permit and a Sandbox.httpRequest permit that carries @inject_credential, tagged redpanda.com/egress-policy-group. Without --sandbox or --template, every sandbox in the tenant gets the credential. Only requests to the credential’s allowed_hosts get it, whatever the policy says: check them with egress-credential get. A credential is sent only over HTTPS.

detach deletes what attach wrote; attachments lists where a credential is attached. Use --dry-run to print the Cedar policies without creating them.

Requires EgressCredential.attach on the credential, and permission to create policies.

Usage

rpk ai egress-credential attach CREDENTIAL --host HOST [flags]

Examples

This section provides examples of how to use rpk ai egress-credential attach.

Every sandbox sends the credential to api.github.com

rpk ai egress-credential attach github --host api.github.com

Only GET requests to one path, only from sandboxes of one template

rpk ai egress-credential attach github --host api.github.com \
  --method GET --path '/repos/*' --template ci

Flags

Value Type Description

--dry-run

bool

Print the policies without creating them.

--host

string

Host name the requests go to (required), for example api.github.com.

--method

strings

Attach only for this HTTP method (repeatable): GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS.

--path

strings

Attach only for this request path, with * as a wildcard (repeatable), for example /v1/*.

--policy-id

string

ID of the connect policy. The request policy ID is the connect policy ID with -http appended. Defaults to an ID derived from the credential and host.

--port

int

Port the requests go to. Default: 443.

--sandbox

string

Attach only for this sandbox (name or sandboxes/<id>).

--template

string

Attach only for the sandboxes created from this template (name or sandboxTemplates/<id>).

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.