Skip to content

Fix dispatcher auth under bounded clock skew - #140

Merged
munirad7s merged 4 commits into
mainfrom
fix/3-agent-clock-skew
Aug 12, 2026
Merged

Fix dispatcher auth under bounded clock skew#140
munirad7s merged 4 commits into
mainfrom
fix/3-agent-clock-skew

Conversation

@munirad7s

Copy link
Copy Markdown
Owner

Summary

  • derive a bounded auth clock from the TLS-authenticated relay WSS upgrade (Date, then production cDate)
  • apply the offset only to newly signed NIP-42 and NIP-98 events; leave Windows time, ordinary events, and the relay's ±60s verification unchanged
  • provision the existing ChatGPT-subscription Codex agent as the no-cost dispatcher with agent-scoped Vault/n8n MCPs through the existing secret shim and the same 17 write denies
  • preserve unrelated Codex settings with an idempotent marked config block and rollback copy

Security

  • WSS-only, TLS-verified time source
  • midpoint calculation, <=30s RTT, <=24h absolute offset
  • malformed/missing/out-of-bound samples fail closed to the previous bounded value
  • no header, challenge, event, key, token, or credential value is logged or committed
  • no API key, paid fallback, Windows clock change, verifier-window change, server deploy, or ordinary event timestamp change

Verification

  • cargo test -p buzz-acp relay::tests (86 passed)
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • .empire/tools/test/codex-dispatcher-mcp-test.sh
  • .empire/tools/test/nest-mcp-secrets-test.sh (6 passed)
  • shell syntax checks and diff/secret scan
  • full cargo test -p buzz-acp: all new tests plus 672 existing lib tests pass; 23 existing Windows tests fail because they spawn Unix cat, reproduced unchanged on origin/main
  • local just ci: affected Rust/workspace and frontend checks pass; Windows Desktop clippy then stops on pre-existing cfg-specific unused/dead-code warnings in untouched Desktop files. CI is the authoritative clean-platform gate.

Closes #3 only after post-merge local rollout and all three exact read-only #agent-lab answers.

Signed-off-by: Munir Adas <m.muniradas@gmail.com>
Signed-off-by: Munir Adas <m.muniradas@gmail.com>
Signed-off-by: Munir Adas <m.muniradas@gmail.com>
Signed-off-by: Munir Adas <m.muniradas@gmail.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@munirad7s
munirad7s merged commit dc2015d into main Aug 12, 2026
84 of 92 checks passed
@munirad7s
munirad7s deleted the fix/3-agent-clock-skew branch August 12, 2026 19:59
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.

P1: MCP-Grundausstattung — Dispatcher erreicht Vault, GitHub, n8n

2 participants