Skip to main content
OneCLI lets an agent use a stored credential without putting that credential in its environment or credential files. The gateway inserts the value into the upstream request after it checks access. This protects stored credentials. It does not sandbox the code an agent runs.

Who you trust

A compromised agent should not receive the stored value through OneCLI’s inventory or container configuration. It can still use the access you gave its vault. A compromised gateway, API process with decryption access, or operator is outside that protection. Encryption at rest does not protect you from someone who controls the running service and its keys.

What reaches an agent

Inventory and container setup use placeholders or credential stubs for stored service credentials. The agent also holds its own oc_agent_ credential. That credential authorizes use of the vault through OneCLI, so protect it even though it is not an upstream API key. A person’s managing key (oc_key_) manages resources through the API. It is not an agent credential. Keep managing keys, instance encryption keys, and the gateway’s certificate authority private key outside the agent. The one exception is a key you approve for an agent. When an agent runs onecli login and you approve that terminal in the browser after a recent sign-in, the agent stores a managing key so it can connect itself and other agents. That key acts as you in the vaults you can use: an agent holding it can add items, change their permissions, and connect or disconnect agents. It has only the manage permission, so it cannot answer approval requests, make another key, or approve another terminal. It expires after 90 days. Revoke it at Settings > API keys, where it shows as made by onecli login. An agent that only uses a vault doesn’t need this key: connect it with a one-use connect token instead.
An upstream can return a credential in a response. OneCLI does not promise to remove every echoed value. Don’t test with an echo service or give agents access to a service that returns its own authentication headers.

Where decryption happens

Decryption is not limited to forwarding an HTTP request. These are the operations that can open encrypted values on the server: Self-hosted stored values use AES-256-GCM with SECRET_ENCRYPTION_KEY. New ciphertext uses an owner-bound format: opening it under a different row owner fails. Older ciphertext remains readable. Upgrading the binary does not add owner binding to it. The gateway’s secret wrapper redacts normal formatting, cannot be serialized, and wipes its own buffer on drop. That does not wipe every copy made by an HTTP library, JSON parser, or request buffer. Don’t treat process memory, crash reports, or a debugger as safe places for untrusted access.

When a dependency fails

A vault is not an outbound network allowlist. Hosts without a stored credential can still be reachable. Use your container or host network controls when the agent must have no direct internet access.

Known limits in 3.0

  • Older agent tokens remain usable. Agents connected before 3.0 can keep using their non-expiring aoc_ tokens, and the server keeps those tokens in a form it can read back. Disconnect and reconnect these agents to replace that path. They can still use the plain proxy port.
  • A vault’s standing connect token is reusable. A connect token from onecli tokens create works once and expires after 15 minutes by default. A vault can also have a standing oc_connect_ token that never expires. A command that carries it runs inside the sandbox, so a standing credential enters the sandbox. Anyone who copies it can create agents on that vault until you turn it off, and each of those agents can use the whole vault. Turn it off with the API. Turning it off does not disconnect agents already created with it, so check the vault’s agent list for agents you don’t recognize.
  • An agent credential has no expiry by default. Provisioning can set an expiry. Otherwise disconnect the agent to stop it.
  • A self-hosted proxy URL uses HTTP by default. The name HTTPS_PROXY does not mean the hop to the proxy is encrypted. Keep that hop on a protected network, or turn on TLS for agents. The hosted service gives agents an https proxy URL on port 443.
  • An upstream can echo an injected value. Response filtering is not a complete defense against this.
  • Access belongs to the vault. Agents on one vault share its item permissions, including for items added later. Use separate vaults for different access.

Next steps