Skip to content

Secret Stubs

Runta can authenticate your agent’s request without exposing real credentials to your agents.

To ensure maximum security, utilize interactive input methods that prevent these values from being recorded in your shell history.

Terminal window
export OPENAI_API_KEY=sk... # Set the source environment variable.
runta secret set openai-api-key --value-env OPENAI_API_KEY # Read the value from an environment variable.
printf '%s' 'ghp_...' | runta secret set github-token --value-stdin # Pipe a value directly over stdin.
runta secret set internal-api --prompt --cache-ttl-secs 300 # Enter the value securely in an interactive prompt.

Store additional secrets by repeating secret set or the SDK set call. There is no separate bulk-secret method.

Secret stubs match a destination host and optional path. The literal ${credential} placeholder is replaced with the stored secret value when the egress gateway injects the outbound request.

Terminal window
runta secret rule set \
demo \
--host api.openai.com \
--path '/v1/*' \
--secret openai-api-key \
--header Authorization \
--template 'Bearer ${credential}'

CLI flags create one rule per command. To create several rules in one CLI command, use a YAML file:

rules:
- runtime: demo
host: api.openai.com
path: /v1/*
secret: openai-api-key
header: Authorization
template: Bearer ${credential}
- runtime: demo
host: api.github.com
path: /repos/*
secret: github-token
header: Authorization
template: Bearer ${credential}
Terminal window
runta secret rule set -f rules.yaml

Python and TypeScript create multiple rules with repeated SDK calls. Setting the same runtime, host, path, and injection target updates the existing rule instead of creating a duplicate.

Terminal window
runta secret rule list --runtime demo
runta secret rule delete <stub_id>

Deletion is by stub ID. Delete several rules by iterating over the list; the CLI and SDKs do not expose a bulk-delete operation.

Omit --runtime in the CLI to list all runtime-scoped stubs. Tenant-wide stub listing is also available through runta.secrets.list_secret_stubs() in Python and runta.secrets.listSecretStubs() in TypeScript.

Use the Runta CLI for terminal workflows, shell scripts, and direct runtime operations.

TaskCLI command
Store a tenant secretrunta secret set openai-api-key --prompt
Create a runtime secret stubrunta secret rule set demo --host api.openai.com ...
List runtime secret stubsrunta secret rule list --runtime demo
Inspect one secret stubrunta secret rule describe <stub_id>
Delete a secret stubrunta secret rule delete <stub_id>