PASETO v4.public attestation for agent-uri.
This crate provides cryptographic attestation of agent URIs using PASETO v4.public tokens (Ed25519 signatures). Attestations bind an agent URI to a set of capabilities, signed by a trust root.
Overview
Attestation tokens enable:
- Cryptographic binding of agent URIs to capabilities
- Prevention of spoofing and DHT poisoning
- Bearer token verification without callbacks
Example
use ;
use AgentUri;
use Duration;
// Issuer side: create attestation
let signing_key = generate;
let issuer = new;
let uri = parse.unwrap;
let token = issuer.issue.unwrap;
// Verifier side: validate attestation
let mut verifier = new;
verifier.add_trusted_root;
let claims = verifier.verify.unwrap;
assert_eq!;
assert_eq!;
Token Structure
Attestation tokens are PASETO v4.public tokens containing:
agent_uri: The full agent URI being attestedcapabilities: Array of capability strings grantediss: Issuer (trust root) that created the attestationiat: Issued-at timestampexp: Expiration timestampaud: Optional audience restriction
Security Properties
| Property | How Achieved |
|---|---|
| No algorithm confusion | PASETO v4 is Ed25519-only |
| Replay protection | exp claim validated automatically |
| Trust root binding | iss must match trusted roots |
| URI binding | agent_uri claim verified against expected |
| Tamper detection | Ed25519 signature verification |
Grammar Specification
This crate includes a formal ABNF grammar specification in grammar.abnf
that defines:
- PASETO v4.public token format (
v4.public.<payload>[.<footer>]) - [
AttestationClaims] JSON structure - Field formats and constraints
The grammar follows RFC 5234 and references the agent-uri ABNF for
the agent_uri field format.
Length Constraints
| Component | Max Length |
|---|---|
| Total token | 8192 chars |
| agent_uri | 512 chars |
| capabilities | 64 items |
| Each capability | 128 chars |
| issuer | 128 chars |
| audience | 128 chars |