From 658f204d9216acb55fa57bfffefda352ce1d9091 Mon Sep 17 00:00:00 2001 From: mposolda Date: Tue, 5 Jan 2016 18:50:54 +0100 Subject: [PATCH] Documentation for new LDAP mappers --- .../en/en-US/modules/user-federation.xml | 48 +++++++++++++++++++ .../GroupLDAPFederationMapperFactory.java | 2 +- .../role/RoleLDAPFederationMapperFactory.java | 2 +- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/docbook/auth-server-docs/reference/en/en-US/modules/user-federation.xml b/docbook/auth-server-docs/reference/en/en-US/modules/user-federation.xml index 272c2f69b8..ca82535d78 100755 --- a/docbook/auth-server-docs/reference/en/en-US/modules/user-federation.xml +++ b/docbook/auth-server-docs/reference/en/en-US/modules/user-federation.xml @@ -202,6 +202,54 @@ + + Hardcoded Role Mapper + + + This mapper will grant specified Keycloak role to each Keycloak user linked with LDAP. + + + + + Group Mapper + + + This allows to configure group mappings from LDAP into Keycloak group mappings. Group mapper can be used to map LDAP groups from particular branch of LDAP tree + into groups in Keycloak. And it will also propagate user-group mappings from LDAP into user-group mappings in Keycloak. + + + You can choose to preserve group inheritance from LDAP as well, but this may fail as Keycloak inheritance is more restrictive than LDAP + (For example in Keycloak each group can have just one parent and there is no recursion allowed. In LDAP the recursion is possible and every group can be member of more + other groups too). + + + As of now, the mapper doesn't provide mapping of LDAP roles-groups to Keycloak roles-groups + (For example when LDAP group cn=role1,ou=roles,dc=example,dc=com is member of LDAP group + cn=group1,ou=groups,dc=example,dc=com , we don't support the mapping of Keycloak role role1 imported from LDAP to corresponding Keycloak group group1 imported from LDAP). + + + + + MSAD User Account Mapper + + + Mapper specific to Microsoft Active Directory (MSAD). It's able to tightly integrate the MSAD user account state into Keycloak account state (account enabled, password is expired etc). + It's using userAccountControl and pwdLastSet LDAP attributes for that (both are specific to MSAD and are not LDAP standard). + For example if pwdLastSet is 0, the Keycloak user is required to update password (there will be UPDATE_PASSWORD required action added to him in Keycloak). Or if userAccountControl + is 514 (disabled account) the Keycloak user is disabled as well etc. + + + For writable LDAP, the mapping is bi-directional and the state from Keycloak is propagated to LDAP (For example enable user + in Keycloak admin console will update the value of userAccountControl in MSAD and effectively enable him in MSAD as well). + + + For writable LDAPs, mapper also provides mapping of error codes during MSAD user authentication to the + appropriate action in Keycloak. For example if MSAD user authentication fails due to the fact, that MSAD password is expired, + the mapper will allow user to authenticate into Keycloak, but it will add UPDATE_PASSWORD required action to the user, so user + must update his password. + + + By default, there is set of User Attribute mappers to map basic UserModel attributes username, first name, lastname and email to corresponding LDAP attributes. You are free to extend this and provide diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/group/GroupLDAPFederationMapperFactory.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/group/GroupLDAPFederationMapperFactory.java index fa43ac9721..c2134f114d 100644 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/group/GroupLDAPFederationMapperFactory.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/group/GroupLDAPFederationMapperFactory.java @@ -78,7 +78,7 @@ public class GroupLDAPFederationMapperFactory extends AbstractLDAPFederationMapp ProviderConfigProperty ldapFilter = createConfigProperty(GroupMapperConfig.GROUPS_LDAP_FILTER, "LDAP Filter", - "LDAP Filter adds additional custom filter to the whole query. Leave this empty if no additional filtering is needed. Otherwise make sure that filter starts with '(' and ends with ')'", + "LDAP Filter adds additional custom filter to the whole query for retrieve LDAP groups. Leave this empty if no additional filtering is needed and you want to retrieve all groups from LDAP. Otherwise make sure that filter starts with '(' and ends with ')'", ProviderConfigProperty.STRING_TYPE, null); configProperties.add(ldapFilter); diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/role/RoleLDAPFederationMapperFactory.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/role/RoleLDAPFederationMapperFactory.java index fe0b1e194c..58023aa9fc 100644 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/role/RoleLDAPFederationMapperFactory.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/mappers/membership/role/RoleLDAPFederationMapperFactory.java @@ -72,7 +72,7 @@ public class RoleLDAPFederationMapperFactory extends AbstractLDAPFederationMappe ProviderConfigProperty ldapFilter = createConfigProperty(RoleMapperConfig.ROLES_LDAP_FILTER, "LDAP Filter", - "LDAP Filter adds additional custom filter to the whole query. Leave this empty if no additional filtering is needed. Otherwise make sure that filter starts with '(' and ends with ')'", + "LDAP Filter adds additional custom filter to the whole query for retrieve LDAP roles. Leave this empty if no additional filtering is needed and you want to retrieve all roles from LDAP. Otherwise make sure that filter starts with '(' and ends with ')'", ProviderConfigProperty.STRING_TYPE, null); configProperties.add(ldapFilter);