Class LDAPPropertiesMapperImpl
java.lang.Object
com.atlassian.crowd.directory.ldap.LDAPPropertiesMapperImpl
- All Implemented Interfaces:
LDAPPropertiesMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLDAP binary attributes.static final StringLDAP connection factory.static final StringLDAP secure connection factory.static final StringLDAP initial context factory.static final StringLDAP connection method.static final StringLDAP secure connection method.Fields inherited from interface com.atlassian.crowd.directory.ldap.LDAPPropertiesMapper
FAST_MEMBERSHIP_SYNC, GROUP_DESCRIPTION_KEY, GROUP_DN_ADDITION, GROUP_NAME_KEY, GROUP_OBJECTCLASS_KEY, GROUP_OBJECTFILTER_KEY, GROUP_USERNAMES_KEY, LDAP_BASEDN_KEY, LDAP_EXTERNAL_ID, LDAP_FILTER_EXPIRED_USERS, LDAP_GROUP_EXTERNAL_ID, LDAP_NESTED_GROUPS_DISABLED, LDAP_PAGEDRESULTS_KEY, LDAP_PAGEDRESULTS_SIZE, LDAP_PASSWORD_KEY, LDAP_POOL_CONFIG, LDAP_POOL_INITSIZE, LDAP_POOL_MAXSIZE, LDAP_POOL_PREFSIZE, LDAP_POOL_TIMEOUT, LDAP_POOL_TYPE, LDAP_POOLING_KEY, LDAP_PROPOGATE_CHANGES, LDAP_REFERRAL_KEY, LDAP_RELAXED_DN_STANDARDISATION, LDAP_SEARCH_TIMELIMIT, LDAP_SECURE_KEY, LDAP_URL_KEY, LDAP_USER_ENCRYPTION_METHOD, LDAP_USERDN_KEY, LDAP_USING_USER_MEMBERSHIP_ATTRIBUTE, LDAP_USING_USER_MEMBERSHIP_ATTRIBUTE_FOR_GROUP_MEMBERSHIP, LOCAL_GROUPS, PRIMARY_GROUP_SUPPORT, ROLE_DESCRIPTION_KEY, ROLE_DN_ADDITION, ROLE_NAME_KEY, ROLE_OBJECTCLASS_KEY, ROLE_OBJECTFILTER_KEY, ROLE_USERNAMES_KEY, ROLES_DISABLED, USER_DISPLAYNAME_KEY, USER_DN_ADDITION, USER_EMAIL_KEY, USER_FIRSTNAME_KEY, USER_GROUP_KEY, USER_LASTNAME_KEY, USER_OBJECTCLASS_KEY, USER_OBJECTFILTER_KEY, USER_PASSWORD_KEY, USER_USERNAME_KEY, USER_USERNAME_RDN_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String key) protected booleangetBooleanKey(String key) protected booleangetBooleanKey(String key, boolean defaultValue) intReturns the interval in seconds when the local Cache should be synchronized with LDAP.Returns a map of the LDAP names as the keys and thepropertiesassociated with that LDAP connector.protected StringGet the LDAP unique ID attribute.Returns a map of the LDAP names as the keys and the implementation class as Strings.Get a list of Ldap Type Configuration objects.intprotected Stringprotected Stringprotected Stringprotected Stringprotected StringintbooleanReturnstrueif fast membership sync should be used for this directory.booleanSpecify whether expired users should be filtered out.protected booleanisLdaps()If the connection must be secure.booleanReturnstrueif groups and group memberships are to be mutated only (created, updated, deleted) in local storage, otherwise the mutations will be propagated to the underlying LDAP implementation (full read-write LDAP groups).booleanReturnstrueif user status are updated independently in the Crowd cache and the remote directory.booleanbooleanChecks if the configuration of the LDAP directory server uses paged results.booleanbooleanReturns true if referrals should be followed.booleanWhether we should use the more expensive but completely cross-directory compatible method for standardising DNs when mapping object DNs and and memberDNs (value =false); or if we can use a more efficient but relaxed form of standardisation (value =true).booleanReturns true if roles should be disabled, as in some caching setups.protected booleanbooleanbooleanvoidsetAttributes(Map<String, String> attributes)
-
Field Details
-
CONNECTION_INITIAL_CONTEXT_FACTORY
LDAP initial context factory.- See Also:
-
CONNECTION_SECURITY_AUTHENTICATION
LDAP connection method.- See Also:
-
CONNECTION_SSL_SECURITY_PROTOCOL
LDAP secure connection method.- See Also:
-
CONNECTION_FACTORY
LDAP connection factory.- See Also:
-
CONNECTION_FACTORY_SSL_IMPL
LDAP secure connection factory. -
CONNECTION_BINARY_ATTRIBUTES
LDAP binary attributes.- See Also:
-
-
Constructor Details
-
LDAPPropertiesMapperImpl
-
-
Method Details
-
getImplementations
Returns a map of the LDAP names as the keys and the implementation class as Strings.- Specified by:
getImplementationsin interfaceLDAPPropertiesMapper- Returns:
- The implementations.
-
getConfigurationDetails
Returns a map of the LDAP names as the keys and thepropertiesassociated with that LDAP connector.- Specified by:
getConfigurationDetailsin interfaceLDAPPropertiesMapper- Returns:
- The configuration details.
-
getEnvironment
- Specified by:
getEnvironmentin interfaceLDAPPropertiesMapper
-
isLdaps
protected boolean isLdaps()If the connection must be secure.- Returns:
trueif and only if the connection must be secure, otherwisefalse.
-
isUsingConnectionPooling
protected boolean isUsingConnectionPooling() -
getBooleanKey
-
getBooleanKey
-
getPoolInitSize
-
getPoolPrefSize
-
getPoolMaxSize
-
getPoolTimeout
-
getConnectionTimeout
-
getReadTimeout
-
getSearchTimeLimit
public int getSearchTimeLimit()- Specified by:
getSearchTimeLimitin interfaceLDAPPropertiesMapper
-
getAttributes
- Specified by:
getAttributesin interfaceLDAPPropertiesMapper
-
setAttributes
- Specified by:
setAttributesin interfaceLDAPPropertiesMapper
-
getAttribute
- Specified by:
getAttributein interfaceLDAPPropertiesMapper
-
getSecureMode
- Specified by:
getSecureModein interfaceLDAPPropertiesMapper
-
getBaseDN
-
getGroupBaseDN
-
getGroupFilter
- Specified by:
getGroupFilterin interfaceLDAPPropertiesMapper
-
getConnectionURL
- Specified by:
getConnectionURLin interfaceLDAPPropertiesMapper
-
getUsername
- Specified by:
getUsernamein interfaceLDAPPropertiesMapper
-
getPassword
- Specified by:
getPasswordin interfaceLDAPPropertiesMapper
-
getGroupNameAttribute
- Specified by:
getGroupNameAttributein interfaceLDAPPropertiesMapper
-
getObjectClassAttribute
- Specified by:
getObjectClassAttributein interfaceLDAPPropertiesMapper
-
getRoleFilter
- Specified by:
getRoleFilterin interfaceLDAPPropertiesMapper
-
getRoleBaseDN
-
getRoleNameAttribute
- Specified by:
getRoleNameAttributein interfaceLDAPPropertiesMapper
-
getUserFilter
- Specified by:
getUserFilterin interfaceLDAPPropertiesMapper- Returns:
- the configured user filter for the directory, which may include an additional filter for expired users if:
- the directory is AD
- filter expired users is configured
For retrieving the configured user filter without the expired users filter, please use the
LDAPPropertiesMapper.LDAP_FILTER_EXPIRED_USERSdirectory attribute
-
getPrincipalBaseDN
-
getUserNameAttribute
- Specified by:
getUserNameAttributein interfaceLDAPPropertiesMapper
-
getUserNameRdnAttribute
- Specified by:
getUserNameRdnAttributein interfaceLDAPPropertiesMapper
-
getUserEmailAttribute
- Specified by:
getUserEmailAttributein interfaceLDAPPropertiesMapper
-
getUserGroupMembershipsAttribute
- Specified by:
getUserGroupMembershipsAttributein interfaceLDAPPropertiesMapper- Returns:
- attribute for the LDAP principal memberships. This is a multivalued attribute on the user that enumerates all the groups the user belongs to. Typical values are "memberOf" and "uniqueMemberOf". Not all directories use this attribute.
- See Also:
-
getGroupObjectClass
- Specified by:
getGroupObjectClassin interfaceLDAPPropertiesMapper
-
getGroupDescriptionAttribute
- Specified by:
getGroupDescriptionAttributein interfaceLDAPPropertiesMapper
-
getGroupMemberAttribute
- Specified by:
getGroupMemberAttributein interfaceLDAPPropertiesMapper- Returns:
- attribute for the LDAP group membership. This is a multivalued attribute on the group that defines the members of the group. Typically this is "member" or "uniqueMember". In spite of the name of the method, this attribute is also used for group-to-group membership (nested groups).
- See Also:
-
getRoleObjectClass
- Specified by:
getRoleObjectClassin interfaceLDAPPropertiesMapper
-
getRoleDescriptionAttribute
- Specified by:
getRoleDescriptionAttributein interfaceLDAPPropertiesMapper
-
getRoleMemberAttribute
- Specified by:
getRoleMemberAttributein interfaceLDAPPropertiesMapper
-
getUserObjectClass
- Specified by:
getUserObjectClassin interfaceLDAPPropertiesMapper
-
getUserFirstNameAttribute
- Specified by:
getUserFirstNameAttributein interfaceLDAPPropertiesMapper
-
getUserLastNameAttribute
- Specified by:
getUserLastNameAttributein interfaceLDAPPropertiesMapper
-
getUserDisplayNameAttribute
- Specified by:
getUserDisplayNameAttributein interfaceLDAPPropertiesMapper
-
getUserPasswordAttribute
- Specified by:
getUserPasswordAttributein interfaceLDAPPropertiesMapper
-
getUserEncryptionMethod
- Specified by:
getUserEncryptionMethodin interfaceLDAPPropertiesMapper
-
isPagedResultsControl
public boolean isPagedResultsControl()Checks if the configuration of the LDAP directory server uses paged results.- Specified by:
isPagedResultsControlin interfaceLDAPPropertiesMapper- Returns:
trueif and only if paged results is enabled for the LDAP server, otherwisefalse.
-
getPagedResultsSize
public int getPagedResultsSize()- Specified by:
getPagedResultsSizein interfaceLDAPPropertiesMapper
-
isNestedGroupsDisabled
public boolean isNestedGroupsDisabled()- Specified by:
isNestedGroupsDisabledin interfaceLDAPPropertiesMapper
-
isFilteringExpiredUsers
public boolean isFilteringExpiredUsers()Description copied from interface:LDAPPropertiesMapperSpecify whether expired users should be filtered out.If
true, any expired user will be locally removed, as if it had been removed in the remote directory.- Specified by:
isFilteringExpiredUsersin interfaceLDAPPropertiesMapper
-
isUsingUserMembershipAttribute
public boolean isUsingUserMembershipAttribute()- Specified by:
isUsingUserMembershipAttributein interfaceLDAPPropertiesMapper- Returns:
trueif the user group membership attribute ("memberOf" or equivalent) should be used to fetch the list of users that are members of a group, orfalseif the group member attribute ("member" or equivalent) should be used instead. Note that this only affects queries that fetch the list of users that are members of a group, but not the queries to fetch the list of groups of a user.- See Also:
-
isUsingUserMembershipAttributeForGroupMembership
public boolean isUsingUserMembershipAttributeForGroupMembership()- Specified by:
isUsingUserMembershipAttributeForGroupMembershipin interfaceLDAPPropertiesMapper- Returns:
trueif the user group membership attribute ("memberOf" or equivalent) should be used to fetch the list of groups a user belongs to, orfalseif the group member attribute ("member" or equivalent) should be used instead. This option is not available to all directory types. Note that this only affects queries that fetch the list of groups of a user, but not the queries to fetch the list of users that are members of a group.- See Also:
-
isReferral
public boolean isReferral()Description copied from interface:LDAPPropertiesMapperReturns true if referrals should be followed.- Specified by:
isReferralin interfaceLDAPPropertiesMapper- Returns:
- true if referrals should be followed
-
isRelaxedDnStandardisation
public boolean isRelaxedDnStandardisation()Description copied from interface:LDAPPropertiesMapperWhether we should use the more expensive but completely cross-directory compatible method for standardising DNs when mapping object DNs and and memberDNs (value =false); or if we can use a more efficient but relaxed form of standardisation (value =true).See
DNStandardiserfor more information.- Specified by:
isRelaxedDnStandardisationin interfaceLDAPPropertiesMapper- Returns:
falseif proper standardisation is required.
-
isRolesDisabled
public boolean isRolesDisabled()Description copied from interface:LDAPPropertiesMapperReturns true if roles should be disabled, as in some caching setups. The grammatical atrocity that is the name of this method pains me more than you can imagine.- Specified by:
isRolesDisabledin interfaceLDAPPropertiesMapper
-
isLocalGroupsEnabled
public boolean isLocalGroupsEnabled()Description copied from interface:LDAPPropertiesMapperReturnstrueif groups and group memberships are to be mutated only (created, updated, deleted) in local storage, otherwise the mutations will be propagated to the underlying LDAP implementation (full read-write LDAP groups).- Specified by:
isLocalGroupsEnabledin interfaceLDAPPropertiesMapper- Returns:
trueif using local storage for groups and memberships
-
isFastMembershipSyncEnabled
public boolean isFastMembershipSyncEnabled()Description copied from interface:LDAPPropertiesMapperReturnstrueif fast membership sync should be used for this directory. The value ofSystemProperties.USE_LEGACY_AD_MEMBERSHIP_SYNCtakes precedence over- Specified by:
isFastMembershipSyncEnabledin interfaceLDAPPropertiesMapper- Returns:
trueif fast membership sync is enabled for this directory.
-
isLocalUserStatusEnabled
public boolean isLocalUserStatusEnabled()Description copied from interface:LDAPPropertiesMapperReturnstrueif user status are updated independently in the Crowd cache and the remote directory. Otherwise, user status is synchronised between the cache and the remote directory.- Specified by:
isLocalUserStatusEnabledin interfaceLDAPPropertiesMapper- Returns:
trueif user status in the cache is updated independently of the remote directory.
-
getExternalIdAttribute
Description copied from interface:LDAPPropertiesMapperGet the LDAP unique ID attribute.- Specified by:
getExternalIdAttributein interfaceLDAPPropertiesMapper
-
getGroupExternalIdAttribute
- Specified by:
getGroupExternalIdAttributein interfaceLDAPPropertiesMapper
-
isPrimaryGroupSupported
public boolean isPrimaryGroupSupported()- Specified by:
isPrimaryGroupSupportedin interfaceLDAPPropertiesMapper- Returns:
trueif the support for primary groups is enabled for this directory.
-
getCacheSynchroniseInterval
public int getCacheSynchroniseInterval()Description copied from interface:LDAPPropertiesMapperReturns the interval in seconds when the local Cache should be synchronized with LDAP.- Specified by:
getCacheSynchroniseIntervalin interfaceLDAPPropertiesMapper- Returns:
- the interval in seconds when the local Cache should be synchronized with LDAP.
-
getLdapTypeConfigurations
Description copied from interface:LDAPPropertiesMapperGet a list of Ldap Type Configuration objects.- Specified by:
getLdapTypeConfigurationsin interfaceLDAPPropertiesMapper- Returns:
- List of LdapTypeConfigurations
-
getLdapPoolConfig
- Specified by:
getLdapPoolConfigin interfaceLDAPPropertiesMapper
-
getLdapPoolType
- Specified by:
getLdapPoolTypein interfaceLDAPPropertiesMapper
-