maqpna audit
Verify, export, stream, tail and import into the audit ledger
Synopsis#
maqpna audit verify FILE [--jwks JWKS.json] [--checkpoints FILE.checkpoints.jws] [--signature-policy classical|hybrid|pq]
maqpna audit export FILE [--session S] [--namespace NS] [--agent A] [--since RFC3339] [--until RFC3339] [--out FILE]
maqpna audit stream FILE --config gateway.json --sink NAME [--from-seq N]
maqpna audit tail --gateway URL [--session S] [-n NS] [--agent A] [--user U] [--trace ID] [--since 1h] [--tail 50] [-f]
maqpna audit import --source cloudtrail|openai|anthropic --ledger FILE [--since T] [--until T] [--state FILE] [--raw-dir DIR]
[--namespace NS [--agent A]] [--event-source S]... [--type T]... [--region R] [--endpoint URL] [--key-env VAR] [--dry-run]
maqpna audit import --source cloudtrail --ledger FILE CLOUDTRAIL_LOG_FILE|DIR...
maqpna audit verify --gateway URL (the gateway verifies its ledger; exit 3 if broken)
maqpna audit verify --postgres DSN-FILE [--schema maqpna] [--chain audit]
maqpna audit export --gateway URL [--session S] [--namespace NS] [--agent A] [--user U] [--since RFC3339] [--until RFC3339] [--out FILE]
maqpna audit fetch jwks|checkpoints|ledger [--gateway URL] --out FILE
maqpna audit sinks [--gateway URL] [--max-lag N] (exit 3 if a sink lags more than N records or has errors)
maqpna audit anchor FILE --key URI --rekor-url URL [--api v1|v2] [--rekor-key PEM|trusted_root.json] [--record]
maqpna audit anchor --gateway URL (the gateway anchors its ledger head now)
maqpna audit verify FILE --anchors --rekor-key PEM|trusted_root.json [--anchors-file F] [--jwks JWKS.json] (transparency-log anchors)
maqpna audit export-segments --out DIR [--since SEQ] [--spool DIR | --ledger FILE] (an edge's sealed segments onto removable media)
maqpna audit forward --from DIR --to URL (push exported segments to a collector; receipts go to DIR/receipts/)Subcommands#
maqpna audit verifyVerify the audit ledger's hash chain, signatures and checkpoints
maqpna audit exportExport audit records, filtered by session, namespace, agent or time
maqpna audit streamBackfill a SIEM audit sink from a ledger file
maqpna audit tailPrint recent audit records from the gateway, optionally following new ones
maqpna audit importImport tool calls from CloudTrail, OpenAI or Anthropic audit logs into the ledger, flagging calls that bypassed the gateway
maqpna audit fetchDownload the gateway's JWKS, checkpoints or ledger
maqpna audit sinksShow the state and lag of the gateway's audit sinks
maqpna audit anchorAnchor a ledger checkpoint in a Sigstore Rekor transparency log
maqpna audit export-segmentsCopy an edge gateway's sealed ledger segments to a directory, e.g. removable media
maqpna audit forwardPush exported ledger segments to a collector and keep its receipts
Examples#
maqpna audit tail --gateway "$GW" -n team-a -f
maqpna audit verify audit.jsonl --jwks jwks.json --checkpoints audit.checkpoints.jws
maqpna audit export --gateway "$GW" --session fix-test-7k2 --out evidence.jsonlWhat happens when you run it#
- Prints a table by default;
-o jsonor-o yamlprint the data, and--jq EXPRfilters the JSON. - Exits
3when the check fails or a result does not match (see exit codes below), so scripts and CI can act on it.
Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | error (the message says what failed, with a hint when there is one) |
2 | usage error: unknown flag, missing argument or bad value; the synopsis is printed |
3 | a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) |
Related commands#
Terminal demo#
Last updated