WARDEN-WP-0026 T03: masking display filter (defense-in-depth)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

- warden/mask.py: fingerprint()/mask_value() — presence, length, 8-char sha256
  prefix; never the value.
- proxy.proxy_fetch_fingerprint + `warden access --fingerprint`: masked status view
  (presence/length/hash) that emits no value, so it bypasses the T02 stdout guard.
  Lets two parties compare sha256 prefixes to confirm a shared value without seeing
  it (e.g. rotation landed).
- documented as defense-in-depth (raw bao bypasses it) in OperatorAccessAssist.md
  and the module docstring.
- tests: tests/test_mask.py + CLI fingerprint test. 299 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-16 14:54:55 +02:00
parent 04c8b2ab1d
commit fc0f18aa5c
7 changed files with 150 additions and 3 deletions

View file

@ -31,12 +31,20 @@ $ warden access "npm token" --field NPM_AUTH_TOKEN --exec -- npm publish
$ warden access "npm token" --path <p> --wrap # then: bao unwrap <token>
# interactive login (login lane): no token required, no secret-read gate
$ warden access "login oidc" --domain coulomb_social --fetch
# masked status: presence, length, short hash — never the value (WP-0026 T03)
$ warden access "npm token" --path <p> --fingerprint # hidden len=40 sha256:1a2b3c4d
```
> **Raw `--fetch` to stdout is the anti-pattern.** It is refused when stdout is
> captured or piped (a logged-context disclosure risk); pass `--unsafe-stdout` only
> for an interactive human terminal. Prefer `--out` / `--exec` / `--wrap`.
> **`--fingerprint` is defense-in-depth, not a boundary.** It masks warden-mediated
> output so two parties can compare `sha256` prefixes to confirm they hold the same
> value (e.g. that a rotation landed) without either seeing it. It only masks
> *warden's* output — raw `bao kv get <path>` bypasses it entirely. The real boundary
> is OpenBao policy plus capabilities-safe verify (T01) and the no-stdout transports.
`--json` gives a stable, secret-free shape for agentic operators.
---