Package de.elo.ix.client.ldap
Class Domain
java.lang.Object
byps.BValueClass
de.elo.ix.client.ValueClass
de.elo.ix.client.ldap.Domain
- All Implemented Interfaces:
Serializable
This class defines how to connect to a domain controller, login a user and find her groups.
- Since:
- 11.00.000.007
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
LDAP attribute ID that specifies the mail address of a given user.static final String
AD attribute ID -manager- that specifies the superior of an ELO user.static final String
LDAP attribute ID that specifies the group list of a given user or group.static final String
LDAP attribute ID for sAMAccountName.static final String
LDAP attribute ID for userPrincipalName.protected String
LDAP attribute to be used as OS name forUserInfoC.PROP_NAME_OS
.protected String
Name of attribute that contains the user's mail address.protected String
Name of attribute that contains the user's groups.Read this LDAP attributes into ldapProperties of UserInfo.protected String
Attribute to determine the superior of an ELO user.protected int
Timeout limit when connecting to a LDAP server.static final String[]
Default attributes to read.static final String[][]
Default properties for LDAP connection via Java.protected String
Optional user name to connect to the LDAP servers.protected String
Optional encrypted user password to connect to the LDAP servers.protected String
Domain prefix.static final String
Filter expression used to find groups of a given user.static final String
Filter expression used to find a person by her/his sAMAccountName.static final String
Filter expression used to find a person by her mail address.static final String
Filter expression used to find a person by her/his userPrinicpalName.Search paths to find groups.Additional properties to build the login environment.protected int
Groups are collected recursively up to this depth.protected String
Domain name.protected String
Format string to build a unique ELO account name from LDAP attributes.protected String
Assign this user as parent for a new ELO user.Search paths to find persons.protected String
Users must be member of this LDAP group.protected String
Name of attribute that contains the user's groups.protected String
Search filter for mail address.protected String
Search filter for person.protected int
Search for groups can least up to this number of seconds.List of LDAP servers of the domain.Fields inherited from class byps.BValueClass
bypsClient, changedMembers, dbHelper, FLAG_SEALED, flags
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
getName()
int
int
hashCode()
void
setAttributeForUserPropOS
(String ldapAttributeForUserPropOS) void
setAttributeNameMail
(String attributeNameMail) void
setAttributeNameMemberOf
(String attributeNameMemberOf) void
setAttributesToRead
(Set<String> attributesToRead) void
setAttributeSuperior
(String attributeSuperior) void
setConnectionTimeoutSeconds
(int connectionTimeoutSeconds) void
setDefaultUserName
(String defaultUserName) void
setDefaultUserPasswordEncr
(String defaultUserPassword) void
setDomainPrefix
(String domainPrefix) void
setGroupSearchDNList
(List<String> groupSearchDnList) void
setInitialContextEnvironment
(Map<String, String> initialContextEnvironment) void
setMaxGroupNesting
(int maxGroupNesting) void
void
setNameFormatter
(String nameFormatter) void
setParentOfNewUser
(String parentOfNewUser) void
setPersonSearchDNList
(List<String> personSearchDnList) void
setRequiredGroup
(String requiredGroup) void
setSearchFilterForGroups
(String searchFilterForGroups) void
setSearchFilterForMail
(String searchFilterForMail) void
setSearchFilterForPerson
(String searchFilterForPerson) void
setSearchTimeLimitSeconds
(int searchTimeLimitSeconds) void
setServers
(List<Server> servers) toString()
Methods inherited from class byps.BValueClass
getBypsClient, getChangedMembers, getDbHelper, isChangedMember, isSealed, seal, seal, setBypsClient, setChangedMember, setChangedMembers, setDbHelper
-
Field Details
-
FILTER_PERSON
Filter expression used to find a person by her/his sAMAccountName.- Since:
- 11.00.000.011
- See Also:
-
FILTER_PERSON_USER_PRINCIPAL_NAME
Filter expression used to find a person by her/his userPrinicpalName.- Since:
- 11.00.000.060
- See Also:
-
FILTER_PERSON_MAIL
Filter expression used to find a person by her mail address.- Since:
- 11.00.000.011
- See Also:
-
FILTER_GROUPS
Filter expression used to find groups of a given user.- Since:
- 11.00.000.011
- See Also:
-
AD_ATTRIBUTE_MEMBER_OF
LDAP attribute ID that specifies the group list of a given user or group.- Since:
- 11.00.000.011
- See Also:
-
AD_ATTRIBUTE_MAIL
LDAP attribute ID that specifies the mail address of a given user.- Since:
- 11.00.000.011
- See Also:
-
AD_SAM_ACCOUNT_NAME
LDAP attribute ID for sAMAccountName.- Since:
- 11.00.000.060
- See Also:
-
AD_USER_PRINCIPAL_NAME
LDAP attribute ID for userPrincipalName.- Since:
- 11.00.000.060
- See Also:
-
DEFAULT_ENVIRONMENT
Default properties for LDAP connection via Java.- Since:
- 11.00.000.011
-
DEFAULT_ATTRIBUTES
Default attributes to read.- Since:
- 11.00.000.011
-
servers
List of LDAP servers of the domain. -
attributeForUserPropOS
LDAP attribute to be used as OS name forUserInfoC.PROP_NAME_OS
. This value is eitherAD_SAM_ACCOUNT_NAME
orAD_USER_PRINCIPAL_NAME
. If set asAD_USER_PRINCIPAL_NAME
, also setsearchFilterForPerson
toFILTER_PERSON_USER_PRINCIPAL_NAME
. Default is sAMAccountName.- Since:
- 11.00.000.060
-
name
Domain name. E.g. ELO.LOCAL -
domainPrefix
Domain prefix. The login name of the user is prefixed by this value to build the user propertyUserInfoC.PROP_NAME_OS
. When using this prefix, users should also use this prefix for login. This value must end with a separator char, e.g. backslash. E.g. ELO\\ -
defaultUserName
Optional user name to connect to the LDAP servers. This account must have the permission to list the group associations of all users. It does not need to be an ELO account too. -
defaultUserPasswordEncr
Optional encrypted user password to connect to the LDAP servers. This password can also be set in plain text. It is automatically encrypted when stored into a file or database. -
personSearchDNList
Search paths to find persons. Only users that are found in one of this DN can login to ELO. E.g. "cn=users,dc=elotest2,dc=local". -
groupSearchDNList
Search paths to find groups. If empty, only those groups are assigned to the user in ELO the user is a direct member of in LDAP. If not empty, the user's groups are recursively searched through group in group membership. A group found via this search is always added to the user regardless of whether its location fits to the given list. But groups that do not match any location are not investigated deeper. -
connectionTimeoutSeconds
protected int connectionTimeoutSecondsTimeout limit when connecting to a LDAP server. -
searchTimeLimitSeconds
protected int searchTimeLimitSecondsSearch for groups can least up to this number of seconds. -
maxGroupNesting
protected int maxGroupNestingGroups are collected recursively up to this depth. A value of 0 means no depth limit. This value is ignored, ifgroupSearchDNList
is empty. -
requiredGroup
Users must be member of this LDAP group. Optional, short LDAP group name (not a DN) the user must be a member of in order to login. The membership in this group is checked after the group list has been collected. Hence,groupSearchDNList
andmaxGroupNesting
have an effect on this check too. The comparison to this value is case-sensitive. -
nameFormatter
Format string to build a unique ELO account name from LDAP attributes. LDAP attributes have to be enclosed in $. Examples: 1. $cn$, $department$ ; 2. $sAMAccountName$ $department$ -
attributeNameMemberOf
Name of attribute that contains the user's groups. Defaults to "memberOf". -
attributeNameMail
Name of attribute that contains the user's mail address. Defaults to "mail". -
searchFilterForGroups
Name of attribute that contains the user's groups. Defaults to "(&(objectCategory=group)(member={0}))" -
searchFilterForMail
Search filter for mail address. Defaults to "(&(objectclass=person)(mail={0}))" -
searchFilterForPerson
Search filter for person. Defaults to "(&(objectclass=person)(sAMAccountName={0}))" -
initialContextEnvironment
Additional properties to build the login environment. Example: initialContextEnvironment.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5"); -
attributesToRead
Read this LDAP attributes into ldapProperties of UserInfo. The attributesgetAttributeNameMail()
andgetAttributeNameMemberOf()
are always read and need not to be included in this collection. -
attributeSuperior
Attribute to determine the superior of an ELO user. Set this attribute ID e.g. toAD_ATTRIBUTE_MANAGER
to assign the superior of a user on login. This value is empty by default, which means that ELO Administrator (user ID 0) is assigned as superior.- Since:
- 12.00.000.052
-
parentOfNewUser
Assign this user as parent for a new ELO user. ID, GUID or name of existing ELO user or group that is assigned as UserInfo#parent when a new ELO user is created. This value is empty by default, which means that ELO Administrator (user ID 0) is assigned as parent.- Since:
- 12.00.000.056
-
AD_ATTRIBUTE_MANAGER
AD attribute ID -manager- that specifies the superior of an ELO user.- Since:
- 12.00.000.052
- See Also:
-
-
Constructor Details
-
Domain
public Domain()
-
-
Method Details
-
getServers
-
getName
-
getDomainPrefix
-
getDefaultUserName
-
getDefaultUserPasswordEncr
-
getPersonSearchDNList
-
getGroupSearchDNList
-
setServers
-
setName
-
setDomainPrefix
-
setDefaultUserName
-
setDefaultUserPasswordEncr
-
toString
-
setPersonSearchDNList
-
setGroupSearchDNList
-
getConnectionTimeoutSeconds
public int getConnectionTimeoutSeconds() -
setConnectionTimeoutSeconds
public void setConnectionTimeoutSeconds(int connectionTimeoutSeconds) -
getSearchTimeLimitSeconds
public int getSearchTimeLimitSeconds() -
getMaxGroupNesting
public int getMaxGroupNesting() -
getRequiredGroup
-
setSearchTimeLimitSeconds
public void setSearchTimeLimitSeconds(int searchTimeLimitSeconds) -
setMaxGroupNesting
public void setMaxGroupNesting(int maxGroupNesting) -
setRequiredGroup
-
getNameFormatter
-
setNameFormatter
-
getInitialContextEnvironment
-
setInitialContextEnvironment
-
getAttributeNameMemberOf
-
setAttributeNameMemberOf
-
getSearchFilterForGroups
-
getSearchFilterForMail
-
getSearchFilterForPerson
-
setSearchFilterForGroups
-
setSearchFilterForMail
-
setSearchFilterForPerson
-
getAttributeNameMail
-
setAttributeNameMail
-
getAttributesToRead
-
setAttributesToRead
-
getAttributeForUserPropOS
-
setAttributeForUserPropOS
-
getAttributeSuperior
-
setAttributeSuperior
-
getParentOfNewUser
-
setParentOfNewUser
-
hashCode
public int hashCode() -
equals
-