Skip to content

witness-node: serve refs/auths/* read-only (the network.auths.dev registry role)#399

Merged
bordumb merged 3 commits into
mainfrom
net/registry-serve
Jul 20, 2026
Merged

witness-node: serve refs/auths/* read-only (the network.auths.dev registry role)#399
bordumb merged 3 commits into
mainfrom
net/registry-serve

Conversation

@bordumb

@bordumb bordumb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Implements the network.auths.dev spec (docs/plans/network/network-auths-dev.md, a local planning doc — that dir is gitignored, like final_spec.md).

The idea

network.auths.dev is not a central registry server (the archived design, and the thing whose 404 started all this). It is the first-party deployment of the open auths-witness-node, and a witness serves what it witnesses. The only net-new capability the spec asked for is here.

What's in it

  • registry role (serve_registry.rs) — exposes the --registry repo read-only over git smart-HTTP by shelling out to git upload-pack (the reference implementation, so pkt-line framing / protocol negotiation / packfiles are git's job, not ours). So git fetch https://network.auths.dev +refs/auths/*:refs/auths/* — exactly what the witness sync-registry already does — resolves party KELs from the node itself. No separate registry service anywhere.
    • Read-only by construction: receive-pack is never invoked — there is no write path to misconfigure. Stronger than a config-based deny.
    • Interop: passes Git-Protocol through (protocol v2, ref-filtered, essential at scale) and decompresses gzip request bodies, so any standard git client works.
    • Own hardening envelope (larger bodies, longer timeout) than the anchor role, merged so the two never mix.
  • ensure_registry — the node initializes an empty --registry on start. An empty registry (no members yet) is a valid new-witness state, so the first node in a network — with no peer to sync from — bootstraps cleanly.
  • Deploygit added to the runtime image; deploy/witness/fly/ (fly.toml + runbook) is network.auths.dev, the reference Fly target anyone copies.

Testing (I can't compile locally, so CI is the gate)

  • serves_refs_auths_over_git_smart_http — builds a repo with a refs/auths/* ref, serves it, and drives a real git fetch +refs/auths/* through the surface, asserting the ref arrives. This exercises the whole subprocess + smart-HTTP path (incl. protocol v2) with the real git binary in CI.
  • refuses_receive_pack_advertisement — the push service is 403'd before git is ever touched.
  • Unit tests for pkt-line framing + gzip round-trip.

rust-analyzer type-checks clean across all touched files.

Not in scope (phase 1, per the spec)

Self-serve member writes (git-push / a registration API) and witness-set-in-KEL resolution (A5). Phase 0 is the target architecture at n=1: a witness serving what it witnesses.

🤖 Generated with Claude Code

claude-release and others added 2 commits July 20, 2026 23:35
Implements the network.auths.dev spec (docs/plans/network/network-auths-dev.md):
network.auths.dev is not a central registry server, it is the first-party
deployment of the open witness node, and a witness serves what it witnesses.

- serve_registry.rs: a `registry` role exposing the --registry repo read-only
  over git smart-HTTP by shelling out to `git upload-pack` (the reference impl).
  Read-only BY CONSTRUCTION — receive-pack is never invoked, so there is no
  write path to misconfigure. Passes Git-Protocol through (v2) and decompresses
  gzip request bodies, so any git client interoperates. Carries its own
  hardening envelope (larger bodies, longer timeout), merged so it never mixes
  with the anchor role's.
- ensure_registry: the node initializes an empty --registry on start (an empty
  registry is a valid new-witness state), so the first node in a network — with
  no peer to sync from — bootstraps cleanly.
- deploy: git in the runtime image; deploy/witness/fly/ (fly.toml + runbook) as
  network.auths.dev, the reference Fly target anyone can copy.
- tests: an end-to-end `git fetch +refs/auths/*` through the served surface
  (CI-validated, since the subprocess/protocol path can't be unit-checked) plus
  the receive-pack refusal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Auths-Scope: sign_commit
Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd
Auths-Device: did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
Auths-Anchor-Seq: 13
A named [processes] group requires each service to declare which group it
serves; `fly config validate` rejects it otherwise. Add processes = ['app'].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Auths-Scope: sign_commit
Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd
Auths-Device: did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
Auths-Anchor-Seq: 13
@github-actions

Copy link
Copy Markdown

Auths Commit Verification

Commit Status Details
0ba6a4de ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp

Result: ✅ 1/1 commits verified

@github-actions

Copy link
Copy Markdown

Auths Commit Verification

Commit Status Details
a422a3f8 ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
0ba6a4de ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp

Result: ✅ 2/2 commits verified

clippy::collapsible_if — the house rule is &&-chains, not nested ifs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Auths-Scope: sign_commit
Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd
Auths-Device: did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
Auths-Anchor-Seq: 13
@github-actions

Copy link
Copy Markdown

Auths Commit Verification

Commit Status Details
68667a06 ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
a422a3f8 ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp
0ba6a4de ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp

Result: ✅ 3/3 commits verified

@bordumb
bordumb merged commit 401bdc9 into main Jul 20, 2026
25 checks passed
@bordumb
bordumb deleted the net/registry-serve branch July 20, 2026 23:24
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