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.
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 |
|---|---|---|
|
bool |
Print the policies without creating them. |
|
string |
Host name the requests go to ( |
|
strings |
Attach only for this HTTP method ( |
|
strings |
Attach only for this request path, with * as a wildcard ( |
|
string |
ID of the connect policy. The request policy ID is the connect policy ID with |
|
int |
Port the requests go to. Default: |
|
string |
Attach only for this sandbox (name or sandboxes/<id>). |
|
string |
Attach only for the sandboxes created from this template (name or sandboxTemplates/<id>). |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |