[ISS-006] Rename iroh-node-id header to Peer-Id
Summary
Incoming requests include an iroh-node-id header containing the caller's verified Ed25519 public key (base32). The name is project-specific and should be replaced with Peer-Id — a shorter, ecosystem-aligned name without vendor prefix.
Decision
Chosen name: Peer-Id
- No
X- prefix — RFC 6648 deprecated the X- convention for custom headers. Since this header is part of the iroh-http protocol spec (not application-specific), it should not use a prefix.
- "Id" not "Key" — in this protocol, peer ID and public key are the same thing (the base32-encoded Ed25519 public key). Most developers will use it for identity/access control (
if peerId === allowed), not cryptographic operations. The PublicKey class and docs already make the crypto aspect clear.
- Alternatives considered:
Peer-Key (ambiguous — sounds like an API key), Peer-Public-Key (verbose for a header typed often).
Evidence
- Observed during live testing: the header
iroh-node-id appeared on incoming requests
- Aligns with libp2p ecosystem terminology ("peer" is the standard term)
X- headers deprecated per RFC 6648
Impact
Low — cosmetic/naming issue. But setting a good header name early matters because changing it later is a breaking protocol change.
Remediation
- Rename
iroh-node-id → peer-id in Rust core (server.rs: strip, inject, and header name)
- Update compliance tests (
cases.json: test IDs, paths, header references)
- Update smoke/e2e tests (Deno
smoke.test.ts, Node e2e.mjs)
- Update all docs (protocol.md, default-headers.md, recipes, guidelines, specification.md)
- Update examples (Tauri
main.ts)
- Document in protocol spec that
Peer-Id value is the base32 Ed25519 public key and is cryptographically verified
Acceptance criteria
- Header name is documented in protocol spec
- Name is consistent across all adapters
- If renamed, old name continues to work for one version (deprecation period)
Regression test
- Layer: N/A
- Test: N/A
- Verified failing before fix: N/A
[ISS-006] Rename iroh-node-id header to Peer-Id
Summary
Incoming requests include an
iroh-node-idheader containing the caller's verified Ed25519 public key (base32). The name is project-specific and should be replaced withPeer-Id— a shorter, ecosystem-aligned name without vendor prefix.Decision
Chosen name:
Peer-IdX-prefix — RFC 6648 deprecated theX-convention for custom headers. Since this header is part of the iroh-http protocol spec (not application-specific), it should not use a prefix.if peerId === allowed), not cryptographic operations. ThePublicKeyclass and docs already make the crypto aspect clear.Peer-Key(ambiguous — sounds like an API key),Peer-Public-Key(verbose for a header typed often).Evidence
iroh-node-idappeared on incoming requestsX-headers deprecated per RFC 6648Impact
Low — cosmetic/naming issue. But setting a good header name early matters because changing it later is a breaking protocol change.
Remediation
iroh-node-id→peer-idin Rust core (server.rs: strip, inject, and header name)cases.json: test IDs, paths, header references)smoke.test.ts, Nodee2e.mjs)main.ts)Peer-Idvalue is the base32 Ed25519 public key and is cryptographically verifiedAcceptance criteria
Regression test