Package com.jalios.ldap
Class LDAPConfiguration
java.lang.Object
com.jalios.ldap.LDAPConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected Stringprotected intprotected intprotected Stringprotected booleanprotected booleanprotected booleanprotected intprotected Stringprotected Stringprotected int -
Constructor Summary
ConstructorsConstructorDescriptionLDAPConfiguration(JProperties props) Build a new LDAPConfiguration from properties "ldap.*" available in the specified JProperties.LDAPConfiguration(JProperties props, String serverConf) Build a new LDAPConfiguration from properties "ldap.*" available in the specified JProperties, trying to retrieve custom properties from the specified configuration prior to using default properties. -
Method Summary
Modifier and TypeMethodDescriptiongetLogin()intgetPort()intbooleanCheck if synchronization of user is enabled for this configuration.booleanCheck if synchronization of user (and their groups if enabled) is to be performed during authentication.booleanCheck if synchronization of groups is enabled for this configuration.intintbooleanbooleanisSSL()booleanprotected voidreadProperties(JProperties prop, String serverConf) voidsetGroupFilter(String groupFilter) voidsetGroupMappingUUID(String groupMappingUUID) voidsetGroupObjectClass(String groupObjectClass) voidvoidsetPassword(String password) voidsetUserFilter(String userFilter) voidsetUserObjectClass(String userObjectClass)
-
Field Details
-
LDAP_ENABLED
- See Also:
-
LDAP_SYNCHRONIZE
- See Also:
-
LDAP_SYNCHRONIZE_AUTH
- See Also:
-
LDAP_SYNCHRONIZE_GROUPS
- See Also:
-
LDAP_SERVER_SSL
- See Also:
-
LDAP_SERVER_HOSTNAME
- See Also:
-
LDAP_SERVER_LOGIN
- See Also:
-
LDAP_SERVER_PORT
- See Also:
-
LDAP_SERVER_SIZE_LIMIT
- See Also:
-
LDAP_SERVER_TIME_LIMIT
- See Also:
-
LDAP_SERVER_VERSION
- See Also:
-
LDAP_SERVER_PASSWORD
- See Also:
-
LDAP_SERVER_CLIENT_CERTIFICATE_ENABLED
- See Also:
-
LDAP_SERVER_SUFFIX
- See Also:
-
LDAP_SERVER_USER_FILTER
- See Also:
-
LDAP_SERVER_USER_OBJECTCLASS
- See Also:
-
LDAP_SERVER_GROUP_SUFFIX
- See Also:
-
LDAP_SERVER_GROUP_FILTER
- See Also:
-
LDAP_SERVER_GROUP_OBJECTCLASS
- See Also:
-
LDAP_SERVER_GROUP_MAPPING_UUID
- See Also:
-
enabled
protected boolean enabled -
synchronize
protected boolean synchronize -
synchronizeAuth
protected boolean synchronizeAuth -
synchronizeGroups
protected boolean synchronizeGroups -
hostname
-
login
-
password
-
port
protected int port -
sizeLimit
protected int sizeLimit -
timeLimit
protected int timeLimit -
version
protected int version -
isSSL
protected boolean isSSL -
clientCertificateEnabled
protected boolean clientCertificateEnabled -
suffix
-
userFilter
-
userObjectClass
-
groupSuffix
-
groupFilter
-
groupObjectClass
-
isUsingPosixGroup
protected boolean isUsingPosixGroup -
groupMappingUUID
-
-
Constructor Details
-
LDAPConfiguration
Build a new LDAPConfiguration from properties "ldap.*" available in the specified JProperties.- Parameters:
props- the properties from which LDAPConfiguration is being built
-
LDAPConfiguration
Build a new LDAPConfiguration from properties "ldap.*" available in the specified JProperties, trying to retrieve custom properties from the specified configuration prior to using default properties.For example, given the following properties :
ldap.server.hostname: ldap.example.com ldap.server.login: foo ldap.server.password: bar ldap.server.conf2.hostname: other-domain-ldap.example.com
Invoking this constructorLDAPConfiguration conf = new LDAPConfiguration(channel.getProperties("ldap"), "conf2"); assertEquals("other-domain-ldap.example.com", conf.getHostname()); assertEquals("foo", conf.getLogin()); assertEquals("bar", conf.getPassword());- Parameters:
props- the properties from which LDAPConfiguration is being builtserverConf- an optional subconfiguration to use after "ldap.server." default prefix, to retrieve Server configuration options
-
-
Method Details
-
readProperties
-
isEnabled
public boolean isEnabled()- Returns:
- true if LDAP is enabled for this configuration.
-
getSynchronize
public boolean getSynchronize()Check if synchronization of user is enabled for this configuration.- Returns:
- true if the user being retrieve from ldap should be synchronized in JCMS.
-
getSynchronizeDuringAuthentication
public boolean getSynchronizeDuringAuthentication()Check if synchronization of user (and their groups if enabled) is to be performed during authentication.- Returns:
- true if the synchronisation should occurs during authentication, false otherwise
- Since:
- jcms-10.0.3 / JCMS-6382
-
getSynchronizeGroups
public boolean getSynchronizeGroups()Check if synchronization of groups is enabled for this configuration.- Returns:
- true if the LDAP groups of the user being retrieve from LDAP should be synchronized in JCMS.
-
isSSL
public boolean isSSL()- Returns:
- true if SSL in enabled for this configuration
-
getHostname
- Returns:
- the hostname of the LDAP Server for this configuration
-
getLogin
- Returns:
- the DN that should be used to connect/bind/authenticated to the LDAP server.
-
getPassword
- Returns:
- the password that should be used to connect/bind/authenticated to the LDAP server.
-
setPassword
-
setLogin
-
getPort
public int getPort()- Returns:
- the port number that should be used to connect to the LDAP server.
-
getSizeLimit
public int getSizeLimit()- Returns:
- the size limit value that should be used during connection to the LDAP server, it defines the maximum number of result that can be retrieved during a search.
-
getTimeLimit
public int getTimeLimit()- Returns:
- the time limit value that should be used during connection to the LDAP server, it defines the maximum number of milliseconds to wait for an operation to complete.
-
getVersion
public int getVersion()- Returns:
- the protocol version to use to connect to the LDAP server.
-
getSuffix
- Returns:
- the base DN that should be used when searching users in the LDAP.
-
getUserFilter
- Returns:
- a String that should be processed by the method
MessageFormat.format(java.lang.String, java.lang.Object[])and used to search for users in the LDAP.
-
setUserFilter
-
getUserObjectClass
- Returns:
- the objectClass value which defines that a LDAPEntry is a user.
- Since:
- jcms-5.7
-
setUserObjectClass
-
getGroupSuffix
- Returns:
- the base DN that should be used when searching groups in the LDAP.
- Since:
- jcms-5.7
-
getGroupFilter
- Returns:
- a String that should be processed by the method
MessageFormat.format(java.lang.String, java.lang.Object[])and used to search for groups in the LDAP. - Since:
- jcms-5.7
-
setGroupFilter
-
getGroupObjectClass
- Returns:
- the objectClass value which defines that a LDAPEntry is a group.
- Since:
- jcms-5.7
-
setGroupObjectClass
-
getGroupMappingUUID
- Returns:
- the name of the LDAP attribute used as UUID for group mapping.
- Since:
- jcms-10.0.3 - JCMS-7454
-
setGroupMappingUUID
-
isUsingPosixGroup
public boolean isUsingPosixGroup()- Returns:
- true if the settings of this LDAPConfiguration define that the group being used is a posixGroup (groupObjectClass is "posixGroup" and groupFilter contains "memberUid").
- Since:
- jcms-5.7
-