Keycloak as an OpenID4VCI verifiable credential issuer

Keycloak can act as an OpenID4VCI issuer for SD-JWT VC and JWT VC credentials, but the feature is a disabled-by-default preview, so production plans need to account for that and for the revocation limits.

On this page

When teams consider Keycloak as a verifiable credential issuer

An organization that already runs Keycloak for sign-in and wants to issue digital credentials to employees, members or customers can use Keycloak as the issuer. Keycloak supports OpenID for Verifiable Credential Issuance (OpenID4VCI) with the SD-JWT VC and JWT VC formats, but the feature is a preview: it is disabled by default and the project does not recommend it for production. Treat it as a way to pilot the model on infrastructure you control, not as a settled credential service.

The model has three roles. The issuer (Keycloak) authenticates a user through the sign-in it already manages, then issues a signed credential that carries claims from the user's profile. The holder is the person or wallet that receives and stores the credential and presents it when asked. The verifier is the relying party that checks the signature and claims before it trusts the presentation. Keycloak plays only the issuer role here. Your team still needs a wallet that the holder uses, and a verifier that your applications run, and both must support the chosen format.

Keycloak fits when credentials are an extension of sign-in: the claims already live in Keycloak, the audience is your own workforce or a known user base, and the verifiers are few and under your control. A dedicated credential platform is the better choice when you need mature wallet support, production-grade status and revocation, or issuance at scale across many verifiers. The mDL/mdoc format has only experimental support in Keycloak and should not be used in production, so confirm which formats your verifiers accept before you design claims.

Revocation is the limit to plan around first. Revoking a credential removes the server-side record and stops future refresh, but a credential already held in a wallet remains cryptographically valid until its exp claim, and Keycloak has no status list mechanism for verifiers yet. Set short expiry periods, decide how a verifier learns that a credential should no longer be accepted, and confirm the current preview behavior in the Keycloak features guide with your own test before committing.

How a credential moves from Keycloak to a wallet and a verifier

The flow starts when the holder's wallet asks for a credential offer and Keycloak authenticates the user, which is the point where the organization's trust boundary applies. Keycloak then issues an SD-JWT VC or JWT VC to the wallet, which stores it on the holder's side. The verifier, outside the organization, checks the presented credential against the issuer, and it should not assume the credential is still valid. A credential revoked in Keycloak remains cryptographically valid in the wallet until its exp claim, so verifiers need a plan for that gap.

Issuance and presentation across the Keycloak, wallet and verifier trust boundaries.

Credential formats and feature options compared

This table compares the two credential formats Keycloak supports for issuance, the experimental mDL/mdoc format, and the OpenID4VCI preview feature flag. Read each row against what your verifiers can accept, because the format you issue determines what the verifier must parse and validate. The main takeaway is that only SD-JWT VC and JWT VC are documented for issuance, and the preview flag is off by default and not recommended for production.

OptionWhat it is and when it fitsWhat the verifier must supportProduction status
SD-JWT VCSelectively disclosable credential format suited to cases where the holder reveals only some claims to a verifier. Fits when your verifiers are built around SD-JWT handling.An SD-JWT VC parser, disclosure checks and signature validation against the issuer key. Confirm the exact profile your verifier implements.Supported for issuance, but the feature sits behind the preview flag
JWT VCCredential encoded as a signed JWT. Fits when your verifiers already process JWTs and do not need selective disclosure.JWT signature validation, claim checks and expiry handling. Selective disclosure is not part of this format.Supported for issuance, but the feature sits behind the preview flag
mDL/mdocMobile document format for identity documents such as driver's licenses. Fits only for pilots and evaluation.Verifiers would need mdoc-specific handling. Confirm with the verifier vendor before any planning.Experimental only. Documentation says not to use it in production
OpenID4VCI preview flag (oid4vc-vci:v1)Feature switch that enables OpenID for Verifiable Credential Issuance in Keycloak. Required before any issuance work.Not applicable to verifiers. Plan for the preview behavior to change between releases.Disabled by default and not recommended for production
Revocation modelRevoking removes the server-side record and blocks future refresh. Credentials already in a wallet stay valid until their exp claim.No status list mechanism is available for verifiers yet, so verifiers must rely on short expiry or their own checks.Plan around this limit before issuing any long-lived credential

How to enable and test OpenID4VCI issuance in a non-production realm

This sequence takes a team from a confirmed Keycloak version to a tested credential issuance in an isolated realm, so they can judge the preview feature's behavior before any production decision.

  1. Confirm the Keycloak version in use

    The platform team records the exact Keycloak version running in the non-production environment and compares it against the current release notes and the features guide before changing anything. Confirm that the OpenID4VCI feature (oid4vc-vci) is available in that version and that its status is still preview, since the feature guide lists it as disabled by default and not recommended for production. Record the version in the test plan so that later findings can be tied to a specific build. The step is done when the version, the feature status and the environment name are written down and reviewed by the person who owns the test.

  2. Enable the oid4vc-vci feature flag

    An administrator enables the oid4vc-vci feature in the non-production Keycloak instance using the feature flag mechanism described in the Keycloak features guide. Confirm the exact startup option or configuration key for your version in the current docs, because the syntax is set by the release and may change. Restart the instance in the same way your team restarts other test servers, then check the startup logs for the feature being reported as enabled. The step is done when the server starts cleanly and the admin console shows the feature state you expected. Do not enable the flag on a production realm or shared environment.

  3. Create a dedicated test realm

    The administrator creates a separate realm for credential testing so that test users, clients and signing keys do not mix with real workforce or customer identities. Keep the realm name and purpose documented, and restrict who can administer it. Confirm in the server administration guide how realms are created and which realm should not be used for application users. The step is done when the realm exists, contains only test accounts, and its admin access is limited to the named testers.

  4. Configure the credential issuer and configurations

    In the test realm, the team defines the credential issuer and one credential configuration for each format it plans to test, such as SD-JWT VC or JWT VC. Use the server administration guide to confirm the current configuration keys, the required claims, the signing key used, and the credential lifetime setting that controls the exp claim. Note that the mDL/mdoc format has only experimental support and should not be used in production, so exclude it from production-intended tests. The step is done when each configuration appears in the realm and a test user can be linked to the expected claims without errors in the logs.

  5. Run a test issuance with a test wallet

    A tester uses a wallet that supports the chosen format and the OpenID4VCI flow, and completes a credential offer against the test realm with a test user. Confirm which wallets support the format and version under test before the session, since wallet support is outside Keycloak's control. Capture the credential offer, the token and credential requests, and any errors from both the wallet and the Keycloak logs. The step is done when the wallet holds a credential issued by the test realm and the request trail is saved with the test record.

  6. Inspect the credential contents and expiry

    The tester decodes the issued credential and checks that the claims match the test user's profile and the credential configuration, including the issuer identifier and the exp claim. Compare the expiry with the lifetime set in step four, and confirm that the value is what the team expects in both SD-JWT VC and JWT VC outputs if both are tested. Verify that the disclosures and selectively disclosable claims behave as documented, using a verifier tool the team trusts. The step is done when the claims and expiry are recorded as matching the configuration, and any mismatch is logged as a finding.

  7. Test revocation and record the limits

    The tester revokes the test credential in Keycloak and confirms that the server-side record is removed and future refresh is blocked. Then the tester checks the credential already held in the wallet, which the server administration guide says stays cryptographically valid until its exp claim, and confirms that no status list mechanism is available for verifiers yet. Record this result as an accepted limit for the design review. The step is done when the revocation behavior is documented with the wallet's observed state and the team has a written plan for how verifiers and relying parties handle it.

Revocation and other limits to plan around

OpenID4VCI issuance in Keycloak is useful for pilots, but its lifecycle controls stop at the issuer. The cards below cover what revocation does and does not reach, how the preview status and experimental formats shape the decision, and what your team must confirm in its own environment before relying on credentials.

Revocation stops at the issuer

Revoking a credential removes the server-side record and blocks future refresh. A credential already held in a wallet, however, stays cryptographically valid until its exp claim passes. Plan the exp lifetime around how quickly you need access to end, and decide whether a short-lived credential with re-issuance is a better fit than a long-lived one for your use case.

Keycloak docs

No status list for verifiers

Keycloak does not currently provide a status list mechanism that verifiers can query to learn that a credential was revoked. A verifier that accepts a credential will not see the revocation unless you build a separate check. Confirm with your verifier team whether an out-of-band lookup, a shorter credential lifetime or an accepted risk is the control you will rely on.

Preview status of OpenID4VCI

OpenID4VCI support is a preview feature, disabled by default and not recommended for production. Enabling it means accepting that behavior, endpoints and configuration may change between releases. Test each Keycloak upgrade against your issuance flow in a non-production realm, and record which preview feature flag your deployment depends on.

Feature settings

Experimental mDL and mdoc support

The mDL and mdoc format has only experimental support, and the documentation says it should not be used in production. If a driving licence or similar mobile document is part of your requirements, treat it as a research item. Ask the Keycloak project and your wallet vendor which formats they test together before committing to a format.

Formats you can plan around

Keycloak supports SD-JWT VC and JWT VC for credential issuance. Choose between them by checking which format your holders' wallets and your verifiers accept, and by confirming how each format handles selective disclosure for the attributes you need to share. Document the choice, since changing format later reissues every credential.

Items to confirm in your environment

Before a pilot moves toward production, confirm the Keycloak release you will run, the preview feature state, the credential lifetime, the revocation procedure for lost devices and the verifier's acceptance rules. Ask your Keycloak implementation partner to test issuance, refresh, revocation and expiry end to end, and record the results as evidence for your risk owners.

Security and operational controls for a credential issuer

A Keycloak instance that issues verifiable credentials inherits every production control it already needs for sign-in, and the issuer role makes several of them more consequential. Start with TLS on all communication, as Keycloak's production guide calls for, and extend it to the traffic between the wallet, the issuer endpoints and the reverse proxy in front of them. Place the admin console and the Administration REST API on a different hostname or context path from the public frontend URLs, so that the endpoints a wallet reaches are not the endpoints that can change realm, client or credential configuration. Keep the management interface, where --metrics-enabled=true exposes Prometheus-format metrics at /metrics, off the public network and scrape it only from your monitoring network.

The signing keys are the highest-impact control in this design. Whoever holds the key used to sign SD-JWT VC or JWT VC credentials can mint credentials that verifiers will accept, so decide before go-live where keys are stored, who can read or rotate them, and how a compromised key would be replaced. Confirm with your security team how Keycloak's key providers fit your key management standard, and whether a hardware or external key store is required. Credential expiry is the second decision. Because a revoked credential stays cryptographically valid in a holder's wallet until its exp claim, the expiry you choose is the only bound on how long a leaked or withdrawn credential remains usable. Short lifetimes shift risk to refresh and reissuance, so test that path under load before you commit.

Audit of issuance events closes the loop. Enable and review login and admin events so that changes to the issuer configuration and the users who received credentials can be reconstructed later, and confirm with the Keycloak audit logging guidance which events are recorded by default and how long they are retained. Before go-live, decide who approves changes to credential configurations, who can revoke credentials, which events go to your SIEM, and who reviews them. Because the feature is in preview and not recommended for production, record that decision in your risk register and confirm the current status of OpenID4VCI support against the Keycloak features guide before you rely on it.

Questions buyers ask before issuing credentials from Keycloak

Is OpenID4VCI ready for production use in Keycloak?

No. OpenID4VCI support (oid4vc-vci:v1) is a preview feature in Keycloak, disabled by default, and the project does not recommend it for production. Treat it as a pilot or proof of concept until the feature is promoted in the release notes. Before any pilot, confirm the feature status for the exact Keycloak version you plan to run, and check the Keycloak features guide for how to enable it. Plan the pilot so that a change in the preview API or configuration does not affect a live credential program.

Which credential formats can Keycloak issue today?

Keycloak supports SD-JWT VC and JWT VC for credential issuance. The mDL/mdoc format has only experimental support, and the documentation says it should not be used in production. If a use case requires mobile driving licence style credentials, plan that as a research item, not a delivery item. Confirm the supported formats against the Keycloak server administration guide for your target version before you write the credential schema.

What does the team need to staff this work?

The work needs people who can model credentials, configure Keycloak realms and clients, and run a secure server. In practice that means an identity engineer who knows OpenID Connect and Keycloak administration, a security reviewer who understands holder binding and key handling, and an application owner who defines the credential data and the holder experience. Wallet selection and verifier integration add further skills. Plan for the preview status too, since someone must track changes in each Keycloak release.

What drives the cost and duration of an issuance project?

Cost and duration follow the scope: the number of credential types, the claims each one carries, the number of verifiers and wallets that must accept the credential, and how the issuer is hosted and secured. Other drivers include the source of truth for holder data (an existing identity provider or an HR system), the number of environments, and the evidence your compliance team needs. Ask any provider for a written scope with deliverables, assumptions and the test plan, and ask which items are one-time work and which recur, such as Keycloak upgrades and preview feature changes.

Can our own team build and run this without outside help?

A capable identity team can build a pilot alone if it has time to read the preview documentation, test each release, and work through the wallet and verifier interoperability questions. Outside help is most useful for scoping the credential model, hardening the Keycloak deployment, writing the test plan, and preparing the evidence that security reviewers request. DeployOpen implements, hardens, documents and supports self-hosted open-source platforms, but the choice between an internal build and a partner-led build depends on your skills, deadlines and risk appetite.

How does revoking a credential affect verifiers?

Revoking a credential in Keycloak removes the server-side record and prevents future refresh. It does not invalidate a credential already held in a wallet. That credential stays cryptographically valid until its exp claim, and Keycloak has no status list mechanism that verifiers can check yet. Plan short credential lifetimes, a clear policy for holders, and verifier rules that accept the residual window. If your use case needs immediate revocation, a status list or a dedicated credential platform is a requirement to confirm before design starts.

When is a dedicated credential platform a better fit than Keycloak?

Choose a dedicated credential platform when you need status lists, mature wallet and verifier interoperability, mdoc support in production, or a managed revocation model that verifiers can query. Keycloak fits well when you already run it for sign-in and want credentials issued from the same identity data, with the preview limits accepted. Ask a candidate platform to confirm, in writing, the formats, revocation method, preview or production status, and the evidence it provides for your compliance review.

What should we check before a Keycloak credential pilot goes live?

Check that the Keycloak version and preview feature status match your plan, that the credential formats are the supported ones, and that TLS and admin endpoint separation follow the production guidance. Confirm the exp lifetimes, the revocation process for lost or changed holder data, and the verifier rules for expired or revoked credentials. Test the full holder flow with each wallet you plan to support, and record results so that an upgrade can be retested against the same cases.

What to confirm with the vendor and in your environment

The OpenID4VCI issuer feature is still in preview, so several decisions depend on facts that change between releases and between ecosystems. The cards below list what to verify with the Keycloak project, your verifiers and wallet providers, and your own compliance team before a design is locked.

Release that carries the feature

The preview status of oid4vc-vci:v1 is documented for the release line you read, but the exact release, feature flag name and maturity level can change between minor versions. Confirm the Keycloak release you plan to deploy, check its feature guide for the current status, and record the version in your design. Ask the project whether any change to the preview is expected before your go-live date, because a preview feature can change behavior without the same compatibility promise as stable features.

Keycloak features guide

Verifier support for SD-JWT VC and JWT VC

Keycloak issues SD-JWT VC and JWT VC, but a credential is only useful if your verifiers can parse, validate and trust it. Ask each verifier or relying party which formats, signing algorithms, key discovery methods and selective disclosure behavior they accept. Test with a real verifier build in a lab before you promise a use case. Treat the mDL/mdoc format as out of scope for production, since the documentation marks it experimental.

Wallet compatibility

Holders receive credentials in a wallet, and wallets differ in which OpenID4VCI flows, credential formats and key binding methods they support. Confirm with each wallet provider that it can complete the issuance flow Keycloak offers, store the format you issue, and present it to your verifiers. Record the wallet versions you tested, because wallet support often changes faster than issuer releases. Plan a fallback path for holders whose wallets cannot complete issuance.

Exact configuration keys

Realm settings, client scopes, credential configuration and feature flags are the parts of the design most likely to change under a preview feature. Do not copy configuration keys from blog posts or older guides. Take the exact keys, value formats and defaults from the Keycloak server administration guide for your release, and keep them in version-controlled configuration so the same setup can be reviewed and reproduced. Ask the project which settings are considered stable within the preview.

Issuer key management and rotation

The issuer signs every credential with keys held by Keycloak, so the key store, key type, algorithm and rotation schedule are security decisions. Confirm where the signing keys live, who can read or replace them, how a rotation affects credentials already in holders' wallets, and how verifiers learn about a new key. Check whether your hardening baseline for keys applies to this signing path, and record who approves a rotation. Run a rotation test in a non-production realm before you rely on it.

Revocation requirements from your regulator

Keycloak removes the server-side record on revocation and stops refreshes, but a credential already in a wallet stays cryptographically valid until its exp claim, and Keycloak offers no status list mechanism for verifiers yet. Ask your regulator, auditor or compliance lead whether a specific standard, sector rule or contract requires timely revocation status that verifiers can check. If it does, the gap may need a different design, a shorter credential lifetime, or a decision to defer the use case.

Keycloak admin guide

How DeployOpen scopes an OpenID4VCI issuance pilot

DeployOpen scopes an OpenID4VCI issuance pilot as a fixed-scope written agreement that names the credential types, the holder and verifier systems, the issuance flow and the environment before any work starts. Because OpenID4VCI support (oid4vc-vci:v1) is a preview feature that is disabled by default and not recommended for production, the agreed scope treats the pilot as non-production from the first day. The written scope should state which of the supported SD-JWT VC and JWT VC formats are in play, that the mDL/mdoc format is excluded because its support is experimental, and which feature flag is enabled in the pilot realm. Confirm the exact feature names and enablement steps against the Keycloak features guide before the agreement is signed.

Once scoped, DeployOpen plans the pilot in a separate non-production Keycloak instance, configures the issuer and the credential configurations for the agreed types, and tests issuance end to end. Testing covers the issuer, holder and verifier roles separately: whether the wallet obtains credentials through the pre-authorized or authorization code flow your design uses, whether claims match the agreed schema, whether refresh is blocked for revoked credentials, and how long a credential remains valid after revocation. Admin permissions, realm settings and signing key handling are reviewed against the same written scope, and each change is logged so the evidence trail is complete.

The deliverable is documentation for your security and compliance reviewers, not an audit or certification. DeployOpen records the configuration, test results, known limits and open risks, including that a credential already held in a wallet stays cryptographically valid until its exp claim and that Keycloak has no status list mechanism for verifiers yet. Your independent assessor decides whether that evidence is sufficient. Ask DeployOpen to confirm in the written scope who owns the pilot environment after handover, how test data is removed, and what is required to move any part of the design toward production, since that move is a separate decision and a separate scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.