Repository navigation
node+sdk: explorer prerequisites — GET / status page, public-read CORS, readKelJson - #405
Merged
Merged
Conversation
… CORS, and readKelJson
Two small, independently useful additions the Network Explorer
(auths-site/docs/plans/network/explorer_plan.md) builds on. Neither grows the
node's trusted surface: the node stays a small signer you check.
W0 — the node's public web surface (crates/auths-witness-node):
- GET / status page (status.rs): one embedded-HTML handler, no JS, no build,
no new deps. Renders node name, member key, roles, members held, and the
copy-pasteable `git fetch` + `auths witness add` one-liners, with links to
the directory, the explorer, and the run-a-witness docs. Served regardless of
role mix. The deployment spec always listed GET / ("liveness + the public
withholding view"); it was never implemented — a browser at the node root saw
nothing. This is deliberately the WHOLE web surface the node has; everything
richer lives in the untrusted explorer.
- CORS on the public GET reads (tower-http cors feature): scoped to GET with no
credentials, so a stranger's browser (the explorer's browser-direct mode) can
query /health, the roster, per-prefix reads, and anchors without a proxy. A
cross-origin write is a non-simple request whose preflight fails against
allow_methods([GET]), so the wildcard origin never enables a cross-site POST.
SDK — readKelJson (packages/auths-node):
- read_kel_json(registryDir, prefix): read a member's KEL out of a
`fetchRegistry` mirror as JSON — events plus, per event, its CESR attachment
hex-encoded — in exactly the shape @auths-dev/verifier's validateKelJson
consumes (attachments[i] pairs events[i], equal length and order). Transport
only: it does not verify. It wraps PerPrefixKelStore (the same store the node
and roster read), so the explorer re-implements no wire. Verified end-to-end
against live network.auths.dev: readKelJson bytes → validateKelJson →
recomputed key state.
Ships readKelJson in the next SDK release; the explorer feature-detects it and
degrades honestly on older builds.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NFugwwLVfYMGPwoP7fJKDJ
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 |
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.
The two prerequisites the Network Explorer (
auths-site/docs/plans/network/explorer_plan.md) builds on. Small and independently useful; neither grows the node's trusted surface.W0 — the node's public web surface (
crates/auths-witness-node)GET /status page (status.rs): one embedded-HTML handler — no JS, no build step, no new deps. Renders node name, member key, roles, members held, and copy-pasteablegit fetch+auths witness addone-liners, with links to the directory, the explorer, and run-a-witness docs. Served regardless of role mix. The deploy spec always listedGET /("liveness + the public withholding view") but it was never implemented — a browser at the node root saw nothing. This is deliberately the whole web surface the node has; everything richer lives in the untrusted explorer.tower-httpcorsfeature): scoped toGETwith no credentials, so a stranger's browser (the explorer's browser-direct mode) can query/health, the roster, per-prefix reads, and anchors without a proxy. A cross-origin write is a non-simple request whose preflight fails againstallow_methods([GET]), so the wildcard origin never enables a cross-site POST. Mirrorsauths-mcp-server's opt-in CORS, tightened to reads.SDK —
readKelJson(packages/auths-node)read_kel_json(registryDir, prefix): reads a member's KEL out of afetchRegistrymirror as JSON — events plus, per event, its CESR attachment hex-encoded — in exactly the shape@auths-dev/verifier'svalidateKelJsonconsumes (attachments[i]pairsevents[i], equal length and order). Transport only: it does not verify. It wrapsPerPrefixKelStore(the same store the node and roster read), so the explorer re-implements no wire.Verification
cargo check -p auths-witness-node --binsand-p auths-nodeboth clean.network.auths.dev:fetchRegistry+readKelJson→ 2 events + 2 hex attachments →validateKelJson(WASM) → recomputed key state (seq 1, tip SAID matches the roster).Release note
readKelJsonships in the next SDK release (0.1.16). The explorer feature-detects it and degrades honestly on older builds, so this is not urgent — butexplorer.auths.dev's git-object KEL path needs it. Please cut0.1.16via the usual release flow when convenient (I did not tag/publish, to avoid guessing at how 0.1.14/0.1.15 were cut).🤖 Generated with Claude Code