-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description
ldap security today requires that the application has identical names for ldap groups and application roles. But this is not realistic. most orgs have a naming convention for ldap objects, which will clash with java group names.
Implementation ideas
Elytron has the required possibilities, they need to be made accessible from quarkus. You have to decide if this is ldap-only or general. Code goes more or less like this:
Adapt the class:
In io.quarkus.elytron.security.runtime.ElytronRecorder # configureDomainBuilder:
I assume a config more or less like this:
quarkus.security.grouptorole.SOME_LDAP_GROUP_NAME=role1,role2
Add something like:
Map<String, Set<String>> roleMap = new HashMap<>();
for each GROUP & ROLE from the config:
roleMap.put(GROUP, new HashSet<>(Arrays.asList(ROLE.trim().split(" *, *"))));
<the realm builder, just after the call to setRoleDecoder>
.setRoleMapper(MappedRoleMapper.builder().setRoleMap(roleMap).build());
Metadata
Metadata
Assignees
Labels
kind/enhancementNew feature or requestNew feature or request