Architecture & security
End-to-end flow (phases 0–5)
Every step of the reference flow — who acts, what is produced, where it lives — from provider registration to revocation.
Built from 4 source documents
- Spécification v1 — acteurs, composants, flux Reference
- Jetons & accès au prestataire (PDS) Reference
- Liaison de compte (provider_account_ref) Proposed design
- POC cross-module contracts (frozen wire) POC
Overview
sequenceDiagram
actor H as Human
participant IT as itsme
participant VP as Veritia platform
participant LT as Local tool
actor AI as AI agent
participant PR as Provider (PDS)
Note over PR,VP: Phase 0 — once per provider
PR->>VP: declares MCP endpoint, accepts the reviewed tool schema
Note over H,LT: Phase 1 — once per machine / agent
H->>LT: init → key pair, public key shown
Note over H,PR: Phase 2 — each mandate
H->>PR: (already logged in) clicks "Configure an AI agent"
PR-->>VP: signed account-link assertion
H->>IT: authenticates (OIDC)
IT-->>VP: ID token (read once, discarded)
H->>VP: form: agent public key, purpose, expiry, tools
VP-->>H: signed mandate + ready-to-use config
Note over H,LT: Phase 3 — each mandate
H->>LT: setup (one-time code) → mandate stored locally
Note over AI,PR: Phase 4 — each tool call
AI->>LT: tool call
LT->>PR: mandate + per-request proof
PR->>VP: JWKS (cached) + revocation check
PR-->>LT: result (after applying its OWN rules)
LT-->>AI: result
Note over H,VP: Phase 5 — any time
H->>VP: revoke → next call refusedPhase 0 — provider registration (once)
The provider creates an account, declares its MCP endpoint, Veritia calls tools/list, parses it
deterministically (no AI), shows a review screen, the provider clicks "J'accepte", the confirmed
schema version is frozen and becomes the source of the mandate form. Full detail, including governance
ceilings and schema drift: provider onboarding.
Phase 1 — agent key generation (once per agent; POC: once per machine)
| Step | Who | Action | Result | Lives |
|---|---|---|---|---|
| 1.1 | Human via local tool init / SDK | Generate an Ed25519 key pair locally | Key pair | — |
| 1.2 | Local tool | Write the private key to a restricted file (POC: ~/.veritia/agent.key, 0600) | Private key file | Only the user's machine |
| 1.3 | Local tool | Print the public key (JWK one-liner + thumbprint) | Public key | Shown to the human, to paste |
Phase 2 — human authentication and mandate issuance (each mandate)
| Step | Who | Action | Result / where |
|---|---|---|---|
| 2.0bis | Human | Arrives via a link/button from the provider's authenticated customer area — never via a public catalogue | provider_id (non-guessable UUID) |
| 2.0ter | Provider | Account-link hand-off: vouches with a signed identity for "which of my customers this is" | provider_account_ref (opaque, pairwise) — account linking |
| 2.0quater | Veritia ↔ provider | (recommended variant only) back-channel exchange of a one-time code | provider id_token, read once |
| 2.1–2.4 | Human → itsme → Veritia | OIDC authorization-code flow; Veritia decrypts and verifies the ID token, keeps three fields, discards the token | itsme pseudonymous id, auth time, assurance level — itsme |
| 2.5 | Human | Fills the form: agent public key, purpose, expiry, tools (+ limits), generated from the provider's confirmed schema and bounded by min(technical constraint, governance ceiling) | Draft |
| 2.6–2.7 | Veritia | Signs the mandate JWT with its private key | The mandate |
| 2.8 | Veritia | Shows the mandate — status VALID immediately (no bank pre-approval) | Ready-to-use config: mandate + provider endpoint together |
| 2.9 | Veritia | Stores jti, status, metadata — never the agent's private key (it never received it) | Veritia DB |
Phase 3 — agent configuration (each mandate)
The human gives the ready-to-use config (mandate + endpoint) to the local tool. In the target spec this was a
copy-paste; the POC added a one-time setup code (mcp-server setup <url>, 10-minute TTL, single use) so the
raw token lands directly in a local file the tool controls — see local tool.
Phase 4 — a tool call (each action)
| Step | Who | Action |
|---|---|---|
| 4.1 | LLM | Decides to call a tool, emits a structured tool call to the local tool |
| 4.2–4.4 | Local tool | Builds the request, reads the local private key, signs a proof covering method + URL + body + time + unique id |
| 4.5 | Local tool → provider | HTTPS request with the mandate + the proof — header format: see proof of possession |
| 4.6a–b | Provider | Fetches Veritia's JWKS (cached), verifies the mandate signature |
| 4.6c | Provider | Checks exp/nbf, then asks Veritia's revocation endpoint (every call in V1) |
| 4.6c-bis | Provider | Checks aud is itself — rejects tokens meant for another provider |
| 4.6d–e | Provider | Extracts cnf.jwk from the validated mandate; verifies the proof with it; checks freshness and that the proof id was never seen (anti-replay) |
| 4.6f | Provider | Resolves provider_account_ref against its own systems and applies its own real rules — disclosed_scope is only a hint |
| 4.6g | Provider | Executes or refuses, logs human + agent + action (its audit trail) |
| 4.7 | back to the human | Result flows back to a natural-language answer |
In the POC this is the 19-step filter — see POC wire reference.
Phase 5 — revocation / expiry
| Step | Who | Action |
|---|---|---|
| 5.1 | Human | Logs in to Veritia (never to the provider) and clicks Revoke |
| 5.2 | Veritia | Marks the jti as revoked |
| 5.3 | Provider | On the next call, the revocation check says "revoked" → refused |
| 5.4 | Provider | Defence in depth: refuses any mandate past exp without even asking Veritia |
How fast revocation takes effect, and the fail-open/fail-closed question: revocation & audit.
What each party holds at the end
| Artifact | Created by | Stored | Used by | On the network? |
|---|---|---|---|---|
| Agent private key | Local tool (Ph. 1) | User's machine only | Local tool (Ph. 4) | Never |
| Agent public key | Local tool | Sealed in the mandate | Provider (verifies the proof) | Yes, in clear (not secret) |
| itsme ID token | itsme (2.4) | Read once, never stored | Veritia | Once, HTTPS |
| Veritia private key | Veritia | Veritia cloud only | Signing (2.7) | Never |
| Veritia public key | Veritia | JWKS endpoint | Provider | Yes, publicly |
| Mandate JWT | Veritia (2.7) | Shown → local file → every call | Provider | Yes, every call |
| Proof (per request) | Local tool (4.4) | Ephemeral | Provider (once) | Yes, every call |
| Platform trace | Veritia | Veritia DB, by jti — never in the JWT | Veritia; a judge on request | No |
| Provider trace | Provider (4.6g) | Provider's systems | Provider; others on legal request | No |