Class LdapInfo
java.lang.Object
org.sourceid.saml20.domain.datasource.info.LdapInfo
- All Implemented Interfaces:
Serializable,Cloneable
This class provides an independent wrapper of the LDAP information that was entered by the PingFederate user.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Ldap Tag Object.static enumSupported LDAP types by PingFederate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Provides a clone of the information stored in the LdapInfo class.Retrieves the specified authentication method.Retrieves a list of LDAP binary attributes for this datastore.Retrieves the alias of the client TLS certificate to use.intRetrieves the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.Retrieves The credentials for this LDAP datastore.intRetrieves the maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.getHost()Retrieves the hostname.getId()Retrieves The PingFederate id that was generated for the corresponding LDAP connection information.Retrieves the prefix used to query LDAP DNS Service Records.Retrieves the prefix used to query LDAPs DNS Service Records.List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig>Retrieves the List of supported tags for this datastore.Retrieves the List of supported tags for this datastore.Retrieves the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).Retrieves the type of this LDAP datastore.intgetMax()Retrieves the maximum number of connections that should be maintained in the pool.intRetrieves the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.intgetMin()Retrieves the number of connections to initially establish when the pool is created.getName()Retrieves the name of this LDAP datastore.Retrieves the principal to use.intRetrieves the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.Creates a url based on the information contained in this class.getServerUrl(String hosts) Creates a url based on the information contained in this class, but uses the provided host names instead of the ones in this class.intRetrieves the length of time in milliseconds between periodic background health checks against the available connections in this pool.booleanIndicates whether the connection pool should create a new connection if one is requested when there are none available.booleanIndicates if retries are enabled.booleanIndicates that test-on-borrow is enabled or not.booleanIndicates that test-on-return is enabled or not.booleanIndicates whether to use DNS Service Records to connect to this LDAP datastore.booleanIndicates whether associated connections should attempt to follow any referrals that they encounter.booleanisUseSSL()Returns true if the useSSL flag is set.booleanIndicates whether StartTLS will be used.booleanIndicates whether to verify the hostname during an SSL connection creation or not.voidsetAuthenticationMethod(String authenticationMethod) Specifies the authentication method.voidsetBinaryAttributes(List<String> binaryAttributes) Specifies a list of LDAP binary attributes for this datastore.voidsetClientTlsCertificate(String clientTlsCertificate) Specifies the client TLS certificate.voidsetConnTimeoutMillis(int connTimeoutMillis) Specifies the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.voidsetCreateIfNecessary(boolean createIfNecessary) Specifies whether the connection pool should create a new connection if one is requested when there are none available.voidsetCredentials(String credentials) Specifies the credentials for this class.voidsetDnsTtlMillis(int dnsTtlMillis) Specifies the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again.voidSpecifies the host name.voidSpecifies the LDAP id.voidsetLdapDnsSrvPrefix(String ldapDnsSrvPrefix) Specifies the prefix used to query LDAP DNS Service Records.voidsetLdapsDnsSrvPrefix(String ldapsDnsSrvPrefix) Specifies the prefix used to query LDAPs DNS Service Records.voidsetLdapTagConfigList(List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig> ldapTagConfigList) Specifies the List of supported tags for this datastore.voidsetLdapTags(List<LdapInfo.LdapTag> ldapTags) Specifies the List of supported tags for this datastore.voidsetLdapType(LdapInfo.LdapType ldapType) Specifies the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).voidsetLdapTypeDesc(String ldapTypeDesc) Specifies the type of this LDAP datastore,voidsetMax(int max) Specifies the maximum number of connections that should be maintained in the pool.voidsetMaxWait(int maxWait) Specifies the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.voidsetMin(int min) Specifies the number of connections to initially establish when the pool is created.voidSpecifies the name of this LDAP datastore.voidsetPingOneConnection(String pingOneConnection) voidsetPingOneEnvironment(String pingOneEnvironment) voidsetPingOneGateway(String pingOneGateway) voidsetPrincipal(String principal) Specifies the principal to use.voidsetReadTimeoutMillis(int readTimeoutMillis) Specifies the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.voidsetRetryFailedOperations(boolean retryFailedOperations) Enable/disable retries.voidsetTestOnBorrow(boolean testOnBorrow) Specifies the status of test-on-borrow.voidsetTestOnReturn(boolean testOnReturn) Specifies the status of test-on-return.voidsetTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) Specifies the length of time in milliseconds between periodic background health checks against the available connections in this pool.voidsetUseDnsSrvRecords(boolean useDnsSrvRecords) Specifies to use DNS Service Records to connect to the LDAP datastore or not.voidsetUseLdapReferral(boolean useLdapReferral) Specifies whether associated connections should attempt to follow any referrals that they encounter, using the referral connector for the associated connection.voidsetUseSSL(boolean useSSL) Specifies the useSSL flag.voidsetUseStartTLS(boolean useStartTLS) Specifies the useStartTLS flag.voidsetVerifyHost(boolean verifyHost) Specifies to verify the hostname or not during an SSL connection connection.toString()
-
Constructor Details
-
LdapInfo
public LdapInfo()Default constructor.
-
-
Method Details
-
toString
-
clone
Provides a clone of the information stored in the LdapInfo class.- Returns:
- a new LdapInfo with the same information
-
getServerUrl
Creates a url based on the information contained in this class. It is created in the format: ldap://hostname or ldaps://hostname depending on the UseSSL flag. If multiple hosts name are used, space separated, then each will have the protocol prepended.- Returns:
- A url suitable to use for connection to an LDAP datastore.
-
getServerUrl
Creates a url based on the information contained in this class, but uses the provided host names instead of the ones in this class. It is created in the format: ldap://hostname or ldaps://hostname depending on the UseSSL flag. If multiple hosts name are used, space separated, then each will have the protocol prepended.- Parameters:
hosts- The String containing the host names- Returns:
- A url suitable to use for connection to an LDAP datastore.
-
getAuthenticationMethod
Retrieves the specified authentication method. Should be one of: none, simple, clientTlsCert- Returns:
- the authentication method.
- See Also:
-
setAuthenticationMethod
Specifies the authentication method. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
authenticationMethod- The desired authentication method. Should be one of: none, simple.- See Also:
-
getCredentials
Retrieves The credentials for this LDAP datastore.- Returns:
- The credentials for this LDAP
- See Also:
-
setCredentials
Specifies the credentials for this class. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
credentials- The credentials for this LDAP datastore.- See Also:
-
getClientTlsCertificate
Retrieves the alias of the client TLS certificate to use.- Returns:
- The certificate alias.
-
setClientTlsCertificate
Specifies the client TLS certificate. The certificate must exist in the PingFederate Trust Store.- Parameters:
clientTlsCertificate- The alias of the certificate to use.
-
getHost
Retrieves the hostname. It can be a space separated list of hostnames. Used bygetServerUrl().- Returns:
- The hostname. It can be a space separated list of host names.
-
setHost
Specifies the host name. A list of space separated hostnames can be used. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
host- The hostname to use. A list of space separated host names can be used.
-
getPrincipal
Retrieves the principal to use.- Returns:
- The principal information to use.
- See Also:
-
setPrincipal
Specifies the principal to use. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
principal- security principal to set.- See Also:
-
isUseSSL
public boolean isUseSSL()Returns true if the useSSL flag is set. This flag is used bygetServerUrl()to determine whether to use ldap://hostname or ldaps://hostname.- Returns:
- true to use SSL.
-
setUseSSL
public void setUseSSL(boolean useSSL) Specifies the useSSL flag. If true,getServerUrl()returnsldaps://hostname. If false,getServerUrl()returnsldap://hostname. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
useSSL- The value to set for the useSSL flag.
-
getId
Retrieves The PingFederate id that was generated for the corresponding LDAP connection information.- Returns:
- the LDAP datastore information id.
-
setId
Specifies the LDAP id. Because this class is cloned from the actual LDAP information, changing this value will not have any impact on the PingFederate maintained LDAP information.- Parameters:
id- The value to set.
-
getName
Retrieves the name of this LDAP datastore.- Returns:
- the name of this LDAP datastore
-
setName
Specifies the name of this LDAP datastore.- Parameters:
name- the LDAP datastore name
-
getLdapType
Retrieves the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).- Returns:
- the LDAP type
-
setLdapType
Specifies the LDAP type (GENERIC, AD, PingDirectory, Custom or SunONE).- Parameters:
ldapType- the LDAP type to set.
-
getLdapTypeDesc
Retrieves the type of this LDAP datastore.- Returns:
- the type of this LDAP datasotre
- See Also:
-
setLdapTypeDesc
Specifies the type of this LDAP datastore,- Parameters:
ldapTypeDesc- the LDAP data store type value- See Also:
-
isTestOnBorrow
public boolean isTestOnBorrow()Indicates that test-on-borrow is enabled or not.- Returns:
trueif test-on-borrow is enabled,falseotherwise
-
setTestOnBorrow
public void setTestOnBorrow(boolean testOnBorrow) Specifies the status of test-on-borrow.- Parameters:
testOnBorrow- the test-on-borrow status
-
isTestOnReturn
public boolean isTestOnReturn()Indicates that test-on-return is enabled or not.- Returns:
trueif test-on-return is enabled,falseotherwise
-
setTestOnReturn
public void setTestOnReturn(boolean testOnReturn) Specifies the status of test-on-return.- Parameters:
testOnReturn- the test-on-return status
-
isCreateIfNecessary
public boolean isCreateIfNecessary()Indicates whether the connection pool should create a new connection if one is requested when there are none available.- Returns:
trueif a new connection should be created if none are available when a request is received, otherwisefalse
-
setCreateIfNecessary
public void setCreateIfNecessary(boolean createIfNecessary) Specifies whether the connection pool should create a new connection if one is requested when there are none available.- Parameters:
createIfNecessary- Specifies whether the connection pool should create a new connection if one is requested when there are none available.
-
isRetryFailedOperations
public boolean isRetryFailedOperations()Indicates if retries are enabled.- Returns:
- whether retries are enabled
-
setRetryFailedOperations
public void setRetryFailedOperations(boolean retryFailedOperations) Enable/disable retries.- Parameters:
retryFailedOperations- whether or not to enable retries
-
getMin
public int getMin()Retrieves the number of connections to initially establish when the pool is created. It must be greater than or equal to one.- Returns:
- the initial connections established in the connection pool
-
setMin
public void setMin(int min) Specifies the number of connections to initially establish when the pool is created. It must be greater than or equal to one.- Parameters:
min- the initial connections established in the connection pool
-
getMax
public int getMax()Retrieves the maximum number of connections that should be maintained in the pool.- Returns:
- the maximum number of connections that should be maintained in the pool.
-
setMax
public void setMax(int max) Specifies the maximum number of connections that should be maintained in the pool. It must be greater than or equal to the initial number of connections.- Parameters:
max- the maximum number of connections that should be maintained in the pool.
-
getMaxWait
public int getMaxWait()Retrieves the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.- Returns:
- The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool, or zero to indicate that the pool should not block at all if no connections are available and that it should either create a new connection or throw an exception.
-
setMaxWait
public void setMaxWait(int maxWait) Specifies the maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.- Parameters:
maxWait- The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool. A value of zero should be used to indicate that the pool should not block at all if no connections are available and that it should either create a new connection or throw an exception
-
getTimeBetweenEvictionRunsMillis
public int getTimeBetweenEvictionRunsMillis()Retrieves the length of time in milliseconds between periodic background health checks against the available connections in this pool.- Returns:
- The length of time in milliseconds between the periodic background health checks against the available connections in this pool.
-
setTimeBetweenEvictionRunsMillis
public void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) Specifies the length of time in milliseconds between periodic background health checks against the available connections in this pool.- Parameters:
timeBetweenEvictionRunsMillis- The length of time in milliseconds between periodic background health checks against the available connections in this pool. The provided value must be greater than zero.
-
getBinaryAttributes
Retrieves a list of LDAP binary attributes for this datastore.- Returns:
- a list of LDAP binary attributes
-
setBinaryAttributes
Specifies a list of LDAP binary attributes for this datastore.- Parameters:
binaryAttributes- list of LDAP binary attributes
-
getReadTimeoutMillis
public int getReadTimeoutMillis()Retrieves the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.- Returns:
- The maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server, or zero if there should not be any default timeout.
-
setReadTimeoutMillis
public void setReadTimeoutMillis(int readTimeoutMillis) Specifies the maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server. A value of zero indicates that there should be no timeout.- Parameters:
readTimeoutMillis- The maximum length of time in milliseconds that an operation should be allowed to block while waiting for a response from the server.
-
getConnTimeoutMillis
public int getConnTimeoutMillis()Retrieves the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.- Returns:
- The maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up, or zero to indicate that there should be no connect timeout.
-
setConnTimeoutMillis
public void setConnTimeoutMillis(int connTimeoutMillis) Specifies the maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up. A value of zero indicates that there should be no connect timeout.- Parameters:
connTimeoutMillis- The maximum length of time in milliseconds that a connection attempt should be allowed to continue before giving up.
-
isVerifyHost
public boolean isVerifyHost()Indicates whether to verify the hostname during an SSL connection creation or not.- Returns:
trueif the hostname should be verified,falseotherwise
-
setVerifyHost
public void setVerifyHost(boolean verifyHost) Specifies to verify the hostname or not during an SSL connection connection.- Parameters:
verifyHost-trueto verify the hostname,falseotherwise
-
isUseDnsSrvRecords
public boolean isUseDnsSrvRecords()Indicates whether to use DNS Service Records to connect to this LDAP datastore.- Returns:
trueif DNS Service Records should be used,falseotherwise
-
setUseDnsSrvRecords
public void setUseDnsSrvRecords(boolean useDnsSrvRecords) Specifies to use DNS Service Records to connect to the LDAP datastore or not.- Parameters:
useDnsSrvRecords-trueif DNS Service Records should be used,falseotherwise
-
isUseLdapReferral
public boolean isUseLdapReferral()Indicates whether associated connections should attempt to follow any referrals that they encounter.- Returns:
trueif associated connections should attempt to follow any referrals that they encounter, orfalseif not.
-
setUseLdapReferral
public void setUseLdapReferral(boolean useLdapReferral) Specifies whether associated connections should attempt to follow any referrals that they encounter, using the referral connector for the associated connection.- Parameters:
useLdapReferral- Specifies whether associated connections should attempt to follow any referrals that they encounter.
-
getDnsTtlMillis
public int getDnsTtlMillis()Retrieves the maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.- Returns:
- The maximum length of time in milliseconds that previously-retrieved DNS information should be cached before it needs to be refreshed.
-
setDnsTtlMillis
public void setDnsTtlMillis(int dnsTtlMillis) Specifies the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again. A value less than or equal to zero will use the default TTL of one hour.- Parameters:
dnsTtlMillis- the maximum length of time in milliseconds that DNS information should be cached before it needs to be retrieved again.
-
getLdapDnsSrvPrefix
Retrieves the prefix used to query LDAP DNS Service Records.- Returns:
- the prefix used to query LDAP DNS Service Records
-
setLdapDnsSrvPrefix
Specifies the prefix used to query LDAP DNS Service Records. This prefix would be used whenisUseSSL()isfalse.- Parameters:
ldapDnsSrvPrefix- the prefix used to query LDAP DNS Service Records
-
getLdapsDnsSrvPrefix
Retrieves the prefix used to query LDAPs DNS Service Records.- Returns:
- the prefix used to query LDAPs DNS Service Records
-
setLdapsDnsSrvPrefix
Specifies the prefix used to query LDAPs DNS Service Records. This prefix would be used whenisUseSSL()istrue.- Parameters:
ldapsDnsSrvPrefix- the prefix used to query LDAPs DNS Service Records
-
getPingOneConnection
-
setPingOneConnection
-
getPingOneEnvironment
-
setPingOneEnvironment
-
getPingOneGateway
-
setPingOneGateway
-
getLdapTagConfigList
Retrieves the List of supported tags for this datastore.NOTE: Use
getLdapTags()instead of this Method. This method should only be used By PingFederate internally.- Returns:
- the List of supported tags
-
setLdapTagConfigList
public void setLdapTagConfigList(List<org.sourceid.saml20.domain.datasource.tag.LdapTagConfig> ldapTagConfigList) Specifies the List of supported tags for this datastore.NOTE: Use
setLdapTags(List)instead of this Method. This method should only be used By PingFederate internally.- Parameters:
ldapTagConfigList- the List of supported tags
-
getLdapTags
Retrieves the List of supported tags for this datastore.- Returns:
- the List of supported tags
- Since:
- 10.3
-
setLdapTags
Specifies the List of supported tags for this datastore.- Parameters:
ldapTags- the List of supported tags- Since:
- 10.3
-
isUseStartTLS
public boolean isUseStartTLS()Indicates whether StartTLS will be used.- Returns:
- true to use StartTLS.
- Since:
- 12.1
-
setUseStartTLS
public void setUseStartTLS(boolean useStartTLS) Specifies the useStartTLS flag.- Parameters:
useStartTLS- The value to set for the useStartTLS flag.- Since:
- 12.1
-