From 064d37aa35fa419b7dac274745353f6490665454 Mon Sep 17 00:00:00 2001 From: John Morrissey <544926+tachyon-beep@users.noreply.github.com> Date: Fri, 22 May 2026 19:54:47 +1000 Subject: [PATCH] docs(v1.0): refresh internal design docs against ADR-034 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ADR-034 retroactively made non-loopback HTTP binds REQUIRE authentication (HMAC identity or legacy bearer). The internal design docs still described the pre-ADR-034 trust model. Refresh: - requirements.md NFR-SEC-03: rewrite the statement and verification clause for the authenticated-non-loopback rule. Verification now cites the five serve.rs tests that enforce it. See line adds ADR-034. - requirements.md REQ-HTTP-03: same scope as NFR-SEC-03; the See line adds ADR-034 and the verification points at the same test surface. - CLAUDE.md HMAC paragraph: HMAC is the preferred non-loopback mechanism in v1.0 per ADR-034, not "post-1.0 hardening." Replay protection (timestamp + nonce window) remains the only ADR-034 forward-work item. - loom.md: §5 "v0.1 asterisks" → "v1.0 asterisks"; retirement wording retargeted to release:v1.1. Closes gap-register items DOC-03, DOC-04, DOC-05 (folded into the REQ-HTTP-03 rewrite), DOC-06, DOC-07. --- CLAUDE.md | 7 +++- docs/clarion/1.0/requirements.md | 61 +++++++++++++++++++++----------- docs/suite/loom.md | 6 ++-- 3 files changed, 50 insertions(+), 24 deletions(-) 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 `...