These are the docs for aquaman 0.20.0. Read the current version.
Docker Sandboxes secrets from 1Password, Bitwarden or your keychain
Docker Sandboxes (sbx) already keeps credentials out of the sandbox: a proxy on your machine injects them, and the agent in the VM sees a placeholder. By default the values come from your OS keychain. Point sbx at aquaman to source them from any vault aquaman supports, with an allow-list and an audit entry for each read.
npm install -g aquaman-proxy
aquaman setup # 1. pick your vault
aquaman daemon & # 2. start the daemon
aquaman credentials add github token # 3. store the secret, if it is not there yet
aquaman broker allow aquaman://github/token # 4. allow it to be handed out
sbx secret set github \
--command "$(command -v node) $(command -v aquaman) get aquaman://github/token" \
--refresh on-demand # 5. sbx reads it from aquaman
sbx runs that command from a background service without your shell’s PATH, which is why step 5 stores absolute paths. Repeat steps 4 and 5 per service.
A secret that is already in your vault
If the token is already an item in 1Password, Bitwarden, HashiCorp Vault, the Keychain, KeePassXC or Keeper, do not type it again. Link the reference to the item in place of step 3. Requires aquaman 0.19.0 or later.
With 1Password (aquaman setup --backend 1password, the op CLI signed in):
aquaman daemon & # the daemon shows the approval dialog
aquaman credentials link github/token 'op://Private/GitHub/token' # you allow it in the dialog
aquaman broker allow aquaman://github/token
sbx secret set github \
--command "$(command -v node) $(command -v aquaman) get aquaman://github/token" \
--refresh on-demand
With Bitwarden (aquaman setup --backend bitwarden, the bw CLI logged in):
export BW_SESSION="$(bw unlock --raw)" # unlock; the session exists in this shell only
aquaman daemon & # started from the same shell, so it has the session
aquaman credentials link github/token 'bw://GitHub/password' # you allow it in the dialog
aquaman broker allow aquaman://github/token
sbx secret set github \
--command "$(command -v node) $(command -v aquaman) get aquaman://github/token" \
--refresh on-demand
- The locator names one field of one item. 1Password:
op://<vault>/<item>/[<section>/]<field>. Bitwarden:bw://<item id or exact item name>/<field>, where the field ispassword,username,notesor the name of a custom field. If two Bitwarden items have the same name, use the item id. The forms for the other vaults are in the agent contract. aquaman credentials linkopens a dialog that names the reference and the item. Nothing in your vault is read before you allow it. Then aquaman reads the item once to check it, and records your approval in the vault. Exit code 0 means linked, 2 means you denied it, 3 means nobody answered, 1 means it was refused or the daemon is not running.- aquaman only reads a linked item. It never changes or deletes it. After you change the value in the item,
sbxgets the new one once the daemon’s cache of the old one has expired (15 minutes by default with 1Password and Bitwarden).aquaman credentials unlink github/tokenremoves the link and leaves the item alone. aquaman broker allowis a separate step on purpose. A link alone does not letaquaman gethand the value out.- Reading linked items is tested against stand-ins for the
opandbwCLIs, not against live accounts.
The Bitwarden session
The Bitwarden backend runs the bw CLI, and bw only reads a vault that is unlocked. aquaman does not unlock it and never asks for your master password. It takes the session key from BW_SESSION in the environment of the process that runs aquaman daemon, keeps it in that process’s memory and passes it to each bw it starts. aquaman setup --backend bitwarden stops with the unlock command if the vault is locked and no session is set.
- Where the session is: in your shell’s environment and in the daemon’s. aquaman does not write it to
config.yamlor anywhere else on disk. - How long it lasts: until
bw lockorbw logout, per Bitwarden’s documentation. After that the daemon’s reads fail until you unlock again and restart the daemon from a shell that has the newBW_SESSION. - Values are cached in the daemon’s memory for 15 minutes by default with Bitwarden, so
sbxasking often does not startbweach time.credentials.cacheTtlSeconds: 0in~/.aquaman/config.yamlturns that off. aquaman service installdoes not carry the session. A daemon started at login does not inherit your shell, and aquaman writes no secret into the login item.installandaquaman service statusnameBW_SESSIONunderenv_not_passed. With Bitwarden, start the daemon by hand from a shell where the vault is unlocked. The same holds for a HashiCorp Vault token inVAULT_TOKENand a 1Password service account token inOP_SERVICE_ACCOUNT_TOKEN. The macOS Keychain needs nothing from the environment, so the login item works with it: Start the aquaman daemon at login.
A service sbx has no built-in definition for
sbx secret set <service> covers the services Docker lists in its credentials guide (Anthropic, OpenAI, GitHub and others). For any other API, Docker’s guide documents sbx secret set-custom, which takes the destination hosts, the variable name the sandbox sees, and the same --command source. For Stripe:
aquaman credentials add stripe secret_key # or link an existing item, as above
aquaman broker allow aquaman://stripe/secret_key
sbx secret set-custom \
--host api.stripe.com \
--env STRIPE_SECRET_KEY \
--command "$(command -v node) $(command -v aquaman) get aquaman://stripe/secret_key"
Run with sbx 0.54.0 and aquaman 0.19.0: sbx stored the secret, printed the placeholder it generated for the variable, and listed the command as an on-demand source; aquaman’s audit log showed the read sbx made to check it. The same run stored a built-in service with sbx secret set github --command ... --refresh on-demand, which sbx answered with “command resolved successfully”. sbx calls custom secrets experimental, and says a command source runs from a fresh temporary directory, which is why the command holds absolute paths.
Cloud sandboxes
This page is for sandboxes on your machine. Docker’s documentation for cloud sandboxes says the cloud secret commands do not support --ref and --command sources, so a cloud sandbox cannot read from aquaman this way.
If you are an agent
- Hand the setup to the person.
aquaman setupasks questions,aquaman credentials addasks for the value (hidden),aquaman credentials linkopens a dialog for them, andaquaman daemonstays running. Give them the commands above; never ask for a secret in the conversation. - Use a locator only if the person gave it to you. Do not guess vault, item or field names: the dialog shows them exactly what you wrote.
- Where the secret ends up:
sbxreceives the value and its proxy injects it; the agent in the sandbox sees a placeholder. aquaman decides which references may be read and records each read. It does not hide the value fromsbx. - The daemon does not come back by itself.
aquaman daemonis gone after a reboot or logout, andsbxcannot read the secret until the person starts it again. Tell them.aquaman service installmakes it start at every login: Start the aquaman daemon at login.
Good to know
- For a service
sbxhas no built-in definition for, give the secret its destination hosts too: since sbx 0.51 a custom secret without them is not substituted. - In a script, pass
--forceinstead of piping a confirmation (sbx 0.48+). aquaman getonly works for references you allowed, and each read is inaquaman audit tail.- Docker’s proxy does the injecting here; aquaman supplies the value. The value is handed to
sbx, so this path is about where secrets live and who read them, not about hiding them fromsbx.
More: main README