Proof of concept
POC wire reference
The exact bytes the POC modules exchange — a navigable digest of the frozen contracts. contracts.md stays the single source of truth.
Built from 1 source document
Contract A — the mandate JWT
RS256, typ: at+jwt, kid: platform-poc-1. Claim set and who enforces what:
| Claim | POC value / source | Enforced by the PDS? |
|---|---|---|
iss | https://veritia.eu (identifier only) | ✅ equals expected issuer |
aud | http://localhost:8081/mcp (canonical MCP URI) | ✅ else 403 aud_mismatch |
sub | fake itsme pick, e.g. itsme:be:sofie.maes | logged |
act.sub | agent_label from the form | logged |
cnf.jwk | pasted agent JWK | ✅ thumbprint = proof key |
provider_account_ref.{value, source, asserted_at, provider_jkt, assertion} | from the verified link session; source: signed_assertion | ✅ re-verified (steps 14–18), resolved → account |
iat / exp | now / now + 3600 | ✅ ±60 s skew |
jti | UUIDv4 | introspection + audit key |
purpose | e.g. consultation de solde | logged |
disclosed_scope.allowed_tools | form checkboxes | ✅ 403 tool_not_allowed (filter) |
disclosed_scope.tool_constraints | optional per-tool param caps | ✅ by the tool handler: MCP error <param>_exceeds_mandate |
disclosed_scope.binding | false | — |
transparency, revocation_check | constant URLs + jti | not dereferenced (PDS uses its configured introspection base) |
Contract B — DPoP
POST http://localhost:8081/mcp
Authorization: DPoP <mandate JWT>
DPoP: <proof JWT> header {typ: dpop+jwt, alg: EdDSA, jwk: <agent public key>}
Content-Type: application/json claims {jti, htm: POST, htu: http://localhost:8081/mcp, iat, bsha}The provider's 19-step check
Exempt entirely: initialize, notifications/initialized, tools/list. Never exempt: tools/call.
| # | Check | Fail |
|---|---|---|
| 1 | Authorization scheme is DPoP | 401 missing_dpop |
| 2 | Mandate verifies against the platform JWKS; alg RS256, typ at+jwt, iss | 401 bad_token |
| 3 | exp/nbf/iat ±60 s | 401 token_expired |
| 4 | aud = canonical MCP URI | 403 aud_mismatch |
| 5 | Introspection active:true — anything else, including unreachable, fails closed | 403 revoked_or_unknown / introspection_unreachable |
| 6 | Thumbprint of cnf.jwk | 401 bad_token |
| 7 | Proof parses, dpop+jwt, EdDSA, signature valid against its header jwk | 401 bad_dpop |
| 8 | Proof key thumbprint = cnf thumbprint | 403 pop_key_mismatch |
| 9 | htm/htu match the request | 403 dpop_htu_htm_mismatch |
| 10 | Proof iat ±60 s | 403 dpop_stale |
| 11 | bsha = hash of the received body | 403 body_hash_mismatch |
| 12 | Proof jti not seen (cache 120 s) | 403 dpop_replay |
| 13 | Tool ∈ allowed_tools | 403 tool_not_allowed |
| 14–15 | Account-link assertion present, EdDSA, verifies against the PDS's own key; iss/aud | 403 account_ref_assertion_invalid |
| 16 | assertion.sub = provider_account_ref.value | 403 account_ref_value_mismatch |
| 17 | provider_jkt and asserted_at match | 403 account_ref_jkt_mismatch |
| 18 | Assertion valid at issuance: assertion.iat ≤ mandate.iat ≤ assertion.exp + 60 s | 403 account_ref_stale |
| 19 | Build the principal (provider_account_ref.value, sub, agent thumbprint, allowed_tools, tool_constraints) | — |
Every deny writes an mcp_call_audit DENY row and returns WWW-Authenticate: DPoP error="<code>".
Contract C — platform signing key
RSA-2048, kid platform-poc-1 (stable across restarts), private JWK in deploy/keys/platform-signing.jwk.json
(git-ignored, created by gen-keys.sh), public half at GET /jwks.json.
Contract D — seed data
itsme sub | provider_account_ref.value | Customer | IBAN (illustrative) | Balance |
|---|---|---|---|---|
itsme:be:pieter.janssens | pacr_bqt_7f3a91 | cust-001 | BE68 5390 0754 7034 | € 4 231,17 |
itsme:be:sofie.maes | pacr_bqt_2c8d40 | cust-002 | BE71 0961 2345 6769 | € 12 802,50 |
itsme:be:noah.dubois | pacr_bqt_9b1e05 | cust-003 | BE62 5100 0754 7061 | € 318,04 |
The sub ↔ customer pairing is only the demo-intended one: the human picks the customer on the mock customer area,
and the PDS vouches for it — it is never derived from sub.
| Thing | Value |
|---|---|
Fixed provider_id (= assertion iss) | 9b7c1e40-2f6a-4c11-9e2a-000000000bqt |
| Mandate link | http://localhost:4200/mandate/new?provider=<provider_id> |
| PDS assertion key | Ed25519, kid bqt-assertion-1, generated once to pds/data/pds-assertion.jwk.json |
| Keycloak | realm bqt, client bqt-rest / bqt-secret; users pieter, sofie, noah / demo |
| SPA provider admin | admin@bqt.example / demo |
| TTLs | mandate 3600 s · assertion 300 s · link session 600 s · setup code 600 s |
| Dev secret | X-Poc-Dev-Auth: poc-dev-secret |
Contract E — stub HTTP API
See POC components and contracts §5 for exact request/response bodies and error codes.
Contract F — configuration matrix
| Meaning | Stub env | PDS env | Host value | Compose value |
|---|---|---|---|---|
Token aud | PDS_MCP_URI | MCP_CANONICAL_URI | http://localhost:8081/mcp | same (identifier) |
| Platform JWKS | — | PLATFORM_JWKS_URI | http://localhost:3000/jwks.json | http://web-platform-stub:3000/jwks.json |
| Introspection base | — | PLATFORM_INTROSPECT_BASE | http://localhost:3000/introspect | http://web-platform-stub:3000/introspect |
| Platform issuer | PLATFORM_ISSUER | PLATFORM_EXPECTED_ISS | https://veritia.eu | same |
| PDS discovery | PDS_DISCOVERY_URI | — | http://localhost:8081/mcp | http://pds:8081/mcp |
| PDS assert endpoint | PDS_ASSERT_URI | — | …:8081/account-link/assert | http://pds:8081/account-link/assert |
| PDS assertion JWKS | PDS_ASSERTION_JWKS_URI | — | …:8081/pds-jwks.json | http://pds:8081/pds-jwks.json |
| Provider id | — | PDS_PROVIDER_ID | fixed UUID | same |
| Dev secret | PDS_ASSERT_DEV_SECRET | PDS_ASSERT_DEV_SECRET | poc-dev-secret | same |
In the browser registration form the MCP endpoint default is http://pds:8081/mcp — discovery runs inside the stub container.
Contract G — account-linking hand-off
Sequence, assertion format and stub verification: account linking and contracts §8.
Contract H — setup code, one key per machine
One-time redeem URL (≥128 bits, 600 s, single-use, 404 for unknown or used), one agent.key per machine, one
named folder per mandate, replace-not-accumulate, NP_MANDATE selection: local tool and
contracts §9.