witness-node: serve refs/auths/* read-only (the network.auths.dev registry role)#399
Merged
Conversation
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
Auths Commit Verification
Result: ✅ 1/1 commits verified |
Auths Commit Verification
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
Auths Commit Verification
Result: ✅ 3/3 commits verified |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
network.auths.devspec (docs/plans/network/network-auths-dev.md, a local planning doc — that dir is gitignored, likefinal_spec.md).The idea
network.auths.devis not a central registry server (the archived design, and the thing whose 404 started all this). It is the first-party deployment of the openauths-witness-node, and a witness serves what it witnesses. The only net-new capability the spec asked for is here.What's in it
registryrole (serve_registry.rs) — exposes the--registryrepo read-only over git smart-HTTP by shelling out togit upload-pack(the reference implementation, so pkt-line framing / protocol negotiation / packfiles are git's job, not ours). Sogit fetch https://network.auths.dev +refs/auths/*:refs/auths/*— exactly what the witnesssync-registryalready does — resolves party KELs from the node itself. No separate registry service anywhere.receive-packis never invoked — there is no write path to misconfigure. Stronger than a config-based deny.Git-Protocolthrough (protocol v2, ref-filtered, essential at scale) and decompresses gzip request bodies, so any standard git client works.ensure_registry— the node initializes an empty--registryon 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.gitadded to the runtime image;deploy/witness/fly/(fly.toml+ runbook) isnetwork.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 arefs/auths/*ref, serves it, and drives a realgit fetch +refs/auths/*through the surface, asserting the ref arrives. This exercises the whole subprocess + smart-HTTP path (incl. protocol v2) with the realgitbinary in CI.refuses_receive_pack_advertisement— the push service is 403'd before git is ever touched.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