Problem/Motivation
Currently, role mapping doesn't work. The keycloakRoleMapper service is retrieving role configuration from the old config objects instead of the openid connect provider entity.
I guess it makes sense to move all the role mapping logic to the keycloak provider plugin, since the mapping of the roles is saved in the config of the provider plugin.
The KeycloakRoleMapper currently supports only 1 provider. By moving all the logic to the plugin, it's possible to have multiple keycloak instances with it's own role mapping logic.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork keycloak-3365863
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jeroentComment #4
bramdriesenWill need a rebase.
This is a major feature which was still somewhere on my roadmap to tackle. Thanks for your work Jeroen! Will try to test this next week.
Comment #5
jeroentComment #6
bramdriesenNoticed the following in the logs which should be fixed as well.
Comment #7
bramdriesenThe Add and Remove button on the role mappings is still breaking the AJAX callback with the following errors:
Comment #8
bramdriesenComment #9
bramdriesenOne thing that could improved is an explanation what the "Pattern" field does. I had to look into the code to figure out that the group pattern needed to be without the slash in front of it. So not
/groupnamebutgroupname. I guess a few examples with more complex use cases could help.I'll create a small follow up for that. I tested this and it works great!
Comment #11
bramdriesenCreated follow up: #3366937: Explain the groups pattern field + documentation