Skip to content

docs: sync read-authentication + bind hardening (GHSA-242f) - #41

Open
projectmentor wants to merge 1 commit into
mainfrom
docs/sync-read-auth
Open

docs: sync read-authentication + bind hardening (GHSA-242f)#41
projectmentor wants to merge 1 commit into
mainfrom
docs/sync-read-auth

Conversation

@projectmentor

Copy link
Copy Markdown
Owner

What

Documents the just-implemented sync read-authentication + bind hardening fix for advisory GHSA-242f-7fxg-f7wm (High, CWE-306), which lands as sync protocol version 2. Docs only — no source or test changes.

Writes to the sync daemon were already authenticated (per-entry Ed25519 signatures on ingest); reads were open — any host that could reach :9876 could pull the entire journal off /sync/chunk, and the default bind was 0.0.0.0. The fix requires remote reads to be signed, keeps loopback open, and binds the node's own tailnet IP.

Files changed

  • docs/SYNC_API.md — new Request authentication section (the Hive-Auth-* signed-request envelope: method + path + sorted-query + sha256(body) + timestamp + nonce, freshness window HIVE_SYNC_AUTH_WINDOW, nonce replay guard, admitted-set check); Endpoint authentication classes table (open-discovery / remote-auth / loopback-only); protocol_version 2, advertised_addr, node_id on /hive/info; bind default is the Tailscale IP not 0.0.0.0; 401 error code; Rolling out enforcement runbook.
  • docs/CLI_REFERENCE.mdhv sync auth [off|permissive|enforce] subcommand; HIVE_SYNC_AUTH, HIVE_BIND, HIVE_SYNC_AUTH_WINDOW env vars; dashboard /api/* clarified as loopback-only.
  • docs/ADVISORIES.md — GHSA-242f entry (unauthenticated journal disclosure → read-auth + bind hardening).
  • docs/P2P_DESIGN.md — protocol-2 endpoint auth classes, advertised_addr, bind change, peer-registry example.
  • docs/AGENT_INTEGRATION.md1.18 changelog entry.
  • README.md — sync daemon now signs remote reads and binds the tailnet IP.

Rollout (documented)

Land fix → every node reaches protocol 2 in permissive (clients sign, nothing breaks) → confirm all peers report protocol_version 2 (curl <peer>/hive/info) → flip each node to enforce. Offline nodes keep syncing under permissive.

Not touched

docs/THREAT_MODEL.md (its §3 is rewritten by the code-fix PR — avoiding a conflict) and verify.json/verify.json.sig (CI-signed).

🤖 Generated with Claude Code

Document the protocol-2 sync read-authentication + bind-hardening fix for
GHSA-242f-7fxg-f7wm (High, CWE-306). Reads were previously open — any tailnet
host could pull the whole journal off /sync/chunk; writes were already signed.

- SYNC_API.md: new "Request authentication" (Hive-Auth-* signed envelope) and
  endpoint auth-classification sections; protocol_version 2, advertised_addr,
  node_id on /hive/info; bind default is the tailnet IP not 0.0.0.0; 401 error
  code; phased-enforcement rollout runbook.
- CLI_REFERENCE.md: hv sync auth [off|permissive|enforce]; HIVE_SYNC_AUTH,
  HIVE_BIND, HIVE_SYNC_AUTH_WINDOW env vars; dashboard /api/* is loopback-only.
- ADVISORIES.md: GHSA-242f entry (unauth journal disclosure -> read-auth + bind).
- P2P_DESIGN.md: protocol 2 endpoint auth classes, advertised_addr, bind change.
- AGENT_INTEGRATION.md: 1.18 changelog entry.
- README.md: sync daemon now signs remote reads and binds the tailnet IP.

Docs only — no source/test changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant