This is a Keycloak provider that allows you to use a W3C SDJWT Credential to authenticate users in Keycloak.
This is the recommended way to start using this repository, you can also configure it manually but in the future the manual configuration will be heavily edited
- clone this repository
- run 'mvn clean package' in the root directory
- copy the jar file from the target directory to the 'providers' directory in your Keycloak installation
- restart Keycloak
This repository also contain a simple IDP provider implementation that uses EUDI verifier endpoints as a Credential Verifier.
The wallet used for testing purposes is the EUDI Wallet
The directory idp
contains a docker-compose file that launches the IDP and the Keycloak server with the SSI Verifier provider installed.
- Go to the
idp
directory - Run
docker-compose up -d
This repository also contain a preconfigured keycloak deployment. To run:
- Go to the
docker
directory - Run
docker-compose up -d
The previous setup should already set everything you need. Follow this steps only to check that everything is correctly set.
- Go to the Keycloak admin console
http://localhost:8080
logging in withadmin/password
- Go to the realm you want to configure (
pid-verification-realm
should be already present) - Go to the 'Identity Providers' tab
- Click on 'Add provider' and select 'SSI Verifier'
- Fill the
IDP Url
with the URL of the IDP you want to use (e.g. using provided idphttp://localhost:88
) - Fill the
Credential Type
with the Type of the credential you want to verify. - Fill the
Verifier Url
with the URL of the Verifier you want to use (e.g. using provided idphttp://localhost:80
) - Fill the
Claims requested
with a comma separated list of claims to be asked for
NOTE: The verifier referenced by
verifierUrl
MUST be the same as the one used by the IDP.
In the provided examples, the IDP and the Verifier use the EUDI verifier endpoints.
- Click on 'Save'
- Go to the 'Authentication' tab
- Go to the 'Flows' tab
- Select the flow you want to edit or copy (e.g. 'Browser')
- Remove every step except from
Cookie
andIdentity Provider Redirector
- Add the 'ssi-verifier' execution as
Identity Provider Redirector -> Default provider
to the flow - Click on 'Save'
- Select Action Bind Flow
- Select the flow you want to use (e.g. 'Browser')