AIP Authentication & Signing (v0.1)
Scope
This section defines how AIP messages are authenticated and signed to ensure:- sender authenticity
- message integrity
- replay protection
- auditability
RetrieveRequestRetrieveResponse- (optionally) AIP Events in v0.1
Design principles (non-negotiable)
- Message-level signing, not session auth
- Stateless verification
- No user identity exposure
- No ad-tech coupling
- Simple enough for publishers to implement
Authentication model
Trust anchors
- Platforms and publishers are registered with an AIP Registry (operator-neutral).
- Each party is issued one or more API keys.
- Each API key has an associated shared secret (v0.1).
Public-key signing (JWT / JWS) is explicitly deferred to v0.2+.
Required HTTP headers
Every signed AIP request or response MUST include the following headers.X-AIP-Version
Required
X-AIP-Key-Id
Required
- Issued by the AIP Registry
- Maps to a shared secret
- Does not identify the end user
X-AIP-Timestamp
Required
X-AIP-Nonce
Required
- Minimum 16 bytes of entropy
- MUST NOT be reused within the replay window
X-AIP-Signature
Required
Signature construction (canonical)
Step 1: Canonical string
The signature MUST be computed over the following components, in order:REQUEST_PATHexcludes scheme and host- Body hash is hex-encoded SHA-256
- Empty body → hash of empty string
Step 2: HMAC computation
Step 3: Header format
v1 identifies the signing algorithm version.
Verification rules (publisher side)
Upon receiving aRetrieveRequest, a publisher MUST:
- Verify
X-AIP-Versionis supported - Look up secret using
X-AIP-Key-Id - Recompute signature and compare (constant-time)
- Validate timestamp freshness (see below)
- Validate nonce uniqueness within replay window
- Reject on any failure
Replay protection
Time window
- Default window: ±300 seconds
- Requests outside this window MUST be rejected
Nonce handling
- Publishers SHOULD store
(key_id, nonce)pairs for the replay window - Reuse → reject as replay
Signing the RetrieveResponse
Publishers SHOULD sign responses using the same mechanism. Differences:HTTP_METHODis the response method (e.g.,200)REQUEST_PATHis the same as the requestREQUEST_BODYis the response body
Error handling (authentication failures)
On auth failure, publishers MUST return:- HTTP
401 Unauthorizedor403 Forbidden - A minimal error body (no debug info)
What is explicitly out of scope (v0.1)
- OAuth
- JWT / JWS
- mTLS
- User authentication
- Key rotation protocols
- Delegated access
Security properties achieved
✔ Sender authentication✔ Message integrity
✔ Replay protection
✔ Minimal implementation burden
✔ Clear audit trail No unnecessary complexity.
Normative MUST / MUST NOT summary
- Platforms MUST sign all RetrieveRequests
- Publishers MUST verify signatures
- Auction or pricing metadata MUST NOT be signed or transmitted here
- Secrets MUST NOT be reused across parties
- Unsigned requests MUST be rejected
Forward compatibility (v0.2+)
This header model cleanly upgrades to:- asymmetric keys
- JWS payloads
- key rotation
- delegated operators (AdMesh-signed on behalf of platforms)
Final verdict
This signing scheme is:- simple
- secure enough
- legally defensible
- operationally realistic
Next things you may want (in order)
- Access / Citation Event schema
- Registry API for key issuance
- Operator-signed retrieve flow
- v0.2 public-key upgrade path
See also
- RetrieveRequest — Request that carries these headers
- RetrieveResponse — Response that publishers SHOULD sign
- Security — Protocol-level security invariants