These are the docs for aquaman 0.21.0. Read the current version.
NIST SP 800-53 Rev 5 Mapping
aquaman maps to NIST SP 800-53 Rev 5 control families that govern authentication, access enforcement, key management, and audit. Same evidence applies to NIST CSF 2.0 (PR.AA-*, DE.AE-*) and SOC 2 Common Criteria (CC6.1 logical access, CC6.6 transmission, CC7.2 system monitoring).
| Control ID | Family | aquaman feature | Test |
|---|---|---|---|
| IA-5 | Authenticator Management | Eight vault backend implementations (Keychain, 1Password, HashiCorp Vault, KeePassXC, encrypted-file, systemd-creds, Bitwarden, Keeper). Credentials are stored, rotated, and accessed via the vault’s native APIs. With the encrypted-file backend the vault is aquaman’s own file, encrypted with AES-256-GCM under a password-derived key (BSI TR-02102-1 mapping). |
test/compliance/nist/ia-5-authenticator-mgmt.test.ts |
| AC-3 | Access Enforcement | Per-service request-policy engine evaluates method + path against allow/deny rules before credentials are injected. Denied requests return 403 and never reach the upstream provider. Policy is evaluated over every reading of the request the proxy knows an upstream might apply (path case for deny rules, encoded slashes, ;params, method-override headers and _method, X-Original-URL and X-Rewrite-URL); the spellings it does not cover are listed in the test. The UDS path is gated by 0o600 socket-file permissions; the opt-in loopback listener (Hermes path) is gated by a per-install token (constant-time compare) — requests without a valid token get 401 before any credential work, and /_health is the only exemption. |
unit: ac-3-access-enforcement.test.ts + integration via t0012-valid-accounts.test.ts (403 round-trip) + loopback token gate in loopback-listener.test.ts + every spelling of a denied request in policy-evasion.test.ts |
| AC-6 | Least Privilege | The broker endpoint (v0.12.0+) materializes credentials per tool call with a short-lived TTL (default 60s, max 3600s). The agent’s shell environment holds the credential only for the duration of one command, not for the agent process lifetime. The aquaman-hermes plugin observes least privilege from the other side: it consults only *_BASE_URL env vars, never *_API_KEY — it has no need for, and no access to, the credential. |
covered by AC-3 test + broker tests in test/e2e/credential-proxy.test.ts + hermes/tests/test_compliance.py |
| SC-12 | Cryptographic Key Establishment & Management | Vault backends are operator-chosen and operator-managed. aquaman delegates key management to the chosen backend (Keychain, Vault, etc.). The exception is encrypted-file, where aquaman derives the key from the user’s password itself (parameters). |
covered by IA-5 test |
| SC-28 | Protection of Information at Rest | Audit log is written chmod 0o600 to ~/.aquaman/audit/current.jsonl. Credentials at rest live in the vault backend (operator-chosen encryption). aquaman’s own writes (auth-profiles.json, config.yaml) use 0o600. |
test/compliance/nist/sc-28-protection-at-rest.test.ts |
| AU-2 | Event Logging | A forwarded request, a policy denial, a broker read, a broker refusal, the outcome of a credential-request dialog and an OpenShell driver operation each write one entry. An entry records the time, the service, the operation (use, read or rotate), whether it succeeded and, for a failure, the error text: a policy denial’s names the method and path, a broker refusal’s names the reference. It does not record the key name of a successful use, the method, path or status of a forwarded request, or which listener the caller used, and a request refused before a service is known (a missing loopback token, a rejected Host header or request target) writes no entry. A value is handed out only after its entry is written: if the write fails, a broker read and an OpenShell resolve are refused, a forwarded request’s response is withheld, and the daemon keeps running. Loopback requests go through the same audited path as the Unix socket. |
audit-fail-closed.test.ts (no value without an entry) + au-10-tamper-evident.test.ts (an access writes an entry) + loopback path in loopback-listener.test.ts |
| AU-9 | Protection of Audit Information | Each entry carries a sequence number and the hash of the entry before it, and its own hash covers both (SHA-256). The sequence never restarts, and after a rotation the new file links to the last entry of the archive. aquaman audit verify walks that chain through the retained files and detects an entry altered, inserted, reordered or deleted, a gap in the sequence, and a missing or changed newest archive. It then compares the log with its anchor: the sequence and hash of the last entry and the sequence the log is supposed to begin at (from), which a process that writes the log stores in the credential store at most once every audit.anchorIntervalSeconds (default 60, or 900 with 1Password, Bitwarden or Keeper; 0 turns it off), at once after it pruned old archives, and at graceful shutdown. A log that ends before the anchored sequence, is empty or missing, holds a different entry there, or begins later than from fails, so a truncated, emptied, deleted or rebuilt log is detected, and so is one whose early entries were removed: only pruning raises from. Several processes may write one log (a daemon and a proxy OpenClaw started); each append is made under a lock file and continues from what is on disk, so they form one chain. Commands that read the log (audit verify, audit tail) never change it. The limits, each a failing-by-design row in the test: entries written after the last anchor are not anchored, so cutting off the entries of the last interval is not detected; software that can write to the credential store can move or delete the anchor, or raise its from, as well as change the log; an anchor written without from says nothing about where the log begins. The anchor is not reachable through aquaman by a caller: the broker, the proxy, the OpenShell driver, aquaman credentials and the migration from an OpenClaw config refuse the reserved service name. A log with no anchor yet (written before anchoring existed, or by a process that has not stored one) passes as “not anchored yet”. If the credential store cannot be read, audit verify fails and says so; --chain-only checks the chain alone. aquaman audit accept sets the anchor to the log as it is, for a log that was restored or deleted on purpose; it needs a terminal, a typed yes and no proxy running, and writes an entry recording the reset. The log is 0600 in a 0700 directory. See The audit log’s anchor. |
au-9-au-10-tampering.test.ts: one row per attack; the undetected ones are it.fails rows. audit-anchor-reserved.test.ts: the reserved name at every entry point. audit-log-shared.test.ts and audit-log-processes.test.ts: several writers and a reader on one log |
| AU-10 | Non-repudiation | Partial. The chain and the anchor are integrity evidence for the entries from the anchor’s from up to the last anchor, within the limits stated under AU-9. Entries that pruning removed are gone, and the anchor records that the log begins later, not what they were. It is not non-repudiation in the control’s sense: an entry names no individual actor (agentId is system, or openshell for the OpenShell driver), the chain is neither signed nor keyed, and the anchor is protected only by the credential store’s own access control. |
au-9-au-10-tampering.test.ts + au-10-tamper-evident.test.ts |
| SI-10 | Information Input Validation | Secret-pattern redactor scrubs known credential shapes (AWS, GitHub, Stripe, Slack, OpenAI, Anthropic, JWTs, PEM private keys, …) from agent inputs/outputs. Service names + key names validated against safe regex before vault lookup. The Hermes aquaman_status tool/command validates its output discipline too — it surfaces only non-secret metadata (origin host:port + env var names), never the token or a key value. |
si-10-input-validation.test.ts + output discipline in hermes/tests/test_compliance.py |
The audit log’s anchor
The hash chain is unkeyed and lives in one directory. On its own it shows a change inside the log and nothing else: a log with its end cut off, an empty log and a log rebuilt from scratch are each a valid chain. The anchor is the part kept somewhere else.
- What it is.
{ "v": 1, "seq": <n>, "hash": "<hash of entry n>", "at": "<time>", "from": <m> }, stored in the configured credential backend asaquaman_internal/audit_anchor.seqandhashsay where the log ended.fromis the lowest sequence that is supposed to be on disk: 1 until old archives are pruned (maxArchives, ten by default), then the first entry of the oldest archive that was kept. Pruning is the only thing that raises it, and it never goes down. - Who writes it. A process that writes the log while it serves:
aquaman daemon, and the proxies OpenClaw starts. After an entry is written it stores a new anchor at most once peraudit.anchorIntervalSeconds, at once after it pruned (until the anchor says so, the log looks as if it had lost its early entries), and once more when it is stopped with SIGINT or SIGTERM. At shutdown it waits five seconds at most for the vault; if the vault does not answer it printsAUDIT FAILURE: ...and exits. An idle process writes nothing. - Several processes, one log. A daemon and a proxy OpenClaw started on the same config directory both write the log. Each append is made under a lock file in the audit directory (
write.lock, held for one append) and continues from the last entry on disk, so the two form one chain with consecutive sequence numbers. A writer that cannot get the lock within two seconds fails that write, and the request it belongs to is answered as any request whose audit entry could not be written (audit_unavailable); a lock left by a process that is gone, or older than five seconds, is taken over. Each process reads the anchor in the vault before it writes its own and leaves it alone when it is not behind. A writer follows only entries that link to the last one it wrote: if the log was cut short or replaced under a running process, that process goes on from its own entry, printsAUDIT FAILURE: ..., and the chain shows the break. - Reading never changes the log.
aquaman audit verifyandaquaman audit tailcreate no file or directory and do not touch the write-ahead file, so they can run beside a serving proxy. When the files change whileaudit verifyreads them, it reads again before it reports an error. The default is 60 seconds. With 1Password, Bitwarden or Keeper each write runs that vault’s CLI, which can ask you to unlock it, so the default there is 900 seconds; withencrypted-fileor KeePassXC a write rewrites the file. That is why writes are spaced out and not made per request.anchorIntervalSeconds: 0turns anchoring off. - It only moves forward. At start the process compares the log with the stored anchor. If the log is behind it, holds a different entry at that sequence, or begins later than
from, it printsAUDIT FAILURE: ...on stderr, keeps serving and logging, and writes no anchor until a person has runaquaman audit accept. A failed anchor write is also anAUDIT FAILUREline and is tried again at the next interval; it never fails a request. aquaman audit verifyexits 0 when the chain is valid, the log holds the anchored entry and begins no later thanfrom, and prints how many entries follow the anchor. It exits 1 when the log is truncated, missing or rebuilt, when entries are missing from its beginning (head_missing: “entries N to M are missing: they were on disk when the anchor was written”), when the stored value is not an anchor, and when the credential store cannot be read.--chain-onlyskips the anchor and says that it did.--jsonprintsvalid,chain(valid,errors,entries,last_seq,last_hash,verified_from),anchor(status,seq,at,from,unanchored,message) andfix.- The bootstrap case. A log with no anchor in the credential store passes and is reported as “not anchored yet”. That is a log written before anchoring existed, or one whose process has not stored an anchor. Entries written without a sequence number count by their line position, and the next entry written continues from there.
aquaman audit acceptis for a log that legitimately differs from its anchor: restored from a backup, or deleted on purpose. It asks for a typedyesat a terminal and refuses without one, refuses while a proxy is running, writes an entry that records the old and new sequence, and sets the anchor to the log as it is, withfromat the first entry that is on disk. It does not accept a log whose chain is broken; move the audit directory aside first so a new log starts.
What it does not cover:
- Entries written after the last anchor are not anchored. Cutting off the newest entries, up to one interval’s worth, is not detected.
- Software that can write to the credential store can move or delete the anchor. The anchor is as well protected as the vault is: a vault that asks before each write, or one that other software running as you cannot open, protects it; the
encrypted-filebackend with its password in the environment of that software does not. - Software that can write to the credential store can also raise
from, and then remove the entries before it. - An anchor written without
fromsays nothing about where the log begins. No release wrote one.audit verifypasses such a log and says that it was not checked for missing early entries; the next anchor a serving process writes carriesfrom, taken from the log as it is then. - Pruning deletes the old archives before the anchor can say so. A process that is killed in between, or whose vault cannot be written then, leaves a log that begins later than its anchor says.
audit verifyreports the pruned entries as missing, a process that starts on that log pauses anchoring, andaquaman audit acceptis the way forward. Nothing was tampered with, and nothing in the log can show that. - A writer follows the log from the file that holds its own last entry. If other processes rotate and prune that file away between two writes of one process (ten rotations, 100 MB, with the defaults), that process cannot tell the log from a replaced one, goes on from its own entry, and the chain is broken from there.
- Two processes that find the same lock abandoned in the same instant can both take it, and then write the same sequence number. That needs a writer that stopped in the middle of an append and two others waiting for it. It is not covered by a test.
- If the process is killed and the archive holding the anchored entry is pruned before it starts again, the log can no longer be tied to its anchor. It is reported, and
aquaman audit acceptis the way forward.
SOC 2 Common Criteria mapping
| SOC 2 CC | NIST equivalent | Same evidence applies |
|---|---|---|
| CC6.1 Logical access — restrict access to information assets | IA-5, AC-3, AC-6 | Yes |
| CC6.6 Transmission of sensitive information | SC-12, SC-28 (in-transit covered by UDS + chmod 0o600 + operator-chosen TLS to upstream) | Yes |
| CC7.2 Monitor system for unauthorized activity | AU-2, AU-9, AU-10 | Yes |
What this is not
- Not an audit certification (SOC 2 / ISO 27001 / FedRAMP / etc.). Those require a third-party assessor.
- Not a complete control implementation — aquaman is a component that contributes evidence to those controls. The end-to-end control evaluation depends on how the operator deploys aquaman (vault backend choice, policy config, OS-level access to
~/.aquaman/, etc.). - The
aquaman-hermesPython plugin contributes evidence only as a credential-free status/health layer. It enforces no control itself; the loopback isolation is proxy-side. Its conformance tests assert it does not undermine the proxy’s guarantees (no credential held, harvested, or logged), not that it implements them. - The daemon’s credential cache (v0.13.1+) keeps vault-fetched values in proxy memory for a bounded TTL (default 15 min for 1Password/Bitwarden/Vault, else off;
cacheTtlSeconds: 0disables). It is memory-only (SC-28 unaffected), sits behind policy enforcement (AC-3), emits audit events per request rather than per backend fetch (AU-2), and write-invalidates so vault rotation via aquaman is immediate (IA-5). Conformance:test/compliance/cache-residency.test.ts.
References
- NIST SP 800-53 Rev 5: https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final
- NIST CSF 2.0: https://www.nist.gov/cyberframework
- SOC 2 Trust Services Criteria: https://www.aicpa-cima.com/resources/landing/system-and-organization-controls-soc-suite-of-services
- For a machine-readable evidence report, run
vitest run test/compliance/nist/ --reporter=json.