oz0 secret set
For: Operators and developers looking up a command.
Store a secret; the value comes from stdin, --from-env or --from-file, never from the command line.
The value goes to an edge first. When a provider record reads the secret (its key, or a SigV4 record's access key ID or session token), the edge tests it with one call that spends nothing: the provider's list of models, or a token request. A value the provider refuses is not stored. A secret no record reads calls no provider and is stored untested.
--test also refuses a value no call could check, and waits out the edge's limit of 20 tests a minute; --no-test --reason skips the edge and records why. The value it replaces is kept for 24 hours, so that "secret rollback" can bring it back, unless --discard-previous (a key that leaked). --expires sets a date (2026-12-31) or a rotation period (90d) for reminders.
--host binds the value to the hosts it may be sent to (host, host:port or *.domain; repeat for more), sealed with it: a plugin source's token (--auth-secret), a workspace export's push and pull request, a provider record's key or token endpoint, and a webhook's signature (--signing) go only to these, whoever names the secret. A secret bound to no host is sent nowhere, except that a built-in provider's key (ANTHROPIC_API_KEY, OPENAI_API_KEY and each preset's) also goes to its own provider.
A set without --host keeps the binding the secret had; --unbind clears it. The binding changes only with the value: set it again with the value to bind it elsewhere.
An incoming hook (a routine's or a flow's webhook, an event source) checks its requests only with a signing key bound to the edge's own address its senders post to, with the port (--signing --host oz0-edge.acme.example:7443: the edge API's advertised address, its --public-edge-url or a --san name), or with a secret a connection of its plugin saved.
--ref store:<store>/<path>[#<field>] stores a reference to a secret store instead of a value: the edges that run the store (oz0 secret stores) read the value there, and a new version in the store reaches the plugins that use it. A reference goes only to the hosts its store lists on the edges.
Usage
oz0 secret set <NAME> [flags]
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--discard-previous | bool | keep no previous value for a rollback (a key that leaked) | |
--expires | string | when the secret should be rotated: a date (2026-12-31) or a period (90d, 12w) | |
--from-env | string | read the value from this environment variable | |
--from-file | string | read the value from this file | |
--host | stringArray | a host the value may be sent to: host, host:port or *.domain (repeat for more); a plugin source's token, a workspace export's push, a provider's key or a webhook's signature goes only to these | |
--no-test | bool | store the value without testing it; needs --reason | |
--reason | string | why the value is not tested (with --no-test), for the audit trail | |
--ref | string | store a reference to a secret store instead of a value: store:<store>/<path>[#<field>][@<version>] | |
--signing | bool | a signing key: it signs webhook notifications to its --host, or checks the requests of a hook on the edge it names, and is never sent itself | |
--test | bool | refuse the value unless a provider's check took it (by default only a refusal stops it) | |
--unbind | bool | bind the value to no host: no sink sends it anywhere |
Inherited flags
| Flag | Type | Default | Description |
|---|---|---|---|
--context | string | $OZ0_CONTEXT or <config dir>/orchestrator-zero/context.json | CLI context file written by server init |
--log-level | string | info | log level: debug, info, warn or error |
--tenant | string | default | tenant |
See all oz0 commands and the global flags.