Secrets, passwords, and OpenBao: Secret module
Back to Secrets, passwords, and OpenBao.
Secret module
Section titled “Secret module”Add the capability to a normal Bakery module. Missing metadata and policy fields are added automatically. There is deliberately no field for the secret value.
[ { "resource_module": "managed_secrets", "resource": { "identifier": "managed_secrets", "type": "module", "fields": [ {"identifier": "name", "type": "text", "options": {"label": "Name", "rules": "required"}} ], "options": { "capabilities": [{"identifier": "Secrets"}] } } }]Built-in types are login, api_key, generic, ssh_static, ssh_signed, ssh_otp, database_static,
database_dynamic, and totp. Dynamic types store the OpenBao mount and role as non-secret configuration and issue
short-lived leases at use time.
Normal entity permissions control metadata access. human_grantees, agent_grantees, and secret_approvers
additionally constrain use. Static reveal defaults to a per-secret password step-up. Its proof is short-lived, bound to
one user and one secret, and consumed by the reveal.
Retiring disables use immediately and schedules purge after 30 days. Broker audit events are append-only and contain actor, agent run, operation, result, purpose, and request metadata, but never values or generated TOTP codes. OpenBao’s audit device provides the backend audit trail.
Password-manager widget
Section titled “Password-manager widget”{ "type": "widget", "options": { "widget": "secret_manager", "module": "managed_secrets", "capability": "Secrets", "dynamic_height": true }}The widget edits metadata through normal entity modals and sends values separately to OpenBao. It supports one-time reveal, copying, retirement/restoration, and live TOTP codes. Root users see an authenticated OpenBao anmelden link when the Passport/OIDC configuration is complete.
Create metadata with type totp, then use Set value. Existing authenticators can be imported with a Base32 key or
an otpauth:// URL. OpenBao can generate a key from issuer and account_name. Generated enrollment data is returned
only from that setup request and must not be persisted in entity fields or logs.
Agent access
Section titled “Agent access”Assign the secrets toolkit to an agent and add it to agent_grantees. request_secret_access creates a run-bound
request with a mandatory purpose. Depending on approval_mode, it returns a pending grant or an opaque handle. The
handle is intended for broker-aware SSH, database, and shell tools; it is not the secret value.
per_run is the default. preapproved can issue a short-lived handle without interactive approval. Static plaintext
exposure to an LLM remains disabled unless the secret explicitly permits it. Shell and SSH are separate consumers and
should not accept raw credentials in tool input.
Tool and policy configuration
Section titled “Tool and policy configuration”Secret and execution tools are not standard agent equipment. Configure an agent with tool_policy set to
execution_operator, select only the required secrets, shell, or ssh toolkits, and assign an execution profile.
All three conditions are required: the policy defines the maximum surface, the toolkit assignment narrows it for the
agent, and the host-managed profile defines the sandbox.
get_secret is an exceptional plaintext path. It accepts only an approved run-bound handle for reveal, totp, or
database, and the secret entity must enable allow_agent_reveal. The value is passed to the model once in memory;
conversation messages, run events, logs, and the tool-output spill store receive only a redaction. Prefer broker-aware
tools instead. Shell secret bindings inject a value directly as an environment variable and SSH resolves credentials
inside the API process, so neither requires plaintext in a tool argument.
Approval modes have distinct semantics:
per_useconsumes a handle atomically on its first matching redemption.per_runreuses the approved handle only within the same run.preapprovedcreates a short-lived run-bound handle without an interactive approval.
Handles are checked against secret, operation, agent, run, status, and expiry. Terminal agent runs revoke remaining handles and close their SSH sessions.