AgentContract operates on a Trust On First Use (TOFU) or DNS-Rooted Trust model. The strict binding is:
- TLS Certificate verifies domain ownership during discovery.
agent.jsonis fetched from that secured domain.- The
agent.jsoncontains an Ed25519 Public Key. - The Content is signed by the corresponding Private Key.
This ensures that even if the JSON is cached by an intermediary or mirrored (e.g. via CDN or RAG pipeline), its integrity can be verified against the embedded public key, and the public key's authority is derived from the original SSL fetch.
- Algorithm: Ed25519 (Edwards-curve Digital Signature Algorithm).
- Performance: High-speed signing/verifying suitable for real-time web requests.
- Security Level: ~128-bit security (comparable to RSA 3072-bit).
- Risk: Attacker intercepts JSON and modifies endpoints to phishing URLs.
- Mitigation: Signature verification fails. Agent drops payload. "Fail-closed".
- Risk: Attacker serves an old, valid
agent.json(e.g., claiming "in stock"). - Mitigation:
last_updatedfield MUST be checked against current time windows (Agent policy). HTTPS (TLS) prevents network-level replay.
- Risk: Malicious bot claims
auditintent to bypass rate limits. - Mitigation: Intent is a declarative signal, not a security gate. Sensitive actions must still be authenticated via standard auth protocols (OAuth, etc) defined in
endpoints.
- Rotate keys periodically.
- Never commit private keys to code. Use environment variables.
- Use
agentcontract-lintin CI/CD pipelines to prevent malformed updates.