Skip to content

feat(discovery): ERC-8004 v1 discovery — plan + Phase 1 implementation#46

Open
eoskl wants to merge 4 commits into
mainfrom
feat/erc-8004-discovery-phase-1
Open

feat(discovery): ERC-8004 v1 discovery — plan + Phase 1 implementation#46
eoskl wants to merge 4 commits into
mainfrom
feat/erc-8004-discovery-phase-1

Conversation

@eoskl

@eoskl eoskl commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

ERC-8004 discovery workstream: the plan + ARB review plus the Phase 1 implementation. Phase 1 serves the ERC-8004 v1 off-chain registration file at GET /.well-known/agent-registration.json, built from a curated, config-driven allow-list. Off-chain only — registrations[] is [] (Phase 2 mints on Base Sepolia) and supportedTrust is ["reputation"].

Plan: docs/roadmap/erc-8004-discovery.md · Mapping: docs/standards/ERC-8004-mapping.md · ARB: docs/compliance/arb-reviews/erc-8004-discovery-2026-06-03/

Commits

  1. plan(discovery) — ERC-8004 identity-registry discovery plan
  2. arb(discovery) — ARB review (Approved with Conditions)
  3. arb(discovery) — reconcile against live MITRE ATT&CK MCP (Final)
  4. feat(discovery)Phase 1 implementation (this is the code)

Phase 1 — what's in it

  • src/discovery/types.ts — ERC-8004 v1 types + versioned type URL
  • src/discovery/AgentRegistration.ts — builder; reads src/config/agent-public.yaml, validates + refuses unsafe shapes, caches
  • src/config/agent-public.yaml — curated source of truth (TMF921 v5 + web; reputation only)
  • src/index.ts — route wiring (after metrics, outside the /api/ limiter) with a dedicated wellKnownLimiter + structured 5xx logging
  • Istio VirtualService — exact-match URI for the well-known path
  • NOTICE / CLAUDE.md — ERC-8004 (CC0) + ChaosChain ref-impl (Apache 2.0) + js-yaml attribution; Standards Implementation Map row
  • package.jsonjs-yaml dep; build copies config/*.yaml to dist/

Architectural note (plan §D5)

services[] is not derived from McpAdapter.getCapabilities(). ERC-8004 is the agent-communication-endpoint surface; McpAdapter is the network-service-capability surface. Distinct layers.

ARB conditions (review 2026-06-03 — Approved with Conditions)

# Condition Status
C1 Security Architecture Viewpoint ✅ plan §11
C2 Dedicated rate limiter on the public route (M1037 vs T1499) wellKnownLimiter + integration test
C5 Structured 5xx logging (DS0015, T1190 detection) logger.error + integration test
C3, C4 Phase 2 (owner-key custody, on-chain monitor) ⏳ open in action register

Verification

  • 355/355 jest tests pass (15 new: 9 unit + 6 integration — AC1.2–1.5, C2 limiter 429, C5 structured 5xx log); tsc --noEmit clean.
  • Live (kind cluster, image ibn-core:erc-8004-phase-1): GET returns 200 application/json with the valid v1 body via both the pod and the Istio ingress gateway (Host: ibn-core.vpnet.cloud) — closes AC1.1.
  • ⚠️ O2C canonical regression could not return fulfilled: the Anthropic API is out of credits (external billing — invalid_request_error). The pipeline reaches the API correctly; this additive discovery route does not touch the intent path, so this is not a regression. Re-run once credits are restored.

Acceptance criteria (plan §4.6)

AC1.1 ✅ live · AC1.2–1.5 ✅ tests · AC1.6 (p95) not a CI gate · AC1.7 ✅ mapping doc · AC1.8 ✅ NOTICE · AC1.9 ✅ headers

Implements: RFC 9315 §4 Principle 5 (Capability Exposure)
TMF921: advertises /tmf-api/intentManagement/v5

🤖 Generated with Claude Code

vpnetconsult and others added 2 commits June 3, 2026 15:53
Adds docs/roadmap/erc-8004-discovery.md — Phase 1 off-chain
registration file (v2.1.0) + Phase 2 Base Sepolia mint (v2.2.0) using
the ChaosChain reference Identity Registry contract.

Per CLAUDE.md Agent-Native Development §2 (Plans before PRs) this
PR is documentation only. Implementation lands separately after
plan approval.

Implements: RFC 9315 §4 Principle 5 (Capability Exposure) — agent-level
TMF921: advertises /tmf-api/intentManagement/v5 as the standards surface
Paper: supports cross-organisational discovery claim for Paper 2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… Conditions

Adds docs/compliance/arb-reviews/erc-8004-discovery-2026-06-03/ — board-ready
ARB Review Report, Action Register, ATT&CK Navigator layer, Architecture
Repository delta note, and directory README.

Decision: Approved with Conditions (5 conditions, max residual risk 6, no
escalation to Executive Risk Committee required). Closes TOGAF G Non-Compliance
on Security Architecture Viewpoint via C1.

Status: Provisional — MITRE ATT&CK MCP unavailable; reconcile against live
KB v15+ before final sign-off. Decision is robust to reconciliation.

Implements: CLAUDE.md Agent-Native Development §4 (Evidence as versioned
artefacts) — ARB output lands under docs/compliance/.

Paper: provides the threat-informed defence viewpoint for the ERC-8004
discovery workstream cited in Paper 2.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@eoskl

eoskl commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

ARB Review — Approved with Conditions

Threat-informed Architecture Review Board review of this plan has been completed and committed to the same branch (commit 68fa24a). The four artefacts live under docs/compliance/arb-reviews/erc-8004-discovery-2026-06-03/.

Decision

Approved with Conditions — 5 conditions, max residual risk 6, no Critical × High. No escalation to Executive Risk Committee required.

# Condition Gate Closes
C1 Add §11 Security Architecture Viewpoint to this plan citing the ARB output Before Phase 1 impl PR TOGAF G Non-Compliance
C2 Dedicated rate limit OR upstream CDN cache on /.well-known/agent-registration.json Phase 1 impl PR T1499 Endpoint DoS
C3 Owner key in K8s Secret + RBAC + rotation cadence in SECURITY.md Phase 2 impl PR T1552.001 + T1555 + T1078.004
C4 On-chain tokenURI monitor + CI pin (catches setAgentURI redirect) Phase 2 impl PR T1565.002 — highest-impact technique for this submission
C5 Route-level structured logging via src/telemetry.ts (4xx/5xx + rate spike) Phase 1 impl PR T1190 detection gap

TOGAF posture

  • Compliant (5): A Principle alignment, B Building Blocks, C Standards Conformance, E Application Architecture, F Technology Architecture, K Governance
  • Partially Compliant (5): D Data Architecture, H Operability, I Cost & Licensing, J Lifecycle & Transition
  • Non-Compliant (1): G Security Architecture Viewpoint — closed by this ARB output (C1 just requires the plan to cite it)

Threat overlay

8 in-scope ATT&CK tactics, 17 prioritised techniques across the union of four threat profiles (telecom-infrastructure, DeFi/crypto-key, generic enterprise, academic/supply-chain). The standout finding:

T1565.002 (Stored Data Manipulation) — a leaked Phase 2 owner key enables setAgentURI(maliciousURL), redirecting all on-chain discovery. Mitigated by C3 (custody), detected by C4 (on-chain monitor + CI pin). Highest-impact technique for this submission.

Provisional caveat

MITRE ATT&CK MCP was not connected during review. Technique IDs (especially T1565.002 and T1657 Financial Theft) need reconciliation against attack.mitre.org v15+ before this report is treated as final. The decision and conditions are robust to ID renamings — only the navigator layer JSON visualisation needs updating if IDs have shifted.

Recommended next steps

  1. Review arb-review-report.md §1–§2 (Executive Summary + Decision).
  2. Confirm conditions C1–C5 are acceptable as written.
  3. Merge this PR once you're satisfied. Then I open feat/erc-8004-discovery-phase-1-impl for the Phase 1 code, with C1, C2, C5 baked in from the start.

🤖 Generated with Claude Code

vpnetconsult and others added 2 commits June 3, 2026 16:27
…CK MCP — Final

Promotes the 2026-06-03 ARB Review for ERC-8004 Discovery from Provisional
to Final via same-day reconciliation against the live MITRE ATT&CK MCP
(enterprise domain). Decision (Approved with Conditions, 5 conditions
C1-C5) stands; substance of all five conditions unchanged.

Material findings, recorded in arb-review-report.md §11:

- Technique ID correction: T1565.002 ("Transmitted Data Manipulation")
  → T1565.001 ("Stored Data Manipulation") — the highest-impact
  technique was correctly described but cited the v15 ID for the wrong
  sub-technique. Applied throughout report, navigator JSON, and action
  register.

- Six M/DS attribution refinements: C2 drops M1031 (not canonical for
  T1499); C3 drops M1041 + M1018 from legs where not canonical, adds
  M1022 + M1026, replaces DS0022 with DS0002 + DS0028 for the cloud-
  account leg; C4 confirms M1041 + M1022 and notes M1029 inapplicable;
  C5 unchanged (all M/DS confirmed canonical).

- Risk #1 (T1190 detection gap) likelihood Medium → High based on live
  group attributions (Volt Typhoon, Salt Typhoon, HAFNIUM, ~50+ groups
  with active telecom-infrastructure campaigns). Residual 4 → 6;
  accepting authority uplifted Domain Architect → Chief Architect /
  CISO delegate. Two risks now sit at residual 6; max residual still
  6, no Executive Risk Committee escalation.

- Phase 1 progress audit: branch feat/erc-8004-discovery-phase-1
  contains only the plan + ARB docs; no implementation code yet. All
  five conditions remain ⬜ Open. C1 is doc-only and closable now via
  plan amendment before the Phase 1 impl PR.

Implements: CLAUDE.md Agent-Native Development §4 (Evidence as
versioned artefacts) — reconciliation lands under docs/compliance/ as
an addendum, not as a rewrite of the historical record.

Paper: tightens the threat-informed defence viewpoint for the ERC-8004
discovery workstream cited in Paper 2 — provisional caveat removed,
ATT&CK IDs and M/DS attributions now match the live KB.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…e 1)

Serve GET /.well-known/agent-registration.json from a curated, config-driven
allow-list (src/config/agent-public.yaml), built and validated by
src/discovery/AgentRegistration.ts. Phase 1 is off-chain only: registrations[]
is [] and supportedTrust is ["reputation"] (TMF921 IntentReport.reportState is
the feedback source; crypto-economic/tee-attestation would be unbacked claims).

Per plan §D5 the services[] surface is NOT derived from
McpAdapter.getCapabilities() — it is the agent-communication-endpoint surface,
distinct from that network-service-capability interface.

ARB conditions (review 2026-06-03, Approved with Conditions) closed in this PR:
- C1: Security Architecture Viewpoint added as plan §11.
- C2: dedicated wellKnownLimiter on the route (outside the /api/ limiter so an
  /api/ DoS cannot block discovery) — M1037 vs T1499.
- C5: structured logger.error on 5xx (DS0015 Application Log) for T1190
  rate-spike detection.
C3/C4 are Phase 2, tracked open in the ARB action register.

Route is mounted after metrics middleware so each request is observed, and the
Istio VirtualService gets an exact-match URI for the well-known path.

Verification:
- 355/355 jest tests pass (15 new: 9 unit + 6 integration covering AC1.2-1.5,
  C2 limiter 429, C5 structured 5xx log); tsc --noEmit clean.
- Live: GET returns 200 application/json with the valid v1 body via both the
  pod and the Istio ingress gateway (Host: ibn-core.vpnet.cloud).
- O2C canonical regression could not return "fulfilled": the Anthropic API is
  out of credits (external billing, invalid_request_error). The pipeline
  reaches the API correctly; this additive route does not touch the intent
  path, so it is not a regression.

Implements: RFC 9315 §4 Principle 5 (Capability Exposure)
TMF921: advertises /tmf-api/intentManagement/v5
Paper: supports Paper 2 cross-organisational discovery claim

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eoskl eoskl changed the title plan: ERC-8004 discovery for ibn-core (Phase 1 + Phase 2) feat(discovery): ERC-8004 v1 discovery — plan + Phase 1 implementation Jun 3, 2026
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