RFC-AITP-0002
RFC-AITP-0002
Identity Binding
Document: RFC-AITP-0002 Version: 0.3.4-draft Status: Community Standards Track (Review) Depends on: RFC-AITP-0001 Core
Abstract
This RFC defines how an agent's AID is bound to a verifiable claim from a trusted issuer. AITP does not define an identity system; this RFC defines how identity is presented and verified between peers. The verifying party is always another peer agent (not a third-party verifier or service): see RFC-AITP-0001 §4 Architecture.
Where identity proof appears. Identity proof — the verifiable JWT (for OIDC), signature (for pinned_key), or SVID-backed proof (for spiffe) — is exchanged inline during the Mutual Handshake (RFC-AITP-0004 §3). The Agent Manifest (RFC-AITP-0003 §3.1) carries only an identity hint (identity_hint): static type/issuer/subject metadata, with no proof field. The hint lets peers discover which identity provider an agent uses; the verifiable proof is presented fresh each handshake so it can be bound to a per-handshake nonce and to the verifying peer's AID. The aud, cnf.jkt, and nonce requirements in §2 apply to the handshake-level identity proof only, never to the Manifest hint.
v0.3 supports three identity types: oidc (§2), pinned_key (§3) and spiffe (§6). spiffe is at registry status Proposed (registries/identity-types.md) and its conformance fixtures are draft. Future identity types extend this RFC without modifying the core envelope.
1. Identity Descriptor
{
"identity": {
"type": "oidc | pinned_key | spiffe",
"issuer": "<issuer URI — oidc only>",
"subject": "<subject identifier>",
"proof": "<jwt or signature>",
"public_key": "<base64url — pinned_key only>",
"svid_type": "<jwt-svid | x509-svid — spiffe only>",
"x5c": ["<standard-base64 DER certificate — spiffe x509-svid only>"]
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | string | REQUIRED | Identity mechanism: oidc, pinned_key or spiffe. |
issuer | string | REQUIRED for oidc; MUST be absent for pinned_key and spiffe | Issuer URI (MUST match JWT iss claim). A pinned_key descriptor has no issuer: its trust anchor is the local pinned_keys store (§3.2), so an issuer member on it is rejected with IDENTITY_FAILED. The identity-descriptor schema enforces this in its pinned_key branch, and the same rule for spiffe in its spiffe branch (§6.1). |
subject | string | REQUIRED | Agent subject identifier. For spiffe, the SPIFFE ID (§6.1). |
proof | string | REQUIRED | JWT for OIDC; for pinned_key, a JCS-profile signature in the RFC-AITP-0001 §5.4.3 wire format, Ed25519 or P-256 (§3.1). For spiffe, a JWT-SVID (§6.3) or a signature by the X509-SVID key (§6.4). |
public_key | string | REQUIRED for pinned_key; MUST be absent for oidc and spiffe | base64url-encoded public key. For pinned_key, this is the key the verifier looks up in its pinned_keys configuration (§3.2). For oidc, the agent's public key is already encoded in the verifying-peer envelope's sender.agent_id (the AID-identifier component) — there is no second copy in the descriptor, and including one would create an ambiguity over which key the JWT's cnf.jkt is meant to bind. The identity-descriptor schema (schemas/json/aitp-identity.schema.json) enforces this: its oidc branch forbids public_key, mirroring the IdentityHint rule that the Manifest schema applies to identity_hint. v0.3 verifiers MUST reject an OIDC identity descriptor that carries public_key. |
svid_type | string | REQUIRED for spiffe; MUST be absent otherwise | jwt-svid or x509-svid: which SVID form backs proof (§6.1). |
x5c | array of strings | REQUIRED for spiffe with svid_type x509-svid; MUST be absent otherwise | The X509-SVID and its intermediates, leaf first (§6.4). |
extensions | object | OPTIONAL | Extension namespace per RFC-AITP-0001 §7 and RFC-AITP-0012. Unknown keys inside extensions MUST be ignored; unknown members outside it are rejected with UNKNOWN_FIELD. The identity descriptor is not an exception to §7's "every signed object reserves an extensions slot" — it reserves one like every other signed object, in both the standalone and the handshake-embedded form. |
The canonical JSON Schema is schemas/json/aitp-identity.schema.json.
One descriptor, two schema files. The canonical schema above is authoritative.
schemas/json/aitp-mutual-handshake.schema.jsoncarries a$defs/IdentityDescriptormirror of it, because every schema in this repo is self-contained — none resolves a cross-file$ref, so an offline validator needs exactly one fetch per artifact. The mirror is a copy, not a second definition: it MUST equal the canonical file minus that file's$schema/$id/title/examplesmetadata, andscripts/check-doc-coherence.shstage 5 fails the build if the two drift. Implementers MUST follow the canonical file; a descriptor that validates standalone validates identically inside a handshake payload.The two had drifted (issue #40). The embedded copy was missing the
extensionsslot, thepublic_keygrammar, and thenot: {required: [public_key]}guard that enforces this section's MUST-reject rule for an OIDC descriptor carryingpublic_key— so that MUST went unenforced in the only path where the descriptor actually travels. Both are now the same object.
Note on
proofinputs. The proof input differs by type. Foroidc,proofis a self-contained JWT (§2). Forpinned_key,proofis a signature whose input binds fields drawn from the surrounding handshake envelope (§3.1) — including thepop_noncecarried onMUTUAL_HELLO/MUTUAL_HELLO_ACK(RFC-AITP-0004 §3). The descriptor itself does NOT carry the nonce; verifiers reconstruct the proof input from the envelope and the localreceiver_aid. The pinned-keysubjectis not covered byproof; it is authenticated only by the enclosing envelope signature.
Note on P-256 pinned keys (informative).
pinned_keyis not Ed25519-only. A Manifestidentity_hintof typepinned_keywhosepublic_keyis the 44-char compressed P-256 identifier of anaid:pubkey:p256:AID is valid, and so is the matching handshake descriptor (§3.1, §3.3).
2. OIDC Identity Type
2.1 Proof format
proof MUST be a compact-serialized JWT (RFC 7519) issued by issuer.
2.2 Required JWT claims
| Claim | Description |
|---|---|
iss | MUST match identity.issuer. |
sub | MUST match identity.subject. |
aud | MUST equal the verifying peer's AID (aid:<method>:<identifier>). Prevents replay of a JWT from one peer to another. |
exp | MUST be in the future. |
iat | MUST be within ±300 s of current time. |
nonce | MUST equal the pop_nonce value carried on the same handshake message (MUTUAL_HELLO for the initiator's identity, MUTUAL_HELLO_ACK for the target's identity, per RFC-AITP-0004 §3). Binds the JWT to a specific handshake instance and prevents replay of the same JWT in a different session, even between the same iss/sub/aud triple. The pop_nonce is a 128-bit base64url string; the JWT carries it byte-identically (no decoding, no re-encoding). |
cnf.jkt | MUST equal the RFC 7638 JWK thumbprint of the public key encoded in the agent's aid (the same key that signed the agent's Manifest). Binds the JWT to the AID's signing key, preventing reuse with a different key pair (DPoP-style binding, per RFC 9449 §6). The thumbprint input is pinned in §2.2.1 below. |
The aud, nonce, and cnf.jkt requirements are AITP-specific reuses of standard JWT claims. They impose no protocol changes on the identity provider — any OIDC IdP that supports the standard aud and nonce claims and a cnf confirmation method (RFC 7800) can issue conformant JWTs.
2.2.1 Canonical JWK form for cnf.jkt
The JWK used to compute cnf.jkt is the canonical JWK of the agent AID's public key in that AID's own algorithm, per RFC-AITP-0001 §5.4.4. The two v0.3 algorithms (RFC-AITP-0001 §5.3) give exactly these two forms:
-
Ed25519 AID (
aid:pubkey:<identifier>oraid:pubkey:ed25519:<identifier>). The OKP form, exactly:{"crv":"Ed25519","kty":"OKP","x":"<aid-identifier>"}where
<aid-identifier>is the 43-character identifier component of the AID, i.e. the unpadded base64url encoding of the 32-byte raw Ed25519 public key. -
P-256 AID (
aid:pubkey:p256:<identifier>). The EC form, exactly:{"crv":"P-256","kty":"EC","x":"<x>","y":"<y>"}where
<x>and<y>are the unpadded base64url encodings of the 32-byte big-endian affine coordinates of the point obtained by decompressing the 33-byte SEC1 compressed point that the AID's 44-character identifier encodes. Each is 43 characters. The compressed identifier itself never appears in the JWK.
The thumbprint is computed per RFC 7638: serialize the JSON object for the AID's algorithm with its members in lexicographic order (crv, kty, x for OKP; crv, kty, x, y for EC), no whitespace, hash with SHA-256, encode the digest as unpadded base64url. Implementations MUST NOT include any other JWK members (no kid, no alg, no use) when computing the thumbprint — additional members would change the canonical serialization and the resulting hash. A verifier MUST derive the JWK form from the algorithm of the AID it is checking; computing the OKP form for a P-256 AID, or the reverse, yields a thumbprint that MUST NOT match.
Shared convention with the portable trust artifacts. In
aitp/0.3this same RFC 7638cnf.jktconvention is also the proof-of-possession key binding on the compact-JWS portable trust artifacts — the TCT and the delegation token (RFC-AITP-0001 §5.4.4, which cites this section). The v0.1 raw-public-keybinding.cnfform on the TCT no longer exists; identity binding and token binding now use onecnf.jktconvention.
Known-answer test. For the pinned all-zero-seed Ed25519 keypair (
kat-keypair-001inschemas/conformance/known-answer/keypairs.json),aid-identifier = O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik, the canonical JWK input is{"crv":"Ed25519","kty":"OKP","x":"O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik"}(87 bytes), and the resultingjktMUST be9ZP03Nu8GrXPAUkbKNxHOKBzxPX83SShgFkRNK-f2lw. For the pinned P-256 keypair (kat-keypair-005-p256),aid = aid:pubkey:p256:AweBDql0zqV3PmO4l_N-O-mgnnpf6blxpE0QZawqOpMR, the canonical JWK input is{"crv":"P-256","kty":"EC","x":"B4EOqXTOpXc-Y7iX83476aCeel_puXGkTRBlrCo6kxE","y":"Y35HpPmUZKD9zkSojsfXA6kYPB0GVS2eLWt2BpSBxXc"}(126 bytes), and the resultingjktMUST be6uuEaX_87uMh4VKEtSDkENgjC0g7Evt6vliSnD7XSDE(kat-jwk-thumb-005-p256). Additional vectors live atschemas/conformance/known-answer/jwk-thumbprints.json. Conformance fixtureid-023is an OIDC identity binding whose agent AID is this P-256 key.
2.3 Verification steps
A peer verifying an identity binding MUST:
- Resolve the issuer's public keys (see RFC-AITP-0007).
- Verify the JWT signature against the resolved keys.
- Validate that
issmatches the identity descriptor'sissuer. - Validate
expis in the future. - Validate
iatis within the timestamp tolerance. - Validate
audequals the verifying peer's own AID. Reject otherwise. This defeats cross-peer JWT replay. - Validate
nonceequals thepop_noncefrom the surrounding handshake message (MUTUAL_HELLOorMUTUAL_HELLO_ACK, whichever carried this identity). Reject otherwise. This defeats same-peer JWT replay across handshakes. - Validate
cnf.jkt. Compute the JWK thumbprint (RFC 7638) of the public key encoded in the agent's AID; the JWT'scnf.jktMUST equal that thumbprint. Reject otherwise. This binds the identity proof to the AID's signing key. - Confirm
issuerappears in the localtrust_anchorsconfiguration (or in the peer's Manifestaccepted_trust_anchorsfor the converse direction).
Peers MUST NOT accept JWTs from issuers not present in trust_anchors. Peers MUST NOT accept JWTs missing aud, nonce, or cnf.jkt.
The numbering above lists what is checked, not when key material is fetched. A verifier SHOULD perform step 9 before step 1, so that it never resolves or fetches keys for an issuer it does not trust. Inside the handshake, RFC-AITP-0004 §5.1 step 6 fixes this order (descriptor shape first, then the trust-anchor check, then key resolution and proof verification) and states which error code results when an untrusted issuer coincides with another failure.
2.4 Example
A decoded JWT payload (claims) for an OIDC identity binding presented by Agent A to Agent B (using the kat-keypair-002 AID from schemas/conformance/known-answer/keypairs.json for B):
{
"iss": "https://auth.openai.com",
"sub": "agent-gpt4-instance-xyz",
"aud": "aid:pubkey:A6EHv_POEL4dcN0Y50vAmWfk1jCbpQ1fHdyGZBJVMbg",
"iat": 1711900000,
"exp": 1711903600,
"nonce": "AxwAx0m1v63X7ZsDG-3Npg",
"cnf": {
"jkt": "9ZP03Nu8GrXPAUkbKNxHOKBzxPX83SShgFkRNK-f2lw"
}
}The aud is B's AID exactly as B's AID is written, in whatever algorithm form it has (RFC-AITP-0001 §5.3): here the untagged Ed25519 form, aid:pubkey: followed by 43 unpadded-base64url characters; for a P-256 verifier it would be aid:pubkey:p256: followed by 44. The aud comparison is byte-for-byte; a verifier MUST NOT rewrite either side to another form of the same key. The nonce is the byte-identical pop_nonce from the corresponding MUTUAL_HELLO payload. The cnf.jkt is the RFC 7638 thumbprint of A's AID public key, computed per §2.2.1.
Wrapped in the identity descriptor:
{
"identity": {
"type": "oidc",
"issuer": "https://auth.openai.com",
"subject": "agent-gpt4-instance-xyz",
"proof": "<compact-serialized JWT carrying the claims above>"
}
}3. Pinned Key Identity Type
3.1 Proof format
proof is a signature over the full handshake context — sender, receiver, message identity, timestamp, and the per-handshake pop_nonce — using the agent's private key. Binding all five fields prevents a captured signature from being replayed against a different sender, receiver, message, or handshake.
proof_input =
"aitp-pinned-key-v1\0"
|| sender_aid_bytes || "\0"
|| receiver_aid_bytes || "\0"
|| message_id_bytes || "\0"
|| timestamp_ascii_decimal || "\0"
|| pop_nonce_decoded_bytes
proof = base64url(sign(agent_private_key, sha256(proof_input)))proof uses the JCS-profile signature wire format of RFC-AITP-0001 §5.4.3, with the primitive of §5.4.6.
- A
p256sender MUST emit the tagged formp256.<86-char-b64url>. - An
ed25519sender MAY emit either the legacy untagged form ored25519.<86-char-b64url>. - The tag MUST match the algorithm of
sender.agent_id, per §5.4.3 rule 3. An untagged proof is read ased25519, so an untagged proof from ap256sender is an algorithm mismatch and is rejected withIDENTITY_FAILED, whatever its raw bytes would verify as.
sign is the per-algorithm primitive of RFC-AITP-0001 §5.4.6: sha256(proof_input) is the digest d, hashed exactly once. An Ed25519 key signs d as its message; a P-256 key uses d directly as the ECDSA hashed message (e = d) and MUST NOT hash it again.
Where:
sender_aid_bytesis the UTF-8 encoding of the fullaid:pubkey:...string of the signing peer.receiver_aid_bytesis the UTF-8 encoding of the fullaid:pubkey:...string of the receiving peer.message_id_bytesis the UTF-8 encoding of the envelope'smessage_idUUID string in canonical lowercase form (RFC-AITP-0001 §5.2).timestamp_ascii_decimalis the UTF-8 encoding of the envelope'stimestampas its base-10 ASCII decimal string (e.g.1711900000→b"1711900000"), matching howmessage_idis likewise encoded as a string rather than binary-packed.pop_nonce_decoded_bytesis the raw bytes obtained by base64url-decoding the handshake'spop_nonce(NOT the base64url string itself).\0is a single null byte separator.
Erratum. This section's text stated, through
0.2.1-draft, thattimestampwas encoded astimestamp_be_8_bytes— an 8-byte big-endian signed 64-bit integer — contradicting how this section reads now. The pinned proof in this repository's conformance pack (id-007's real Ed25519 signature overkat-keypair-003, reused verbatim askat-pinned-key-proof-001below) has been ASCII-decimal-encoded since the original conformance commit; it was never re-signed to produce this correction. No pinned bytes changed — the prose moved to match the artifact, not the other way around. That said, this is not a no-op for implementations: an implementation that built its proof input by following the oldtimestamp_be_8_bytestext produces a different signature than one that follows the pinned vector, and MUST switch encodings to interoperate.id-007alone never surfaced this, because its expected outcome is rejection at §3.2 step 3 (the public key is absent from the localpinned_keysstore) before proof verification is ever reached — a big-endian implementation could passid-007, and the rest of the v0.2 conformance pack, without the defect being caught.kat-pinned-key-proof-001closes that gap: it pinsproof_input, the Ed25519 signature oversha256(proof_input), and additionally pins that the same signature does NOT verify whentimestampis instead packed as an 8-byte big-endian integer, making the encoding machine-checkable rather than a matter of reading the prose. SeeCHANGELOG.mdfor the old and new values.
Replay resistance. v0.3 pinned-key proofs are bound to the full handshake context — the same five fields v0.1 bound (sender, receiver, message, timestamp, nonce); only
timestamp's on-the-wire encoding within the proof input changed, per the erratum above. A signature produced for one (sender, receiver, message, timestamp, nonce) tuple cannot be replayed against a different tuple.
Known-answer test. The
kat-pinned-key-proof-001vector inschemas/conformance/known-answer/jcs-sha256.jsonpins a concrete(sender, receiver, message_id, timestamp, pop_nonce)tuple, the resultingproof_inputbytes, and the Ed25519 signature oversha256(proof_input)produced withkat-keypair-003. It also pins that the same signature does NOT verify whentimestampis instead encoded as an 8-byte big-endian integer, so the ASCII-decimal encoding is machine-checkable rather than a matter of prose interpretation. Two more vectors in the same file cover the other wire forms.kat-pinned-key-proof-002-p256is ap256.-tagged proof from thekat-keypair-005-p256AID, with a double-hash signature that MUST NOT verify.kat-pinned-key-proof-003-tagged-ed25519is an Ed25519 proof from theaid:pubkey:ed25519:spelling ofkat-keypair-003; itsproof_inputdiffers from-001's because the sender AID string is part of the input.
3.2 Verification steps
A peer verifying a pinned-key identity binding MUST:
- Confirm
identity.typeispinned_key. A verifier MUST NOT run pinned-key verification on a descriptor of any othertype, even if it carriespublic_keyand a well-formedproof. - Decode
public_keyand confirm it is byte-equal to the key encoded insender.agent_id, under the same algorithm. A legacy untagged AID compares ased25519. - Locate
(algorithm, public_key)in the localpinned_keysconfiguration. Trust-store entries are keyed by the pair, never by raw bytes alone. - Reconstruct
proof_input(§3.1), drawing each field from the inbound envelope (sender.agent_id, the verifying peer's own AID asreceiver,message_id,timestamp) and the handshake message'spop_nonce. - Verify
proofper RFC-AITP-0001 §5.4.3 and §5.4.6 against that key.
Steps 1–3 MUST complete before any signature verification.
A failure at any step is IDENTITY_FAILED.
Trust-store requirement
Verifying that a peer's key "matches its AID" (key-possession proof alone) is not sufficient. AID construction is deterministic from the public key (RFC-AITP-0001 §5.3), so any agent can construct an AID for any key it generates. The trust anchor is the local pinned-key configuration, not the AID derivation; possession of a key tells you only that the holder generated that AID, not that the AID is one you have ever decided to trust.
Implementations MUST NOT offer a key-possession-only verification mode,
in any deployment mode, development and test included. Every pinned-key
verification MUST consult a configured pinned_keys store (step 3) and
reject any pinned-key identity whose (algorithm, public_key) is not
present in that store, regardless of how cryptographically sound the
proof signature is. An empty store trusts no pinned key.
Populating the store (non-normative). How entries reach pinned_keys
is operator policy and outside this specification: static
configuration, an admin API, or an enrolment flow in which a caller
first proves possession of a key and the operator's policy then decides
whether to add it. Such an enrolment flow is a registration step, not a
pinned-key verification mode. It writes to the store; it does not
verify identity. Every later verification still runs steps 1 to 3
against the store, and the requirement above is unchanged. An
enrolment flow is not the §3.4 pinned-admission procedure and SHOULD
NOT be presented as one.
3.3 Example
The public_key MUST be the unpadded-base64url AID-identifier form of RFC-AITP-0001 §5.3 for the sender AID's algorithm: 43 chars (32 raw bytes) for ed25519, or 44 chars (33-byte SEC1 compressed point) for p256. SPKI-DER, PEM, JWK and uncompressed-point forms are not permitted. A p256 public_key MUST decode to a valid point on the curve. A verifier MUST reject the descriptor with IDENTITY_FAILED when the point is invalid or is the identity.
{
"identity": {
"type": "pinned_key",
"subject": "internal-worker-agent-1",
"public_key": "dqFZIESm5PURJlvKc6YE2QsFKdHfYCvjChmpJXZg0fU",
"proof": "<base64url signature, 86 chars unpadded, computed per §3.1>"
}
}A p256 sender's descriptor carries the 44-char compressed key and a tagged proof (the values of kat-pinned-key-proof-002-p256):
{
"identity": {
"type": "pinned_key",
"subject": "internal-worker-agent-2",
"public_key": "AweBDql0zqV3PmO4l_N-O-mgnnpf6blxpE0QZawqOpMR",
"proof": "p256.<86-char base64url r || s, computed per §3.1>"
}
}3.4 One-way pinned-key admission (OPTIONAL profile pinned-admission)
The pinned-key identity of §3.1–§3.3 is otherwise presented only inside the four-message Mutual Handshake (RFC-AITP-0004). Some deployments admit agents to a single verifier and need no TCT in return, for example a gateway, a coordination host or a resource server. For them this section defines a one-way profile: the verifier issues a challenge and the subject answers with one presentation envelope.
Inside the handshake, the envelope signature over the payload authenticates the descriptor's type, subject and extensions. The §3.1 proof alone covers only the five-field tuple. A standalone presentation therefore travels in an envelope, so that the envelope signature authenticates the descriptor in the same way.
A verifier MAY admit a subject without a Mutual Handshake when all of the following hold:
- Challenge. The verifier issues a fresh
pop_nonceof 16 bytes drawn from a CSPRNG (RFC-AITP-0001 §11). The nonce is single-use, expires at most 300 seconds after issuance, and is bound to the verifier's own AID. - Presentation. The subject returns an RFC-AITP-0001 §5 envelope with
message_typeidentity_presentation, whosepayloadis exactly{identity, pop_nonce}. The envelope signature (RFC-AITP-0001 §5.4) covers the whole envelope exceptsignature, so it authenticates the descriptor'stype,subjectandextensionsinsidepayload, and the envelope's ownmessage_type,versionandextensions. The verifier MUST reject an envelope whosemessage_typeis notidentity_presentationwithINVALID_ENVELOPE. Theproofis computed per §3.1 withreceiver_aid_bytestaken from the verifier's AID andpop_nonce_decoded_bytesfrom the challenge nonce. - Verification. The verifier runs §3.2 steps 1–5 and the RFC-AITP-0001 §5.5 timestamp and
message_idrules. A configuredpinned_keysstore is REQUIRED, per the §3.2 trust-store requirement. - Consumption. The verifier consumes the nonce atomically before it returns success.
A party that implements only this profile, as verifier or as presenter, MAY claim "AITP v0.3 pinned-admission" conformance. It MUST NOT claim conformance to RFC-AITP-0001 §10, which requires the Mutual Handshake and TCT issuance among other things.
Challenge and nonce rules
pop_nonceMUST decode to exactly 16 bytes. A verifier MUST reject any other length withIDENTITY_FAILED, before any signature verification.- A verifier accepts a nonce only if all three hold: it issued that nonce in a challenge whose
verifier_aid(see the challenge format below) is the verifier's own AID, the AID the §3.1 proof uses asreceiver_aid_bytes; the nonce has not expired; and it has not been consumed. Any other nonce is rejected withIDENTITY_FAILED, including a nonce the verifier issued with a different AID as the challenge'sverifier_aid, for example under another AID it operates. Lookup and consumption MUST be one atomic step, so that two presentations racing on one nonce cannot both succeed. - The atomic lookup-and-consume MUST run after every signature check has passed, so a forged presentation cannot burn a legitimate presenter's nonce. A verifier MAY also run a non-consuming lookup before signature verification, to shed presentations for unknown nonces cheaply.
- A consumed nonce is never accepted again, even with a fresh
message_id. Themessage_iddeny list alone does not stop that replay. - The verifier MUST bound the number of outstanding nonces. When the bound is reached it MUST refuse new challenges with
CHALLENGE_REFUSED(retryable), and MUST NOT evict unexpired nonces to make room: eviction would let one source cancel challenges already issued to others. - The verifier MUST apply per-source rate limiting to challenge issuance and to presentations, as RFC-AITP-0009 §3.1 requires at the handshake endpoint, with the same source-key rules. Within this profile, the verifier MUST answer a rate-limited challenge request or presentation with HTTP 429 and no AITP error envelope. This profile tightens RFC-AITP-0009 §3.1, which only RECOMMENDS (SHOULD) HTTP 429 at the handshake endpoint; the core handshake is unchanged.
message_idfollows RFC-AITP-0005 §2.2. It MAY be derived frompop_nonce(with a tag registered inregistries/jti-domain-tags.md), since the nonce is already single-use.
Challenge format (informative)
The challenge is not an AITP envelope, and its transport is a deployment choice (an HTTP response body, for example). One suggested shape is:
{
"pop_nonce": "AQIDBAUGBwgJCgsMDQ4PEA",
"verifier_aid": "aid:pubkey:O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik",
"expires_at": 1711900250
}verifier_aid tells the presenter which AID to use as receiver_aid_bytes. A rate-limited challenge request or presentation MUST get HTTP 429, per the rate-limiting rule above.
A refused challenge returns CHALLENGE_REFUSED. The challenge is not an envelope, so the refusal is not an AITP error envelope either: it travels in the challenge's own transport. Over HTTP, one suggested mapping is status 503 with a Retry-After header and the JSON body:
{"error": "CHALLENGE_REFUSED"}Whatever the transport, a CHALLENGE_REFUSED refusal (the verifier's outstanding-nonce bound is reached, for every source) MUST be distinguishable by the client from a per-source HTTP 429 (this source is over its limit). The HTTP mapping above is informative, like the challenge format.
Check order
The verifier MUST process a presentation in this order:
message_iddeny list (RFC-AITP-0001 §5.5) ⇒REPLAY_DETECTED. As at the handshake endpoint, a replay does not consume a rate-limit slot.- Per-source rate limit (RFC-AITP-0009 §3.1) ⇒ HTTP 429 with no AITP error envelope. Within this profile 429 is REQUIRED (see the rate-limiting rule above).
- Timestamp window (RFC-AITP-0001 §5.5) ⇒
TIMESTAMP_EXPIRED. - Envelope structure, in the RFC-AITP-0001 §5.4 envelope check order: an unknown
versionfirst ⇒UNKNOWN_VERSION; then schema-valid,message_typeisidentity_presentation, payload members exactlyidentityandpop_nonce⇒INVALID_ENVELOPE(UNKNOWN_FIELDwhen the only defect is an unknown member). - Nonce length:
pop_noncedecodes to 16 bytes ⇒IDENTITY_FAILED. - §3.2 steps 1–3:
type, key equality and thepinned_keyslookup ⇒IDENTITY_FAILED. - Envelope signature (RFC-AITP-0001 §5.4) ⇒
INVALID_SIGNATURE. - §3.2 steps 4–5: the proof over the tuple ⇒
IDENTITY_FAILED. - Atomic nonce lookup-and-consume ⇒
IDENTITY_FAILED.
On success the verifier records the message_id in its deny list and admits the subject. The result is an admission decision local to this verifier. No TCT is issued, and the presentation confers no capability on any other peer.
Conformance fixtures.
id-019is a passing presentation with a real §3.1 proof.id-013presents a consumed nonce again under a freshmessage_id,id-014presents a 15-byte nonce, andid-015sendsid-019's presentation with onlymessage_typechanged; the proof still verifies there, because the proof does not covermessage_type.id-016fills a two-nonce store and has the third challenge refused. It then presents both outstanding nonces successfully, and the refused source's retry succeeds.id-020presents an expired nonce andid-021a nonce whose challenge named a differentverifier_aid; both carry real proofs, so they fail only at step 9.id-022replays an admitted presentation from a source that is also over its rate limit: the deny list answers first withREPLAY_DETECTED, and the source's next fresh presentation gets exactly HTTP 429. These eight fixtures arestatus: extensionunderfeature: aitp-pinned-admission. Atomic consumption under concurrent presentations is not expressible as a sequential fixture.tct-015,tct-016,tct-018,tct-019,tct-020andtct-021(RFC-AITP-0005 §5.3) cover the self-attestation side.
4. Trust Anchors
Trust anchors are locally configured by each agent. A peer MUST NOT accept identity from issuers not present in its configured trust anchors. The same list also surfaces in the agent's Manifest (accepted_trust_anchors, RFC-AITP-0003), so peers can pre-screen for compatibility before initiating a handshake.
trust_anchors:
- issuer: "https://auth.openai.com"
keys:
- "base64url_pubkey_1"
- "base64url_pubkey_2"
pinned_keys:
- subject: "internal-worker-agent-1"
algorithm: "ed25519" # OPTIONAL; ed25519 | p256
public_key: "base64url_pubkey"
allowed_capabilities:
- "macp.mode.task.v1"
spiffe_bundles: # spiffe identity type only (§6.2)
- trust_domain: "prod.example.com"
bundle: # SPIFFE bundle: an RFC 7517 JWK Set
keys:
- { kty: "EC", use: "jwt-svid", kid: "...", crv: "P-256", x: "...", y: "..." }
- { kty: "EC", use: "x509-svid", crv: "P-256", x: "...", y: "...", x5c: ["..."] }pinned_keys entries are keyed by (algorithm, public_key) (§3.2 step 3). algorithm is OPTIONAL: when absent it is inferred from the key length (43 chars is ed25519, 44 chars is p256), and when present it MUST agree with that length.
The canonical schema is schemas/json/aitp-trust-anchors.schema.json.
4.1 Distribution modes
| Mode | Description |
|---|---|
static_config | Keys baked into deployment config (RECOMMENDED for v0.3). |
well_known_endpoint | Fetched from https://<issuer>/.well-known/aitp-keys. |
out_of_band | Manually provisioned (air-gapped / offline environments). |
See RFC-AITP-0007 Key Resolution for resolution order and failure handling.
5. Future Identity Types
The following identity types are reserved:
| Type | Description |
|---|---|
did | W3C Decentralized Identifier with Verifiable Credential. |
x509 | X.509 certificate chain (Web PKI). |
wallet | Blockchain-wallet signature. |
x509 stays reserved for Web PKI certificates. A SPIFFE X509-SVID is not an x509 identity: it is the x509-svid form of the spiffe type (§6).
Peers receiving an unknown type MUST respond with IDENTITY_FAILED. New types are registered via the RFC process and recorded in registries/identity-types.md.
6. SPIFFE Identity Type
The spiffe type binds an AID to a SPIFFE workload identity. The identity is a SPIFFE ID, proven by an SVID (SPIFFE Verifiable Identity Document) that chains to the SPIFFE trust bundle of the ID's trust domain. Two SVID forms are defined:
- A JWT-SVID (JWT-SVID) is checked much like the OIDC JWT of §2.
- An X509-SVID (X509-SVID) is checked in two parts: path validation of its certificate chain, and a signature by its key over the handshake context.
This section cites the SPIFFE standards at commit 49a9cbbc018c39ec6643ad3301632f9f4549258b of spiffe/spiffe. Where this section says less than those standards, the standards apply. Where it says more, the extra rule is an AITP rule and is marked Tightening.
spiffe is at registry status Proposed (registries/identity-types.md):
- Its conformance fixtures,
id-024toid-030, arestatus: draftunderfeature: experimental-spiffe-identity. kat-spiffe-x509-proof-001pins the §6.4.1 proof input.- No RFC-AITP-0001 §10 claim requires a verifier to support
spiffe. A verifier that does not support it treats it like any other type it does not accept (§6.6).
6.1 Descriptor
{
"identity": {
"type": "spiffe",
"subject": "spiffe://prod.example.com/ns/payments/sa/agent",
"svid_type": "jwt-svid | x509-svid",
"proof": "<JWT-SVID (§6.3) or X509-SVID key signature (§6.4.1)>",
"x5c": ["<leaf>", "<intermediate>", "..."]
}
}subjectMUST be a SPIFFE ID (SPIFFE-ID §2): the schemespiffe, a trust domain, and a path, with no query, fragment, port or userinfo.- The trust domain MUST use only lowercase letters, digits,
.,-and_, and be at most 255 bytes (SPIFFE-ID §2.1, §2.3). - The path MUST be non-empty and MUST NOT end in
/. Each segment uses only letters, digits,.,-and_, and MUST NOT be empty,.or..(SPIFFE-ID §2.2). - The whole ID is at most 2048 bytes (SPIFFE-ID §2.3).
- A SPIFFE ID with no path names a trust domain, not a workload, so it is not a valid
subject. This matches X509-SVID §3.1, which requires a non-root path on a leaf SVID. - SPIFFE compares the scheme and trust domain case-insensitively and the path case-sensitively (SPIFFE-ID §2.4). Tightening:
subjectMUST be in canonical form, with the scheme and trust domain in lowercase, and every comparison in this section is byte-for-byte. A verifier MUST reject asubjectwith an uppercase scheme or trust domain withIDENTITY_FAILED. It MUST NOT fold case to make a comparison match.
- The trust domain MUST use only lowercase letters, digits,
svid_typeis REQUIRED:jwt-svid:proofis a JWT-SVID (§6.3).x509-svid:proofis a signature by the X509-SVID's key, andx5ccarries the certificates (§6.4).
x5cis REQUIRED whensvid_typeisx509-svid, and MUST be absent otherwise.- Each entry is a DER certificate in standard base64 with padding (RFC 4648 §4), as in the JWK
x5cmember (RFC 7517 §4.7). - The first entry is the X509-SVID (the leaf). Any further entries are intermediate CA certificates, each certifying the one before it.
- Each entry is a DER certificate in standard base64 with padding (RFC 4648 §4), as in the JWK
issuerandpublic_keyMUST be absent. Aspiffedescriptor's trust anchor is the local SPIFFE bundle of its trust domain (§6.2), not an issuer URI. Its key binding comes from the SVID, not from a copied key.extensionsis as in §1.
The identity-descriptor schema enforces these rules in its spiffe branch. It cannot express the byte-exact canonical form or any certificate rule; those are verifier checks.
6.2 Trust bundles
The verifier holds a local spiffe_bundles store: a list of {trust_domain, bundle} entries in its trust-anchors configuration (§4, schemas/json/aitp-trust-anchors.schema.json).
bundleis a SPIFFE bundle: an RFC 7517 JWK Set (SPIFFE Trust Domain and Bundle §4). It MAY carryspiffe_sequenceandspiffe_refresh_hintmembers (Trust Domain and Bundle §4.1.1, §4.1.2).- Trust domain names MUST be unique in the store. A verifier MUST reject a configuration that lists one trust domain twice, as SPIFFE requires of a bundle map (Trust Domain and Bundle §5.1.1).
- The verifier selects the bundle by the trust domain of
subject, and uses only that bundle (Trust Domain and Bundle §3). A key from another trust domain's bundle MUST NOT validate the SVID, even when its signature would verify. - Bundle keys are selected by
use:- A JWK with
usejwt-svidis a JWT-SVID signing key and carries akid(JWT-SVID §6.1). - A JWK with
usex509-svidis an X.509 CA and carries exactly one CA certificate inx5c(X509-SVID §6.1). - A JWK whose
useis missing or unknown is ignored (Trust Domain and Bundle §4.2.2).
- A JWK with
- If the bundle has no keys of the
usean SVID needs, every SVID of that form from the trust domain is invalid (Trust Domain and Bundle §4.1.3, JWT-SVID §6.2). - The bundle MUST come from the verifier's own configuration, or from a source the verifier trusts on its own account, such as its SPIFFE Workload API or a configured SPIFFE federation endpoint. A verifier MUST NOT take a bundle or any other trust material from the peer's handshake message or Manifest.
6.3 JWT-SVID
proof is a JWT-SVID: a compact JWS (JWT-SVID §2, §5.1) signed by a jwt-svid key of the subject trust domain's bundle. The checks follow the OIDC checks of §2, with the bundle in place of the issuer's keys.
| Item | Rule |
|---|---|
| Serialization | Compact JWS. The protected header MUST contain only alg, kid and typ (JWT-SVID §2). |
alg | One of RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512 (JWT-SVID §2.1). Any other value MUST be rejected, none, HS* and EdDSA included. |
kid | Tightening: REQUIRED (JWT-SVID §2.2 makes it optional). It selects the verification key: the jwt-svid JWK with this kid in the bundle, which JWT-SVID §6.1 requires to carry a kid. If no JWK matches, verification fails. The verifier MUST NOT try other keys. |
typ | OPTIONAL. When present it MUST be JWT or JOSE (JWT-SVID §2.3). |
| Key match | The selected JWK MUST fit alg (RFC 7518 §3): kty RSA for RS* and PS*, and kty EC with crv P-256, P-384 or P-521 for ES256, ES384 or ES512 respectively. When the JWK carries an alg member (RFC 7517 §4.4), the header alg MUST equal it. Otherwise verification fails. |
sub | MUST equal identity.subject byte-for-byte (JWT-SVID §3.1). |
aud | REQUIRED (JWT-SVID §3.2). Tightening: it MUST hold exactly one value, as a string or a one-element array, and that value MUST equal the verifying peer's AID byte-for-byte, as in §2.2. JWT-SVID §3.2 allows several values and only strongly recommends one. A multi-audience SVID can be replayed by every audience it names (JWT-SVID §7.2), so AITP rejects it. |
exp | REQUIRED, and MUST be in the future (JWT-SVID §3.3). |
iat | Tightening: REQUIRED, and MUST be within ±300 s of current time, as in §2.2. |
nonce | Tightening: REQUIRED, and MUST equal the pop_nonce of the same handshake message byte-for-byte, as in §2.2. |
cnf.jkt | Tightening: REQUIRED, and MUST equal the RFC 7638 thumbprint of the sender AID's key, computed per §2.2.1. |
Other claims MAY be present and are ignored (JWT-SVID §3).
A bare JWT-SVID is a bearer token (JWT-SVID §7.1): anyone who captures one can present it in a new handshake until it expires. The nonce and cnf.jkt rules prevent this. They bind the SVID to one handshake and to one key pair, as they do for OIDC (§7).
Issuer support (informative). The SPIFFE Workload API's
JWTSVIDRequestcarries onlyaudienceandspiffe_id, so a stock SPIRE deployment cannot putnonceorcnfclaims into a JWT-SVID. Ajwt-svididentity therefore needs a SPIFFE issuer that can mint those two claims on request, such as a SPIRE plugin or a custom issuer. A deployment without one can usex509-svid(§6.4), which works with stock SVIDs. This trade-off is recorded ingovernance/DECISIONS.md.
6.4 X509-SVID
x5c[0] is the X509-SVID. proof is a signature by the X509-SVID's private key over the handshake context (§6.4.1).
The verifier MUST check the chain and the leaf:
- Path validation. Validate
x5cas an RFC 5280 §6 certification path at the current time (X509-SVID §5.1).- The trust anchors are the certificates of the
x509-svidJWKs in the subject trust domain's bundle, and only those. - Intermediates come only from
x5c[1..]. The verifier MUST NOT fetch certificates through AIA, and MUST NOT use a system trust store or any other bundle.
- The trust anchors are the certificates of the
- SPIFFE ID. The leaf MUST carry exactly one URI SAN, and it MUST equal
identity.subjectbyte-for-byte (X509-SVID §2). A leaf with more than one URI SAN MUST be rejected, even if one of them matches. - Leaf constraints. The leaf's basic constraints
cAMUST be false (X509-SVID §4.1). Its key usage MUST includedigitalSignatureand MUST NOT includekeyCertSignorcRLSign(X509-SVID §4.3). - Leaf key. Tightening: the leaf's public key MUST be an Ed25519 key or a P-256 key, the two algorithms of the RFC-AITP-0001 §5.4.6 signing primitive. Any other key type is rejected, RSA and P-384 included.
SPIFFE defines no revocation for SVIDs, which are short-lived instead. AITP adds none: the verifier checks the validity period (step 1) and nothing more.
The leaf key MAY differ from the AID key. In a stock SPIRE deployment it always does, because the Workload API generates the SVID key pair and hands it to the workload. Two signatures bind the two keys together:
- the §6.4.1 proof, made with the SVID key, covers the sender AID; and
- the envelope signature, made with the AID key (RFC-AITP-0001 §5.4), covers the whole payload, including
subject,x5candproof.
The holder of the SVID key therefore vouches for this AID in this handshake, and the holder of the AID key vouches for this SVID.
6.4.1 Proof input
proof_input =
"aitp-spiffe-x509-v1\0"
|| sender_aid_bytes || "\0"
|| receiver_aid_bytes || "\0"
|| message_id_bytes || "\0"
|| timestamp_ascii_decimal || "\0"
|| pop_nonce_decoded_bytes
proof = sign(svid_private_key, sha256(proof_input))The fields are encoded as in §3.1. Only the domain prefix differs, so a pinned-key proof can never be read as an X509-SVID proof, or the reverse.
sign is the primitive of RFC-AITP-0001 §5.4.6. sha256(proof_input) is hashed exactly once; a P-256 key MUST NOT hash it again.
proof uses the RFC-AITP-0001 §5.4.3 wire format:
- Its tag MUST match the algorithm of the leaf key, not of the AID.
- A P-256 leaf MUST use the
p256.tag. - An untagged proof is read as
ed25519. An untagged proof under a P-256 leaf is therefore an algorithm mismatch and is rejected.
Known-answer test.
kat-spiffe-x509-proof-001inschemas/conformance/known-answer/jcs-sha256.jsonpins a concrete tuple and its 194-byteproof_input. The sender AID iskat-keypair-002, and the proof is an Ed25519 signature bykat-keypair-003acting as the leaf key, so the leaf key differs from the AID key, as in a stock deployment. The vector also pins that the proof does not verify over the pinned-key input (§3.1) of the same tuple.
6.5 Verification steps
A peer verifying a spiffe identity binding MUST:
- Confirm that
identity.typeisspiffe, thatsvid_typeisjwt-svidorx509-svid, and that the descriptor satisfies §6.1, including the canonical form ofsubject. - Take the trust domain from
subject: the authority betweenspiffe://and the next/. - Look up that trust domain in the local
spiffe_bundlesstore (§6.2). If there is no entry, verification fails. - From that bundle, take the keys whose
usematchessvid_type:jwt-svidJWKs for a JWT-SVID,x509-svidCAs for an X509-SVID. If there are none, verification fails. - Verify the SVID:
- For
jwt-svid, run every §6.3 check. - For
x509-svid, run every §6.4 check, then verifyproofunder the leaf key over the §6.4.1 input. Rebuild that input from the inbound envelope (sender.agent_id, the verifying peer's own AID asreceiver,message_id,timestamp) and the handshake message'spop_nonce.
- For
Steps 1–4 MUST complete before any signature verification.
A failure at any step is IDENTITY_FAILED. This section defines no new error code.
6.6 Manifest hint and compatibility
A Manifest identity_hint of type spiffe carries only type and subject, the SPIFFE ID. It MUST NOT carry issuer or public_key (RFC-AITP-0003 §3.1). The hint is never trust material: the verifier checks the handshake descriptor against its own bundle store, whatever the hint says.
A verifier that does not list spiffe in its accepted_identity_types rejects a spiffe peer with INCOMPATIBLE_IDENTITY_TYPE (RFC-AITP-0003 §5 step 6, RFC-AITP-0004 §5.1 step 8), as it would any other non-OIDC type it does not accept. accepted_trust_anchors lists OIDC issuers only, and is not consulted for a spiffe peer.
7. Security Considerations
- The
isscheck for OIDC defends against issuer-confusion attacks. - The
audclaim binds the JWT to a specific verifying peer; without it, a JWT issued for one peer can be replayed against any other peer that trusts the same issuer. - The
nonceclaim binds the JWT to a specific handshake instance. Without it, a JWT minted for one handshake against the rightaudcould be captured and replayed in a later handshake to the same peer (e.g. if the captured JWT has not yet expired). Thenonceis bound to the samepop_noncethat drives the Mutual Handshake's PoP exchange, so identity-proof freshness and key-possession freshness share the same defense. - The
cnf.jktclaim binds the JWT to the AID's signing key. A stolen JWT cannot be paired with a different key pair to impersonate a different agent, and an agent cannot prove identity without also controlling the private key that signs its Manifest and envelopes. - Together,
aud,nonce, andcnf.jktmake the OIDC identity binding non-transferable across peers, handshakes, and key pairs in the same way TCTs are non-transferable. - The pinned-key proof input (§3.1) MUST bind sender AID, receiver AID,
message_id,timestamp, AND the handshakepop_nonce. Earlier drafts that signed onlymessage_id|timestampdid not bind sender or receiver and admitted cross-peer replay; the v0.1 proof input (unchanged in v0.2) is the minimum that prevents it. Implementations MUST NOT accept the legacy two-field input. - A peer MUST NOT relax issuer-list checks based on
reasonstrings or any client-supplied hint. - A JWT-SVID is a bearer token (JWT-SVID §7.1). The
nonceandcnf.jktclaims (§6.3) bind it to one handshake and to the AID key. Without them, a captured SVID could be replayed until it expired. - If a JWT-SVID names several audiences, each audience can replay it to the others (JWT-SVID §7.2). §6.3 therefore allows exactly one
audvalue, the verifying peer's AID. - The X509-SVID key and the AID key are usually different keys (§6.4). Neither signature alone binds the SVID to the AID; the §6.4.1 proof and the envelope signature do so together. A verifier MUST check both.
- An SVID MUST be checked only against the bundle of its own trust domain (§6.2). A key trusted for one trust domain proves nothing about an ID in another.
- Trust domain names are not globally unique: two independent deployments can choose the same name (SPIFFE-ID §2.1.1). A
spiffe_bundlesentry trusts whoever controls the bundle configured for that name. Operators MUST source each bundle from the deployment they intend to trust. - In the
pinned-admissionprofile (§3.4), the verifier holds challenge state before it knows who is asking, so challenge issuance is an amplification and exhaustion surface. Three rules defend it, and each is load-bearing. The outstanding-nonce bound stops memory exhaustion. Refusing rather than evicting stops one source from cancelling challenges already issued to others. Consuming the nonce only after every signature check stops a forged presentation from burning a legitimate presenter's nonce.
8. References
- RFC 7519 — JSON Web Token
- RFC 7638 — JSON Web Key Thumbprint
- RFC 7800 — Proof-of-Possession Key Semantics for JWTs (
cnf) - RFC 9449 — OAuth 2.0 Demonstrating Proof of Possession (DPoP)
- RFC 4648 — The Base16, Base32, and Base64 Data Encodings
- RFC 5280 — Internet X.509 PKI Certificate and CRL Profile
- RFC 7517 — JSON Web Key (JWK)
- RFC 7518 — JSON Web Algorithms (JWA)
- SPIFFE-ID — The SPIFFE Identity and Verifiable Identity Document
- X509-SVID — The X.509 SPIFFE Verifiable Identity Document
- JWT-SVID — The JWT SPIFFE Verifiable Identity Document
- The SPIFFE Trust Domain and Bundle
- SPIFFE Workload API (
workloadapi.proto) - RFC-AITP-0001 Core
- RFC-AITP-0003 Agent Manifest
- RFC-AITP-0004 Mutual Handshake
- RFC-AITP-0007 Key Resolution