A Keycloak plugin that reports the status of verifiable credentials to an external status list server, so you can revoke a credential before it expires, for example when it is compromised or must be invalidated for compliance reasons.
- Reports credential status to an external status list server
- Revokes issued verifiable credentials through a dedicated endpoint
- Caps non-revoked credentials per holder and type, with an overflow policy to either fail issuance or revoke oldest credentials automatically
This plugin has been tested and verified to work with:
| Component | Version |
|---|---|
| Keycloak | 26.8.0 |
It works with any status list server that implements both the
OAuth 2.0 Status List format and the management API
used by this plugin, such as the status list server project. A public
instance is available at https://statuslist.eudi-adorsys.com.
Prerequisite: Java 17 or later.
-
Build the plugin:
./mvnw clean package -DskipTests
-
Copy the resulting JAR from
target/keycloak-token-status-plugin-*.jarinto Keycloak'sprovidersdirectory. -
Restart Keycloak.
The plugin is also published on Maven Central.
Enable the plugin for a realm and point it at your status list server using these realm attributes:
| Attribute | Description |
|---|---|
status-list-enabled |
Enables the status list service for the realm |
status-list-server-url |
URL of the status list server |
Enabling these attributes alone is not sufficient. The status claim is only emitted after the
oid4vc-status-list-claim-mapper protocol mapper is attached to the client scope of the credential
configuration you want to publish. See Enabling the Status List protocol mapper for details.
The full list of configuration properties is documented in the technical reference.
A client application can revoke an issued credential through the plugin's /revoke endpoint, which sets the credential's status to INVALID so it can no longer be used. The request requires a bearer access token, mode=issued_credential_revocation, and the credential_id of the credential to revoke.
See the technical reference for the full request and response details.
This plugin can be combined with the OpenID4VP plugin, the status list server and the Mock FE app to build an end-to-end credential revocation demo. A step-by-step setup guide is available in docs/credential-revocation-demo/setup.md.
./mvnw test # run tests
./mvnw spotless:check # verify formatting
./mvnw spotless:apply # fix formattingThis project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). See LICENSE for details.