Keycloak
Setup guide for using Keycloak as the OIDC provider for the FDK server.
Realm Setup
- Create a new realm or use an existing one.
- Note the realm URL:
https://<keycloak-host>/realms/<realm-name>.
Client Registration
- Navigate to Clients → Create client.
- Configure the client:
- Client ID: Choose a name (e.g.,
fdk-server) - Client type: OpenID Connect
- Client authentication: Off (public client)
- Authentication flow: Standard flow enabled
- Client ID: Choose a name (e.g.,
- Set the access URIs:
- Valid redirect URIs:
https://<your-server-domain>/* - Valid post logout redirect URIs:
https://<your-server-domain>/*
- Valid redirect URIs:
Scopes
- Go to Clients → your client → Client scopes tab.
- Ensure these are in Default scopes:
openid,profile,email. - Move
offline_accessfrom Optional to Default scopes.
Protocol Mappers
Add the following mappers to the client scope.
Audience
Adds the client_id to the aud claim.
- Mapper type: Audience
- Included Client Audience: your client ID
- Add to ID token: Yes
- Add to access token: Yes
Groups
Maps realm roles to a groups claim.
- Mapper type: User Realm Role
- Token Claim Name:
groups - Multivalued: Yes
- Add to ID token: Yes
- Add to access token: Yes
Server Configuration
AUTH__ISSUER=https://keycloak.example.com/realms/myrealm
AUTH__CLIENT_ID=fdk-server
AUTH__REFRESH_URL=https://keycloak.example.com/realms/myrealm/protocol/openid-connect/tokenThe server discovers all OIDC endpoints from the issuer URL via
.well-known/openid-configuration. No additional endpoint configuration is required.