The roles
and groups
attributes are used to store role and group data for each user. This needs to be reported in the token, such that the backend can identify the user properly.
- go to
Clients
->authentication-client
in Keycloak - go to
client scopes
->authentication-client-dedicated
Add mapper
->By configuration
->User Attribute
Name
,User Attribute
andToken Claim Name
: enter all these fields withroles
- All switches are
true
except forAdd to lightweight acces token
.
- Repeat these steps for the
groups
attribute
Run script to
- Get members for each group
- Update those user to retrieve that group as an attribute.
python -m scripts.keycloak_migration_groups
Run script to
- retrieve all users,
- update their
role
toroles
attribute.
python -m scripts.keycloak_migration_roles
Run script to
- retrieve all groups,
- Report on missing organisations.
python -m scripts.database_migration_groups
Run script to
- Update flow column based on 'released' and 'published' column.
python -m scripts.database_migration_state
Run script to
- Update the operation names to new ones, namely removing 'released' and replacing it with 'state-update'
Remove old and unused mappers (only when you know this keycloak realm is no longer used in the old fashion).
- Remove
role
&group
mapper - Remove
released
&published
columns