Class AbstractDirectoryConfiguration
- java.lang.Object
-
- com.identity4j.connector.AbstractConnectorConfiguration
-
- com.identity4j.connector.jndi.directory.AbstractDirectoryConfiguration
-
- All Implemented Interfaces:
com.identity4j.connector.ConnectorConfigurationParameters
- Direct Known Subclasses:
DirectoryConfiguration
public abstract class AbstractDirectoryConfiguration extends com.identity4j.connector.AbstractConnectorConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractDirectoryConfiguration.RoleMode
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMON_NAMEstatic StringDIRECTORY_BACKUP_HOSTNAMESConfiguration property key for Hostnamestatic StringDIRECTORY_BASE_DNConfiguration property key for Base DNstatic StringDIRECTORY_CONNECT_TIMEOUTConnect timeoutstatic StringDIRECTORY_DOMAINConfiguration property key for domainstatic StringDIRECTORY_EXCLUDE_ROLESstatic StringDIRECTORY_EXCLUDE_ROLES_DNstatic StringDIRECTORY_EXCLUDESstatic StringDIRECTORY_FOLLOW_REFERRALSFollow referrals?static StringDIRECTORY_HOSTNAMEConfiguration property key for Hostnamestatic StringDIRECTORY_INCLUDE_ROLESstatic StringDIRECTORY_INCLUDE_ROLES_DNstatic StringDIRECTORY_INCLUDESstatic StringDIRECTORY_MAX_PAGE_SIZEMax page sizestatic StringDIRECTORY_READ_TIMEOUTRead timeoutstatic StringDIRECTORY_ROLE_MODEstatic StringDIRECTORY_SECURITY_PROTOCOLConfiguration property key for security protocolstatic StringDIRECTORY_SERVICE_ACCOUNT_PASSWORDConfiguration property key for Service Account Passwordstatic StringDIRECTORY_SERVICE_ACCOUNT_USERNAMEConfiguration property key for Service Account Usernamestatic StringDIRECTORY_USER_OUConfiguration property key for OU for user creationstatic StringLDAP_PROTOCOLstatic StringLDAPS_PROTOCOLstatic StringPLAINConstant for value ofDIRECTORY_SECURITY_PROTOCOLwhen insecure connection should be usedstatic charPORT_SEPARATORstatic StringSSLConstant for value ofDIRECTORY_SECURITY_PROTOCOLwhen SSL should be used
-
Constructor Summary
Constructors Constructor Description AbstractDirectoryConfiguration(com.identity4j.util.MultiMap configurationParameters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildProviderUrl(boolean ssl, String... controllerHosts)protected String[]buildProviderUrls(String... controllerHosts)NamegetBaseDn()The base dn of the directory to connect to.Map<String,String>getConnectorConfigurationParameters()String[]getControllerHostnames()The host name or IP address of the directory to connect to, without the port number if one is set.String[]getControllerHosts()The host name or IP address of the directory to connect to.protected static StringgetControllerHostWithoutPort(String value)StringgetDistinguishedNameAttribute()The attribute name which contains the distinguished name.Set<String>getExcludedRoles()Set<String>getExcludedRolesDN()Collection<Name>getExcludes()Get a list of distinguished names to exclude from the search.StringgetHostnameHint()List<String>getIdentityCreationObjectClasses()The class names required for an identity to be created.StringgetIdentityGuidAttribute()The attribute name which is used to match against the identity guid.StringgetIdentityNameAttribute()The attribute name which is used to match against the identity username.StringgetIdentityObjectClass()The class name required for an object to be considered an identity.StringgetIdentityPasswordAttribute()The attribute name which is used to set the identity password.StringgetIdentityPasswordEncoding()The type of password encoding used for this directory.StringgetIdentityRoleGuidAttribute()The attribute name which is used to provide the identities primary role GUID.StringgetIdentityRoleNameAttribute()The attribute name which is used to provide the identities primary role name.Set<String>getIncludedRoles()Set<String>getIncludedRolesDN()Collection<Name>getIncludes()Get a list of distinguished names to exclude from the search.protected Map<String,String>getInitialConfigurationParameters()StringgetInitialContextFactory()The initial context factory to use, the defaults iscom.sun.jndi.ldap.LdapCtxFactory.intgetMaxPageSize()The maximum size of the page to return when using paged queries.StringgetOU()String[]getProviderURLList()intgetReadTimeout()StringgetRoleGuidAttribute()The attribute name which is used to match against the role name guid.AbstractDirectoryConfiguration.RoleModegetRoleMode()StringgetRoleNameAttribute()The attribute name which is used to match against the role name.StringgetRoleObjectClass()The class name required for an object to be considered a role.StringgetSecurityProtocol()The security protocol to use, this defaults to SSL.StringgetServiceAccountDn()The connector performs all operations on the directory using this account.StringgetServiceAccountPassword()The password used for the service account @seegetServiceAccountDn()StringgetServiceAuthenticationType()The service authentication mechanism to use, the default is simple.intgetTimeout()The value to use forcom.sun.jndi.ldap.connect.timeout, the default is 30.StringgetUsernameHint()StringgetVersion()The value to use forjava.naming.ldap.version, the default is 3.booleanisEnableRoles()Get if roles should be enabled at all.booleanisFilteredByRole()booleanisFilteredByRoleDistinguishedName()booleanisFilteredByRolePrincipalName()booleanisFollowReferrals()Should referrals be followed.booleanrequiresServiceAuthentication()StringtoString()-
Methods inherited from class com.identity4j.connector.AbstractConnectorConfiguration
getAdditionalIdentityAttributes, getAdditionalResources, getConfigurationParameters, getIdentityAttributesToRetrieve, getProvisionAttributeForPrincipalName, setIdentityAttributesToRetrieve
-
-
-
-
Field Detail
-
DIRECTORY_HOSTNAME
public static final String DIRECTORY_HOSTNAME
Configuration property key for Hostname- See Also:
- Constant Field Values
-
DIRECTORY_BACKUP_HOSTNAMES
public static final String DIRECTORY_BACKUP_HOSTNAMES
Configuration property key for Hostname- See Also:
- Constant Field Values
-
DIRECTORY_BASE_DN
public static final String DIRECTORY_BASE_DN
Configuration property key for Base DN- See Also:
- Constant Field Values
-
DIRECTORY_USER_OU
public static final String DIRECTORY_USER_OU
Configuration property key for OU for user creation- See Also:
- Constant Field Values
-
DIRECTORY_SERVICE_ACCOUNT_USERNAME
public static final String DIRECTORY_SERVICE_ACCOUNT_USERNAME
Configuration property key for Service Account Username- See Also:
- Constant Field Values
-
DIRECTORY_SERVICE_ACCOUNT_PASSWORD
public static final String DIRECTORY_SERVICE_ACCOUNT_PASSWORD
Configuration property key for Service Account Password- See Also:
- Constant Field Values
-
DIRECTORY_DOMAIN
public static final String DIRECTORY_DOMAIN
Configuration property key for domain- See Also:
- Constant Field Values
-
DIRECTORY_SECURITY_PROTOCOL
public static final String DIRECTORY_SECURITY_PROTOCOL
Configuration property key for security protocol- See Also:
- Constant Field Values
-
DIRECTORY_EXCLUDES
public static final String DIRECTORY_EXCLUDES
- See Also:
- Constant Field Values
-
DIRECTORY_INCLUDES
public static final String DIRECTORY_INCLUDES
- See Also:
- Constant Field Values
-
DIRECTORY_ROLE_MODE
public static final String DIRECTORY_ROLE_MODE
- See Also:
- Constant Field Values
-
DIRECTORY_INCLUDE_ROLES
public static final String DIRECTORY_INCLUDE_ROLES
- See Also:
- Constant Field Values
-
DIRECTORY_EXCLUDE_ROLES
public static final String DIRECTORY_EXCLUDE_ROLES
- See Also:
- Constant Field Values
-
DIRECTORY_INCLUDE_ROLES_DN
public static final String DIRECTORY_INCLUDE_ROLES_DN
- See Also:
- Constant Field Values
-
DIRECTORY_EXCLUDE_ROLES_DN
public static final String DIRECTORY_EXCLUDE_ROLES_DN
- See Also:
- Constant Field Values
-
DIRECTORY_FOLLOW_REFERRALS
public static final String DIRECTORY_FOLLOW_REFERRALS
Follow referrals?- See Also:
- Constant Field Values
-
DIRECTORY_CONNECT_TIMEOUT
public static final String DIRECTORY_CONNECT_TIMEOUT
Connect timeout- See Also:
- Constant Field Values
-
DIRECTORY_READ_TIMEOUT
public static final String DIRECTORY_READ_TIMEOUT
Read timeout- See Also:
- Constant Field Values
-
DIRECTORY_MAX_PAGE_SIZE
public static final String DIRECTORY_MAX_PAGE_SIZE
Max page size- See Also:
- Constant Field Values
-
PORT_SEPARATOR
public static final char PORT_SEPARATOR
- See Also:
- Constant Field Values
-
COMMON_NAME
public static final String COMMON_NAME
- See Also:
- Constant Field Values
-
SSL
public static final String SSL
Constant for value ofDIRECTORY_SECURITY_PROTOCOLwhen SSL should be used- See Also:
- Constant Field Values
-
PLAIN
public static final String PLAIN
Constant for value ofDIRECTORY_SECURITY_PROTOCOLwhen insecure connection should be used- See Also:
- Constant Field Values
-
LDAP_PROTOCOL
public static final String LDAP_PROTOCOL
- See Also:
- Constant Field Values
-
LDAPS_PROTOCOL
public static final String LDAPS_PROTOCOL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getControllerHosts
public final String[] getControllerHosts()
The host name or IP address of the directory to connect to. If an IP address is used this should be in dotted decimal notation. Otherwise the fully qualified hostname should be specified in the standard dns format
Examples:
192.168.1.200:443,192.168.1.200orhost.directory.com- Returns:
- controller hosts
-
getControllerHostnames
public final String[] getControllerHostnames()
The host name or IP address of the directory to connect to, without the port number if one is set. If an IP address is used this should be in dotted decimal notation. Otherwise the fully qualified hostname should be specified in the standard dns format
Examples:
192.168.1.200orhost.directory.com- Returns:
- controller hosts
-
getIncludes
public Collection<Name> getIncludes()
Get a list of distinguished names to exclude from the search. These are relative to the Base DN. If the list is empty, all paths should be included unless explicit excludes have been set.- Returns:
- paths to exclude
- Throws:
InvalidNameException
-
getExcludes
public Collection<Name> getExcludes()
Get a list of distinguished names to exclude from the search. These are relative to the Base DN. If the list is empty, all paths should be included unless explicit includes have been set.- Returns:
- paths to exclude
- Throws:
InvalidNameException
-
isEnableRoles
public boolean isEnableRoles()
Get if roles should be enabled at all.- Returns:
- reconcile roles
-
getRoleMode
public AbstractDirectoryConfiguration.RoleMode getRoleMode()
-
getControllerHostWithoutPort
protected static final String getControllerHostWithoutPort(String value)
-
getServiceAuthenticationType
public final String getServiceAuthenticationType()
The service authentication mechanism to use, the default is simple. This value is used when for thejavax.naming.Context.SECURITY_AUTHENTICATIONparameter when performing service activities e.g. listing and managing principals.- Returns:
- service authentication type
-
requiresServiceAuthentication
public final boolean requiresServiceAuthentication()
-
getSecurityProtocol
public final String getSecurityProtocol()
The security protocol to use, this defaults to SSL. This value is used for thejavax.naming.Context.SECURITY_PROTOCOLparameter.- Returns:
- security protocol
-
isFollowReferrals
public final boolean isFollowReferrals()
Should referrals be followed. The Manage Referral control (RFC 3296) tells the LDAP server to return referral entries as ordinary entries (instead of returning "referral" error responses or continuation references). If you are using the LDAP v3 and have set Context.REFERRAL to "ignore", then the LDAP service provider will automatically send this control along with the request. If you are using the LDAP v2, then the control will not be sent because it is not applicable in that protocol. When you set Context.REFERRAL to any other value, the control will not be sent regardless of the protocol version.- Returns:
- follow referrals
-
getInitialContextFactory
public final String getInitialContextFactory()
The initial context factory to use, the defaults iscom.sun.jndi.ldap.LdapCtxFactory. This value is used for thejavax.naming.Context.INITIAL_CONTEXT_FACTORYparameter.- Returns:
- initial context factory
-
getTimeout
public final int getTimeout()
The value to use forcom.sun.jndi.ldap.connect.timeout, the default is 30.- Returns:
- initial context factory
-
getMaxPageSize
public int getMaxPageSize()
The maximum size of the page to return when using paged queries.- Returns:
- maximum page size
-
getVersion
public final String getVersion()
The value to use forjava.naming.ldap.version, the default is 3.- Returns:
- initial context factory
-
getBaseDn
public final Name getBaseDn()
The base dn of the directory to connect to.- Returns:
- base dn
-
getServiceAccountDn
public final String getServiceAccountDn()
The connector performs all operations on the directory using this account. The distinguished name of this account should be supplied in LDAP format, that is, with the Common Name (cn) of the account first followed by the container in which this account resides, then that container's container etc. The elements of the distinguished name should be separated using commas.
For example:
This value is used for thecn=admin,ou=employee,o=rootjavax.naming.Context.SECURITY_PRINCIPAL- Returns:
- service account dn
-
getServiceAccountPassword
public final String getServiceAccountPassword()
The password used for the service account @see
getServiceAccountDn()- Returns:
- service account password
-
getIdentityObjectClass
public final String getIdentityObjectClass()
The class name required for an object to be considered an identity.- Returns:
- identity object class
-
getIdentityCreationObjectClasses
public final List<String> getIdentityCreationObjectClasses()
The class names required for an identity to be created.- Returns:
- identity object class
-
getIdentityNameAttribute
public final String getIdentityNameAttribute()
The attribute name which is used to match against the identity username.- Returns:
- identity name attribute
-
getIdentityGuidAttribute
public final String getIdentityGuidAttribute()
The attribute name which is used to match against the identity guid.- Returns:
- identity guid attribute
-
getIdentityRoleGuidAttribute
public final String getIdentityRoleGuidAttribute()
The attribute name which is used to provide the identities primary role GUID.- Returns:
- identity role guid attribute
-
getIdentityRoleNameAttribute
public final String getIdentityRoleNameAttribute()
The attribute name which is used to provide the identities primary role name.- Returns:
- identity role name attribute
-
getIdentityPasswordAttribute
public final String getIdentityPasswordAttribute()
The attribute name which is used to set the identity password.- Returns:
- password attribute
-
getDistinguishedNameAttribute
public final String getDistinguishedNameAttribute()
The attribute name which contains the distinguished name.- Returns:
- distinguished name attribute
-
getIdentityPasswordEncoding
public final String getIdentityPasswordEncoding()
The type of password encoding used for this directory.- Returns:
- password encoding type
-
getRoleObjectClass
public final String getRoleObjectClass()
The class name required for an object to be considered a role.- Returns:
- role object class
-
getRoleNameAttribute
public final String getRoleNameAttribute()
The attribute name which is used to match against the role name.- Returns:
- role name attribute
-
getRoleGuidAttribute
public final String getRoleGuidAttribute()
The attribute name which is used to match against the role name guid.- Returns:
- role name guid attribute
-
getConnectorConfigurationParameters
public final Map<String,String> getConnectorConfigurationParameters()
-
getProviderURLList
public String[] getProviderURLList()
-
toString
public String toString()
- Overrides:
toStringin classObject- Returns:
- See Also:
Object.toString()
-
getUsernameHint
public String getUsernameHint()
-
getHostnameHint
public String getHostnameHint()
-
getReadTimeout
public int getReadTimeout()
-
getOU
public String getOU()
-
isFilteredByRolePrincipalName
public boolean isFilteredByRolePrincipalName()
-
isFilteredByRoleDistinguishedName
public boolean isFilteredByRoleDistinguishedName()
-
isFilteredByRole
public boolean isFilteredByRole()
-
-