Skip to content

node+sdk: explorer prerequisites — GET / status page, public-read CORS, readKelJson - #405

Merged
bordumb merged 1 commit into
mainfrom
explorer/node-status-and-readkeljson
Jul 21, 2026
Merged

bordumb merged 1 commit into
mainfrom
explorer/node-status-and-readkeljson

Conversation

@bordumb

@bordumb bordumb commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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-pasteable git fetch + auths witness add one-liners, with links to the directory, the explorer, and run-a-witness docs. Served regardless of role mix. The deploy spec always listed GET / ("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.
  • 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. Mirrors auths-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 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.

Verification

  • cargo check -p auths-witness-node --bins and -p auths-node both clean.
  • End-to-end against live network.auths.dev: fetchRegistry + readKelJson → 2 events + 2 hex attachments → validateKelJson (WASM) → recomputed key state (seq 1, tip SAID matches the roster).

Release note

readKelJson ships in the next SDK release (0.1.16). The explorer feature-detects it and degrades honestly on older builds, so this is not urgent — but explorer.auths.dev's git-object KEL path needs it. Please cut 0.1.16 via 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

… 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
@github-actions

Copy link
Copy Markdown

Auths Commit Verification

Commit Status Details
672e78c1 ✅ Verified Signed by did:keri:EO1cBsYoV5izKvdIL6TstN5TOQl1hYN3WnhtAOh1lwAp

Result: ✅ 1/1 commits verified

@bordumb
bordumb merged commit 672e78c into main Jul 21, 2026
21 of 24 checks passed
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