Skip to content

docs(a2a): reconcile IBCT wire-format drift between specs and implementation - #6198

Merged
bug-ops merged 1 commit into
mainfrom
fix/ibct-wire-format-spec-drift
Jul 13, 2026
Merged

docs(a2a): reconcile IBCT wire-format drift between specs and implementation#6198
bug-ops merged 1 commit into
mainfrom
fix/ibct-wire-format-spec-drift

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • specs/010-security/spec.md and specs/014-a2a/spec.md described two different IBCT (Invocation-Bound Capability Token) wire formats. Investigation showed neither spec fully matched the actual implementation in crates/zeph-a2a/src/ibct.rs — the issue's premise that 014-a2a was already accurate turned out to be only half right.
  • Reconciled both specs against ibct.rs and crates/zeph-config/src/channels.rs ground truth:
    • Wire format is a single base64-encoded JSON blob (not a dot-separated <mac>.<key_id>.<timestamp> triplet), signed over {key_id}|{task_id}|{endpoint}|{issued_at}|{expires_at}.
    • Default TTL is 300s, not 60s.
    • ibct_keys is an array of {key_id, key_hex} entries (inline hex signing key), not a key_id -> vault_ref map; ibct_signing_key_vault_ref is the separate vault-resolved primary-key path that takes precedence over ibct_keys[0].
    • Both specs previously claimed IBCT prevents replay attacks. Ibct::verify performs no invocation_id/nonce dedup, so a captured, still-valid token is replayable against the same task_id + endpoint until it expires — this is now documented as a known implementation limitation in both specs' Key Invariants sections instead of being silently misdescribed in opposite directions.
  • Documentation-only change — no source code under crates/ was modified.

Test plan

  • gitleaks protect --staged — no leaks found
  • Every factual claim in the diff independently verified against crates/zeph-a2a/src/ibct.rs and crates/zeph-config/src/channels.rs (signed-field format, base64-JSON wire encoding, default_ibct_ttl() = 300, CLOCK_SKEW_GRACE_SECS = 30, IbctKeyConfig { key_id, key_hex } struct shape, Mac::verify_slice, absence of any invocation_id dedup)
  • git diff --stat scoped to specs/010-security/spec.md, specs/014-a2a/spec.md, CHANGELOG.md only
  • No changes required to config/default.toml, docker compose files, or docs/src/ — no config keys or user-facing behavior changed, only spec text corrected to match existing behavior
  • N/A: testing playbook / coverage-status updates (docs-only spec correction, no new functionality)

Closes #6197

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/M Medium PR (51-200 lines) labels Jul 13, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 13, 2026 01:10
…ntation

specs/010-security/spec.md and specs/014-a2a/spec.md described two
different IBCT wire formats, and neither fully matched
crates/zeph-a2a/src/ibct.rs. Reconcile both against the actual
implementation: single base64-JSON blob (not a dot-separated triplet),
signed over key_id|task_id|endpoint|issued_at|expires_at, default TTL
300s (not 60s), and ibct_keys as an array of {key_id, key_hex} entries
(not a key_id -> vault_ref map). Also correct both specs' claim that
IBCT prevents replay attacks — Ibct::verify has no invocation_id/nonce
dedup, so a captured valid token is replayable until it expires; this
is now documented as a known limitation instead of silently
contradicted between the two spec files.

Closes #6197
@bug-ops
bug-ops force-pushed the fix/ibct-wire-format-spec-drift branch from 278a125 to 3f96cb7 Compare July 13, 2026 01:10
@bug-ops
bug-ops merged commit 3bc8d9c into main Jul 13, 2026
23 checks passed
@bug-ops
bug-ops deleted the fix/ibct-wire-format-spec-drift branch July 13, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(a2a): IBCT wire-format description diverges between specs/014-a2a and specs/010-security

1 participant