docs(a2a): reconcile IBCT wire-format drift between specs and implementation - #6198
Merged
Conversation
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
force-pushed
the
fix/ibct-wire-format-spec-drift
branch
from
July 13, 2026 01:10
278a125 to
3f96cb7
Compare
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.
Summary
specs/010-security/spec.mdandspecs/014-a2a/spec.mddescribed two different IBCT (Invocation-Bound Capability Token) wire formats. Investigation showed neither spec fully matched the actual implementation incrates/zeph-a2a/src/ibct.rs— the issue's premise that014-a2awas already accurate turned out to be only half right.ibct.rsandcrates/zeph-config/src/channels.rsground truth:<mac>.<key_id>.<timestamp>triplet), signed over{key_id}|{task_id}|{endpoint}|{issued_at}|{expires_at}.ibct_keysis an array of{key_id, key_hex}entries (inline hex signing key), not akey_id -> vault_refmap;ibct_signing_key_vault_refis the separate vault-resolved primary-key path that takes precedence overibct_keys[0].Ibct::verifyperforms noinvocation_id/nonce dedup, so a captured, still-valid token is replayable against the sametask_id+endpointuntil 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.crates/was modified.Test plan
gitleaks protect --staged— no leaks foundcrates/zeph-a2a/src/ibct.rsandcrates/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 anyinvocation_iddedup)git diff --statscoped tospecs/010-security/spec.md,specs/014-a2a/spec.md,CHANGELOG.mdonlyconfig/default.toml, docker compose files, ordocs/src/— no config keys or user-facing behavior changed, only spec text corrected to match existing behaviorCloses #6197