Keycloak Attributes
This page describes the required attribute mappers that need to be configured on identity providers in Keycloak. These mappers are responsible for mapping token claims from external identity providers to user attributes in SDL.
Configuring Attribute Mappers
To configure these mappers for an identity provider:
-
Navigate to the identity provider’s configuration in Keycloak
-
Select the "Mappers" tab
-
Click "Add mapper"
-
On the mapper configuration page:
-
Set the mapper type to "Attribute Importer"
-
Give the mapper a meaningful name
-
Specify the name of the claim in the token
-
Specify the name of the user attribute the claim should be mapped to
-
Example 1: Mapping a "classification" claim
Mapper name |
|
Mapper type |
|
Claim |
|
User attribute name |
|
Example 2: Mapping a "fineAccessControls" claim
Mapper name |
|
Mapper type |
|
Claim |
|
User attribute name |
|
Example 3: Mapping a "country" claim
Mapper name |
|
Mapper type |
|
Claim |
|
User attribute name |
|
Example 4: Mapping a "citizenship" claim to "us_citizen"
Mapper name |
|
Mapper type |
|
Claim |
|
User attribute name |
|