public class LDAPPropertiesMapperImpl extends Object implements LDAPPropertiesMapper
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTION_BINARY_ATTRIBUTES
LDAP binary attributes.
|
static String |
CONNECTION_FACTORY
LDAP connection factory.
|
static String |
CONNECTION_FACTORY_SSL_IMPL
LDAP secure connection factory.
|
static String |
CONNECTION_INITIAL_CONTEXT_FACTORY
LDAP initial context factory.
|
static String |
CONNECTION_SECURITY_AUTHENTICATION
LDAP connection method.
|
static String |
CONNECTION_SSL_SECURITY_PROTOCOL
LDAP secure connection method.
|
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_INITSIZE, LDAP_POOL_MAXSIZE, LDAP_POOL_PREFSIZE, LDAP_POOL_TIMEOUT, 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 and Description |
---|
LDAPPropertiesMapperImpl(LDAPPropertiesHelper ldapPropertiesHelper) |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String key) |
Map<String,String> |
getAttributes() |
String |
getBaseDN() |
protected boolean |
getBooleanKey(String key) |
protected boolean |
getBooleanKey(String key,
boolean defaultValue) |
int |
getCacheSynchroniseInterval()
Returns the interval in seconds when the local Cache should be synchronized with LDAP.
|
Map<String,Properties> |
getConfigurationDetails()
Returns a map of the LDAP names as the keys and the
properties associated
with that LDAP connector. |
protected String |
getConnectionTimeout() |
String |
getConnectionURL() |
Map<String,Object> |
getEnvironment() |
String |
getExternalIdAttribute()
Get the LDAP unique ID attribute.
|
String |
getGroupBaseDN() |
String |
getGroupDescriptionAttribute() |
String |
getGroupExternalIdAttribute() |
String |
getGroupFilter() |
String |
getGroupMemberAttribute() |
String |
getGroupNameAttribute() |
String |
getGroupObjectClass() |
Map<String,String> |
getImplementations()
Returns a map of the LDAP names as the keys and the implementation class as Strings.
|
List<LdapTypeConfig> |
getLdapTypeConfigurations()
Get a list of Ldap Type Configuration objects.
|
String |
getObjectClassAttribute() |
int |
getPagedResultsSize() |
String |
getPassword() |
protected String |
getPoolInitSize() |
protected String |
getPoolMaxSize() |
protected String |
getPoolPrefSize() |
protected String |
getPoolTimeout() |
String |
getPrincipalBaseDN() |
protected String |
getReadTimeout() |
String |
getRoleBaseDN() |
String |
getRoleDescriptionAttribute() |
String |
getRoleFilter() |
String |
getRoleMemberAttribute() |
String |
getRoleNameAttribute() |
String |
getRoleObjectClass() |
int |
getSearchTimeLimit() |
LdapSecureMode |
getSecureMode() |
String |
getUserDisplayNameAttribute() |
String |
getUserEmailAttribute() |
String |
getUserEncryptionMethod() |
String |
getUserFilter() |
String |
getUserFirstNameAttribute() |
String |
getUserGroupMembershipsAttribute() |
String |
getUserLastNameAttribute() |
String |
getUsername() |
String |
getUserNameAttribute() |
String |
getUserNameRdnAttribute() |
String |
getUserObjectClass() |
String |
getUserPasswordAttribute() |
boolean |
isFilteringExpiredUsers()
Specify whether expired users should be filtered out.
|
protected boolean |
isLdaps()
If the connection must be secure.
|
boolean |
isLocalGroupsEnabled()
Returns
true if 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). |
boolean |
isLocalUserStatusEnabled()
Returns
true if user status are updated independently in the Crowd cache and the remote directory. |
boolean |
isNestedGroupsDisabled() |
boolean |
isPagedResultsControl()
Checks if the configuration of the LDAP directory server uses paged results.
|
boolean |
isPrimaryGroupSupported() |
boolean |
isReferral()
Returns true if referrals should be followed.
|
boolean |
isRelaxedDnStandardisation()
Whether 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 ). |
boolean |
isRolesDisabled()
Returns true if roles should be disabled, as in some caching setups.
|
protected boolean |
isUsingConnectionPooling() |
boolean |
isUsingUserMembershipAttribute() |
boolean |
isUsingUserMembershipAttributeForGroupMembership() |
void |
setAttributes(Map<String,String> attributes) |
public static final String CONNECTION_INITIAL_CONTEXT_FACTORY
public static final String CONNECTION_SECURITY_AUTHENTICATION
public static final String CONNECTION_SSL_SECURITY_PROTOCOL
public static final String CONNECTION_FACTORY
public static final String CONNECTION_FACTORY_SSL_IMPL
public static final String CONNECTION_BINARY_ATTRIBUTES
public LDAPPropertiesMapperImpl(LDAPPropertiesHelper ldapPropertiesHelper)
public Map<String,String> getImplementations()
getImplementations
in interface LDAPPropertiesMapper
public Map<String,Properties> getConfigurationDetails()
properties
associated
with that LDAP connector.getConfigurationDetails
in interface LDAPPropertiesMapper
public Map<String,Object> getEnvironment()
getEnvironment
in interface LDAPPropertiesMapper
protected boolean isLdaps()
true
if and only if the connection must be secure, otherwise false
.protected boolean isUsingConnectionPooling()
protected boolean getBooleanKey(String key)
protected boolean getBooleanKey(String key, boolean defaultValue)
protected String getPoolInitSize()
protected String getPoolPrefSize()
protected String getPoolMaxSize()
protected String getPoolTimeout()
protected String getConnectionTimeout()
protected String getReadTimeout()
public int getSearchTimeLimit()
getSearchTimeLimit
in interface LDAPPropertiesMapper
public Map<String,String> getAttributes()
getAttributes
in interface LDAPPropertiesMapper
public void setAttributes(Map<String,String> attributes)
setAttributes
in interface LDAPPropertiesMapper
public String getAttribute(String key)
getAttribute
in interface LDAPPropertiesMapper
public LdapSecureMode getSecureMode()
getSecureMode
in interface LDAPPropertiesMapper
public String getBaseDN() throws InvalidNameException
InvalidNameException
public String getGroupBaseDN() throws InvalidNameException
InvalidNameException
public String getGroupFilter()
getGroupFilter
in interface LDAPPropertiesMapper
public String getConnectionURL()
getConnectionURL
in interface LDAPPropertiesMapper
public String getUsername()
getUsername
in interface LDAPPropertiesMapper
public String getPassword()
getPassword
in interface LDAPPropertiesMapper
public String getGroupNameAttribute()
getGroupNameAttribute
in interface LDAPPropertiesMapper
public String getObjectClassAttribute()
getObjectClassAttribute
in interface LDAPPropertiesMapper
public String getRoleFilter()
getRoleFilter
in interface LDAPPropertiesMapper
public String getRoleBaseDN() throws InvalidNameException
InvalidNameException
public String getRoleNameAttribute()
getRoleNameAttribute
in interface LDAPPropertiesMapper
public String getUserFilter()
getUserFilter
in interface LDAPPropertiesMapper
LDAPPropertiesMapper.LDAP_FILTER_EXPIRED_USERS
directory attributepublic String getPrincipalBaseDN()
public String getUserNameAttribute()
getUserNameAttribute
in interface LDAPPropertiesMapper
public String getUserNameRdnAttribute()
getUserNameRdnAttribute
in interface LDAPPropertiesMapper
public String getUserEmailAttribute()
getUserEmailAttribute
in interface LDAPPropertiesMapper
public String getUserGroupMembershipsAttribute()
getUserGroupMembershipsAttribute
in interface LDAPPropertiesMapper
LDAPPropertiesMapper.getGroupMemberAttribute()
public String getGroupObjectClass()
getGroupObjectClass
in interface LDAPPropertiesMapper
public String getGroupDescriptionAttribute()
getGroupDescriptionAttribute
in interface LDAPPropertiesMapper
public String getGroupMemberAttribute()
getGroupMemberAttribute
in interface LDAPPropertiesMapper
LDAPPropertiesMapper.getUserGroupMembershipsAttribute()
public String getRoleObjectClass()
getRoleObjectClass
in interface LDAPPropertiesMapper
public String getRoleDescriptionAttribute()
getRoleDescriptionAttribute
in interface LDAPPropertiesMapper
public String getRoleMemberAttribute()
getRoleMemberAttribute
in interface LDAPPropertiesMapper
public String getUserObjectClass()
getUserObjectClass
in interface LDAPPropertiesMapper
public String getUserFirstNameAttribute()
getUserFirstNameAttribute
in interface LDAPPropertiesMapper
public String getUserLastNameAttribute()
getUserLastNameAttribute
in interface LDAPPropertiesMapper
public String getUserDisplayNameAttribute()
getUserDisplayNameAttribute
in interface LDAPPropertiesMapper
public String getUserPasswordAttribute()
getUserPasswordAttribute
in interface LDAPPropertiesMapper
public String getUserEncryptionMethod()
getUserEncryptionMethod
in interface LDAPPropertiesMapper
public boolean isPagedResultsControl()
isPagedResultsControl
in interface LDAPPropertiesMapper
true
if and only if paged results is enabled for the LDAP server, otherwise false
.public int getPagedResultsSize()
getPagedResultsSize
in interface LDAPPropertiesMapper
public boolean isNestedGroupsDisabled()
isNestedGroupsDisabled
in interface LDAPPropertiesMapper
public boolean isFilteringExpiredUsers()
LDAPPropertiesMapper
If true
, any expired user will be locally removed, as if it had been removed in the remote
directory.
isFilteringExpiredUsers
in interface LDAPPropertiesMapper
public boolean isUsingUserMembershipAttribute()
isUsingUserMembershipAttribute
in interface LDAPPropertiesMapper
true
if the user group membership attribute ("memberOf" or equivalent) should be used
to fetch the list of users that are members of a group, or false
if 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.LDAPPropertiesMapper.isUsingUserMembershipAttributeForGroupMembership()
,
LDAPPropertiesMapper.getUserGroupMembershipsAttribute()
public boolean isUsingUserMembershipAttributeForGroupMembership()
isUsingUserMembershipAttributeForGroupMembership
in interface LDAPPropertiesMapper
true
if the user group membership attribute ("memberOf" or equivalent) should be used
to fetch the list of groups a user belongs to, or false
if 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.LDAPPropertiesMapper.isUsingUserMembershipAttribute()
,
LDAPPropertiesMapper.getUserGroupMembershipsAttribute()
public boolean isReferral()
LDAPPropertiesMapper
isReferral
in interface LDAPPropertiesMapper
public boolean isRelaxedDnStandardisation()
LDAPPropertiesMapper
false
); or if we can use a more
efficient but relaxed form of standardisation (value = true
).
See DNStandardiser
for more information.isRelaxedDnStandardisation
in interface LDAPPropertiesMapper
false
if proper standardisation is required.public boolean isRolesDisabled()
LDAPPropertiesMapper
isRolesDisabled
in interface LDAPPropertiesMapper
public boolean isLocalGroupsEnabled()
LDAPPropertiesMapper
true
if 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).isLocalGroupsEnabled
in interface LDAPPropertiesMapper
true
if using local storage for groups and membershipspublic boolean isLocalUserStatusEnabled()
LDAPPropertiesMapper
true
if 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.isLocalUserStatusEnabled
in interface LDAPPropertiesMapper
true
if user status in the cache is updated independently of the remote directory.public String getExternalIdAttribute()
LDAPPropertiesMapper
getExternalIdAttribute
in interface LDAPPropertiesMapper
public String getGroupExternalIdAttribute()
getGroupExternalIdAttribute
in interface LDAPPropertiesMapper
public boolean isPrimaryGroupSupported()
isPrimaryGroupSupported
in interface LDAPPropertiesMapper
true
if the support for primary groups is enabled for this directory.public int getCacheSynchroniseInterval()
LDAPPropertiesMapper
getCacheSynchroniseInterval
in interface LDAPPropertiesMapper
public List<LdapTypeConfig> getLdapTypeConfigurations()
LDAPPropertiesMapper
getLdapTypeConfigurations
in interface LDAPPropertiesMapper
Copyright © 2020 Atlassian. All rights reserved.