diff --git a/CLAUDE.md b/CLAUDE.md index 1fb4ffe1..c872e760 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -141,7 +141,12 @@ Open issues for the v1.0 known limitations and any post-release follow-ups live - **WP9-B (Filigree finding emission)** — deferred from 1.0 per the [Sprint 2 scope amendment](docs/implementation/sprint-2/scope-amendment-2026-05.md#4-v01-planmd-resequencing). - **HTTP file language manifest registry** — narrow core-extension fallback at 1.0; persistent registry is a post-1.0 task. -- **HMAC inbound auth (C-4)** — bearer is the 1.0 wire surface; HMAC is forward-compatible and tracked for post-1.0 hardening. +- **HMAC inbound auth (C-4)** — HMAC (`X-Loom-Component: clarion:`) is the + preferred non-loopback authentication mechanism in v1.0 per ADR-034, + configured via `serve.http.identity_token_env`. The legacy bearer-token path + (`serve.http.token_env`) remains supported for compatibility. Replay + protection (timestamp + nonce window) is ADR-034 forward-work tracked for + post-1.0 hardening. ## Filigree Issue Tracker diff --git a/docs/clarion/1.0/requirements.md b/docs/clarion/1.0/requirements.md index eb688b5d..36b50d51 100644 --- a/docs/clarion/1.0/requirements.md +++ b/docs/clarion/1.0/requirements.md @@ -558,19 +558,28 @@ Clarion exposes read-only HTTP endpoints: `GET /api/v1/entities`, `GET /api/v1/e #### REQ-HTTP-03 — Registry-backend HTTP trust model For Filigree `registry_backend: clarion`, Clarion's HTTP read API is -unauthenticated and loopback-only by default. Non-loopback binds are refused -unless `serve.http.allow_non_loopback: true` is set; that opt-in requires an -authenticated reverse proxy or equivalent operator-managed access-control layer -outside Clarion. +loopback-only by default. Non-loopback binds require **both** +`serve.http.allow_non_loopback: true` **and** a resolved authentication secret +— either HMAC identity via `serve.http.identity_token_env` (preferred per +ADR-034) or a legacy bearer token via `serve.http.token_env`. A non-loopback +bind with the opt-in but no resolved secret is refused at startup with +`CLA-CONFIG-HTTP-NO-AUTH`. The loopback-without-token mode remains +unauthenticated and emits a startup warning that any local process can read the +catalogue; non-loopback no longer has an unauthenticated mode. **Rationale**: the ADR-014 read surface is a bounded local federation contract, -not the earlier broad HTTP API. The implementation prevents accidental network -exposure mechanically and leaves intentional non-loopback exposure to deployment -controls. -**Verification**: loopback bind starts without extra flags; non-loopback bind is -rejected without `allow_non_loopback`; non-loopback opt-in logs an -unauthenticated-surface warning. -**See**: System Design §9 (Integrations, HTTP Read API), ADR-014. +not the earlier broad HTTP API. ADR-034 closes the original gap that permitted +unauthenticated non-loopback binds behind the `allow_non_loopback` opt-in +alone. The implementation prevents accidental network exposure mechanically and +makes intentional non-loopback exposure fail closed without an authentication +secret rather than silently warn-and-bind. +**Verification**: `crates/clarion-cli/tests/serve.rs` covers the loopback +default (line 1457), the loopback `identity_token_env`-resolution-failure +refusal (line 1495), the non-loopback-without-auth startup refusal (line 1547), +the non-loopback HMAC-required path (line 1579), and the non-loopback +legacy-bearer path (line 1614). The loopback startup-warning surface is covered +by config-layer tests. +**See**: System Design §9 (Integrations, HTTP Read API), ADR-014, ADR-034. #### REQ-HTTP-04 — ETag-style response caching @@ -770,17 +779,29 @@ Clarion structures prompts with explicit `...