cd /news/ai-agents/verifiable-credentials-for-ai-agents… · home › topics › ai-agents › article
[ARTICLE · art-176754] src=izylifesolutions.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Verifiable credentials for AI agents: OID4VCI and OID4VP without a QR code

IzySSI's approach to W3C Verifiable Credentials via OpenID for Verifiable Credential Issuance (OID4VCI) and OpenID for Verifiable Presentations (OID4VP) can be applied to AI agents by replacing the human QR-code step with a headless wallet, since the QR code only carries a URL that can instead travel in an API response. The article argues that API keys and copied session tokens tell a receiving service only that the caller holds a valid secret, not who delegated the task, which actions were delegated, on which resources, or until when. It recommends generating the agent's key as a non-exportable key in a cloud KMS or HSM, tying key access to Kubernetes workload identity via SPIFFE/SPIRE SVIDs, and using OID4VCI 1.0 key attestations so issuers do not bind credentials to arbitrary keys.

recommendation

Give each agent a headless wallet whose non-exportable key lives in a KMS or HSM, authorize signing only via its SPIFFE/SPIRE workload identity, and require OID4VCI 1.0 key attestations before issuing credentials.

more in playbook: Securing agents and AI tools
read14 min views1 publishedNov 23, 2026
Verifiable credentials for AI agents: OID4VCI and OID4VP without a QR code
Image: Izylifesolutions (auto-discovered)

A person scans a QR code with the wallet on their phone. An AI agent calling an MCP server at 2 a.m. has no phone and no camera. The protocols underneath, OID4VCI and OID4VP, never needed either: the QR code only carries a URL.

Agents act for someone, but their credentials do not say who #

An AI agent that triages incidents, opens pull requests or scales a deployment calls APIs, tools and MCP servers for a person or a team. In most setups it does so with an API key, a client secret or a token copied from a developer’s session. From that credential the receiving service learns one thing: the caller holds a valid secret.

It does not learn who delegated the task, which actions were delegated, on which resources, or until when. A key created for one task keeps working for every task after it. If the key leaks, whoever holds it looks exactly like the agent. When something goes wrong, the audit log shows a key ID and people rebuild the rest from chat histories.

Self-sovereign identity solves a similar problem for people. A holder carries signed claims from an issuer and proves them to a verifier, which checks the issuer’s signature without calling the issuer at presentation time. This article shows how the same model, with the same protocols izySSI uses for people, applies to AI agents that have neither a phone nor a camera.

How izySSI works for people today #

izySSI connects Keycloak to W3C Verifiable Credentials through OpenID for Verifiable Credential Issuance (OID4VCI) and OpenID for Verifiable Presentations (OID4VP). The human journey has four steps:

  1. The user logs in to the organisation’s site through Keycloak.
  2. The site shows a QR code that encodes a credential offer.
  3. The user scans it with the izySSI Android wallet, which runs the OID4VCI exchange and stores the credential.
  4. Later, a relying party shows another QR code with an OID4VP authorization request. The wallet asks for consent and sends a signed presentation.

Look at what the QR code carries in steps 2 and 4. In the first case it is an openid-credential-offer:// link, with the offer inline or a credential_offer_uri that points to it. In the second it is an authorization request, usually as a request_uri. The QR code moves a URL from a screen to the device that holds the keys. Everything after that is HTTPS between the wallet and the issuer or the verifier.

For an agent, the screen and the device are the same process, so the URL can travel in an API response.

A headless wallet for the agent #

A wallet has three jobs: it holds a private key, it stores credentials bound to that key, and it builds presentations when a verifier asks for them. None of these needs a user interface. A headless wallet is a library or a sidecar that does the same three jobs inside the agent’s runtime.

The key is what every credential gets bound to, so its protection sets the value of the credential. Generate it in a cloud KMS or an HSM as a non-exportable key and let the wallet call the signing API: the agent process never sees the private key. On Kubernetes, tie access to that key to the workload identity. SPIFFE/SPIRE issues each pod an SVID after attesting the node and the workload, so only the intended service account in the intended namespace can request signatures.

The identifier can be a DID (did:web under the organisation’s domain, or did:jwk derived from the key) or simply the public key as a JWK, which is what SD-JWT VC puts in the cnf claim for holder binding. A SPIFFE ID such as spiffe://acme.example/ns/ops/sa/release-agent can travel in the credential as an attribute, so a verifier can match the presentation to a workload.

An issuer should not bind a credential to whatever key it receives. OID4VCI 1.0 defines key attestations: a signed statement, from the wallet provider or the platform, that a key lives in a given kind of protected storage. For mobile wallets the attestation comes from the phone’s hardware. For a headless wallet it can come from the HSM (Google Cloud KMS, for example, produces attestation statements for HSM-protected keys) or from an internal attestation service that trusts the SPIRE server. The issuer checks it before issuing anything.

Issuing a delegation credential with OID4VCI #

The agent should not log in by itself: the authority it needs belongs to a person. Issuance therefore starts with the person, in the same Keycloak login they use today.

sequenceDiagram
  autonumber
  actor U as User
  participant K as Keycloak / izySSI issuer
  participant A as AI agent (headless wallet)
  U->>K: Log in (OIDC + MFA)
  U->>K: Delegate to agent: actions, resources, duration
  K-->>A: Credential offer by API (pre-authorized code)
  U-->>A: tx_code over a separate channel (optional)
  A->>K: POST /token (pre-authorized_code, tx_code)
  K-->>A: access_token
  A->>K: POST /nonce
  K-->>A: c_nonce
  Note over A: Sign proof JWT with KMS key, add key attestation
  A->>K: POST /credential (proofs.jwt)
  K->>K: Check proof, nonce, attestation, agent key
  K-->>A: SD-JWT VC bound to the agent key (cnf)

The person delegates to a specific agent

The user logs in to the izySSI portal through Keycloak with their usual credentials and MFA, picks a registered agent and chooses what to delegate: actions, resources and a maximum duration. Keycloak already knows the user’s roles, so the portal can refuse to delegate more than the user holds.

The credential offer reaches the agent by API

Where the human flow renders a QR code, the issuer sends the credential offer to the agent’s registration endpoint, or the orchestrator that starts the agent job passes it in. The offer uses the pre-authorized code grant:

{
  "credential_issuer": "https://ssi.acme.example",
  "credential_configuration_ids": ["AgentDelegation_SDJWT"],
  "grants": {
    "urn:ietf:params:oauth:grant-type:pre-authorized_code": {
      "pre-authorized_code": "SplxlOBeZQQYbYS6WxSbIA",
      "tx_code": { "length": 6, "input_mode": "numeric" }
    }
  }
}

The pre-authorized code is a single-use bearer secret, so the offer should expire within minutes. The tx_code adds a second factor delivered over a different channel: the orchestrator can read it from a secret store, or the user can paste it into the agent’s job.

Token, nonce and credential requests

The agent redeems the code at the token endpoint, gets a fresh c_nonce from the nonce endpoint and signs a proof JWT (typ: openid4vci-proof+jwt) with its KMS key. The proof names the issuer as audience, carries the nonce, and includes the key attestation in its header.

POST /token HTTP/1.1
Host: ssi.acme.example
Content-Type: application/x-www-form-urlencoded

grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code
&pre-authorized_code=SplxlOBeZQQYbYS6WxSbIA&tx_code=493536

POST /credential HTTP/1.1
Host: ssi.acme.example
Authorization: Bearer czZCaGRSa3F0MzpnWDFmQmF0M2JW
Content-Type: application/json

{
  "credential_configuration_id": "AgentDelegation_SDJWT",
  "proofs": { "jwt": ["eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIs..."] }
}

The issuer checks the proof signature, the nonce, the attestation, and that the public key belongs to the agent the user selected. Then it issues a credential bound to that key.

What the delegation credential contains

With SD-JWT VC, the decoded payload looks like this:

{
  "iss": "https://ssi.acme.example",
  "vct": "https://ssi.acme.example/vct/agent-delegation/v1",
  "sub": "spiffe://acme.example/ns/ops/sa/release-agent",
  "iat": 1795424400,
  "exp": 1795425300,
  "cnf": { "jwk": { "kty": "EC", "crv": "P-256", "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc", "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ" } },
  "delegation": {
    "delegated_by": "maria.rossi@acme.example",
    "actions": ["deployments:scale", "deployments:get"],
    "resources": ["k8s:prod-eu-1/ns/checkout"],
    "max_replicas": 10,
    "ticket": "OPS-4182"
  },
  "status": { "status_list": { "idx": 4182, "uri": "https://ssi.acme.example/status/agents/1" } }
}

cnf.jwk is the holder binding: only the agent’s key can present this credential. delegation is not a registered claim. Its structure is defined by the credential type in vct, which the issuer and the verifiers agree on. The expiry here is 15 minutes; for longer jobs, hours rather than months. status points to a Token Status List entry for revocation before expiry.

Claims that not every verifier needs, such as the delegator’s email or the ticket number, can be selectively disclosable, so the agent reveals them only to verifiers that ask. W3C VC Data Model 2.0 also works here, secured with JOSE/COSE or a Data Integrity proof. izySSI issues W3C VCs for people today; for agents, the format follows what the verifiers accept.

Machine-to-machine presentation with OID4VP #

On the verifier side, the QR code becomes an HTTP response.

sequenceDiagram
  autonumber
  actor U as User
  participant A as AI agent (headless wallet)
  participant S as Service / MCP server (verifier)
  participant I as izySSI issuer
  A->>S: Tool call without access token
  S-->>A: 401 + OID4VP request_uri
  A->>S: GET request_uri
  S-->>A: Signed request (client_id, nonce, dcql_query, response_uri)
  Note over A: Select credential, disclose claims, sign KB-JWT (nonce, aud)
  A->>S: POST response_uri: vp_token, state (direct_post)
  S->>I: Issuer keys and status list (cached)
  S->>S: Verify, then apply policy
  opt Sensitive action
    S->>U: Approval request
    U-->>S: Approve
  end
  S-->>A: Short-lived DPoP-bound access token
  A->>S: Tool call with token + DPoP proof
  S-->>A: Result

The service asks for a presentation

The agent calls a protected API or MCP server without a valid access token. Where a website would show a QR code, the service answers 401 with a pointer to an OID4VP authorization request. No standard yet says how a 401 should carry that pointer. The MCP authorization specification uses OAuth 2.1 with protected resource metadata (RFC 9728), so the request can be advertised there or in a WWW-Authenticate parameter that both sides agree on.

The request is a signed JWT. In OID4VP 1.0 the verifier states what it wants with a DCQL query:

{
  "client_id": "x509_san_dns:mcp.acme.example",
  "response_type": "vp_token",
  "response_mode": "direct_post",
  "response_uri": "https://mcp.acme.example/oid4vp/response",
  "nonce": "n-0S6_WzA2Mj",
  "state": "eyJhZ2VudCI6InJlbGVhc2UifQ",
  "dcql_query": {
    "credentials": [{
      "id": "delegation",
      "format": "dc+sd-jwt",
      "meta": { "vct_values": ["https://ssi.acme.example/vct/agent-delegation/v1"] },
      "claims": [
        { "path": ["delegation", "actions"] },
        { "path": ["delegation", "resources"] },
        { "path": ["delegation", "delegated_by"] }
      ]
    }]
  }
}

The agent builds and sends the presentation

The headless wallet checks who is asking (the request signature and the client_id), finds a credential that satisfies the query and applies its own rules. An agent should present only to verifiers it was configured for, because a phishing MCP server can ask for credentials too. For an SD-JWT VC, the wallet discloses the requested claims and appends a key binding JWT signed with the agent’s key. The KB-JWT contains the nonce, the verifier’s client_id as audience and a hash of the presentation, so it cannot be replayed to another service. With response_mode=direct_post the wallet posts the result to response_uri:

POST /oid4vp/response HTTP/1.1
Host: mcp.acme.example
Content-Type: application/x-www-form-urlencoded

vp_token={"delegation":["eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCJ9...~WyJ...~eyJ0eXAiOiJrYitqd3Qi..."]}
&state=eyJhZ2VudCI6InJlbGVhc2UifQ

What the verifier checks

flowchart TD
  R[vp_token received] --> C1{Issuer signature<br/>valid and trusted?}
  C1 -- no --> X[Reject]
  C1 -- yes --> C2{Within<br/>iat and exp?}
  C2 -- no --> X
  C2 -- yes --> C3{KB-JWT: cnf key,<br/>nonce, aud?}
  C3 -- no --> X
  C3 -- yes --> C4{Delegation covers<br/>tool and resource?}
  C4 -- no --> X
  C4 -- yes --> C5{Not revoked in<br/>status list?}
  C5 -- no --> X
  C5 -- yes --> C6{OPA or Cedar<br/>policy}
  C6 -- deny --> X
  C6 -- needs approval --> H[Ask the delegating user]
  H -- rejected --> X
  H -- approved --> T
  C6 -- allow --> T[DPoP-bound token, 5 minutes<br/>sub = user, act = agent]

The verifier checks the issuer’s signature against its list of trusted issuers, then the validity period, then the holder binding. Next comes the delegation itself: the requested tool and resource must fall inside actions and resources, and the verifier can also check with Keycloak that the delegating user still holds those rights. After the status list, local policy in OPA or Cedar has the last word and can send sensitive actions to a human.

If everything passes, the agent receives an access token that lives for minutes, so it does not repeat the presentation on every call. The token is bound to the agent’s key with DPoP (RFC 9449): stolen from a log, it is useless without the key. It names the user as subject and the agent as actor, with the act claim from OAuth token exchange (RFC 8693), so every API log line records both. OID4VP does not define what the verifier returns to a direct_post beyond an optional redirect, so returning the token there, or through a token exchange call after it, is an implementation choice.

The human flow and the agent flow side by side #

flowchart LR
  subgraph P[Person with the izySSI Android wallet]
    direction TB
    P1[Log in through Keycloak] --> P2[QR code with credential offer]
    P2 --> P3[Wallet scans it, keys on the phone]
    P3 --> P4[Verifier shows QR with OID4VP request]
    P4 --> P5[User consents, wallet posts the VP]
  end
  subgraph G[AI agent with a headless wallet]
    direction TB
    G1[User logs in through Keycloak and delegates] --> G2[Credential offer delivered by API]
    G2 --> G3[Wallet library, keys in KMS or HSM, SPIFFE identity]
    G3 --> G4[Service answers 401 with OID4VP request]
    G4 --> G5[Wallet rules select claims, wallet posts the VP]
  end
  P ~~~ G

The issuer, the verifier, the protocols and the credential format stay the same. Three things change. The offer and the request travel in API responses instead of QR codes. The keys move from the phone to a KMS or HSM tied to a workload identity. Consent splits in two: the person approves the delegation once, at issuance, and the wallet’s configured rules decide each presentation within that delegation.

Why this is better than API keys and shared tokens #

Question Static API key or shared token Delegation credential
Who delegated? Not recorded delegated_by , signed by the issuer
What may the agent do? Whatever the key allows actions andresources , checked per call
Until when? Until someone rotates it exp in minutes or hours
Revocation Rotate the key, break every user of it One status list entry
Proof of identity Possession of a copyable string Signature from a non-exportable, attested key
Audit Key ID User as subject, agent as actor, ticket
Interoperability Proprietary per service OID4VCI, OID4VP, SD-JWT VC, W3C VC

The verifier needs no shared secret with the issuer and no call to it for each request: the issuer’s public keys and a cached status list are enough. That matters when the services an agent calls belong to other teams or other companies. Every presentation is also evidence. The verifier can store the disclosed claims and the KB-JWT, which together show that this agent, holding this key, acted on this delegation at this time.

Open problems #

Delegation chains

An orchestrator agent that hands work to sub-agents should pass on less authority than it holds. The headless wallet could act as an issuer for a narrower credential, and the verifier would walk the chain and check that each step shrinks the scope, the idea behind capability tokens such as UCAN or Biscuit. OID4VCI and OID4VP do not define chained delegation, and nested act claims from RFC 8693 record a chain without proving it. For now, keep chains short and have sub-agents request their own credentials from the issuer.

Real-time revocation

Status lists are cached, so revocation takes effect when the verifier’s cache expires. Short credential lifetimes and access tokens of a few minutes bound the exposure. For high-risk actions the verifier can fetch a fresh status list or ask the issuer directly.

Key management

Rotating an agent’s key means issuing new credentials. Teams have to decide whether a key belongs to an agent type or to each running instance, and what happens when a pod restarts. Key attestation in OID4VCI was designed with phones in mind; formats for server-side keys in KMS and HSM services are not standardized yet.

Humans in the loop for sensitive actions

A delegation credential sets a ceiling, not a blank cheque. Deleting data or moving money should still go back to a person at the moment of the action. OpenID CIBA (Client-Initiated Backchannel Authentication) fits this case because it needs no browser on the agent’s side.

eIDAS 2.0 and the EUDI Wallet

Regulation (EU) 2024/1183 and the EUDI Wallet use OID4VCI, OID4VP, SD-JWT VC and ISO mdoc, the same building blocks described here. The wallet architecture covers natural and legal persons, not software agents. A practical bridge exists anyway: the user who delegates can authenticate to the issuer with their EUDI Wallet instead of a password, so the agent’s credential traces back to a verified person or company.

Where izySSI and IzyTrust fit #

izySSI implements OID4VCI and OID4VP with Keycloak for people. The agent flow keeps the same issuer and verifier roles and adds offers and requests delivered by API, a headless wallet and a delegation credential type.

IzyTrust governs what agents do through a self-hosted MCP gateway, with short-lived delegated tokens, OPA or Cedar policy and human approval for destructive actions. In a combined design, the IzyTrust gateway is the verifier: it accepts the agent’s presentation, checks the delegation and issues the token it already uses for each tool call.

If you are connecting agents to internal APIs or MCP servers and want delegation that a verifier can check, contact us for a demo or to scope a pilot with one agent and one service.

── more in #ai-agents 4 stories · sorted by recency
── more on @izyssi 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/verifiable-credentia…] indexed:0 read:14min 2026-11-23 · —