Class LDAPDataConnector
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.ldap.impl.LDAPDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
public class LDAPDataConnector
extends AbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy>
A
DataConnector
that queries an LDAP in order to retrieve attribute
data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionFactory
Factory for retrieving LDAP connections.private boolean
Whether the default mapping strategy is being used.private boolean
Whether the default validator is being used.private final org.slf4j.Logger
Class logger.private SearchExecutor
For executing LDAP searches. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Gets the connection factory for retrievingConnection
s.Gets the search executor for executing searches.private void
Police TLS for JVM trust.protected Map<String,
IdPAttribute> Attempts to retrieve attributes from the LDAP.void
setConnectionFactory
(ConnectionFactory factory) Sets the connection factory for retrievingConnection
s.void
Sets the strategy for mapping from search results to a collection ofIdPAttribute
s.void
setSearchExecutor
(SearchExecutor executor) Sets the search executor for executing searches.void
setValidator
(Validator validator) Sets the validator used to validate this connector.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setResultsCache
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
connectionFactory
Factory for retrieving LDAP connections. -
searchExecutor
For executing LDAP searches. -
defaultValidator
private boolean defaultValidatorWhether the default validator is being used. -
defaultMappingStrategy
private boolean defaultMappingStrategyWhether the default mapping strategy is being used.
-
-
Constructor Details
-
LDAPDataConnector
public LDAPDataConnector()Constructor.
-
-
Method Details
-
getConnectionFactory
Gets the connection factory for retrievingConnection
s.- Returns:
- connection factory for retrieving
Connection
s
-
setConnectionFactory
Sets the connection factory for retrievingConnection
s.- Parameters:
factory
- connection factory for retrievingConnection
s
-
getSearchExecutor
Gets the search executor for executing searches.- Returns:
- search executor for executing searches
-
setSearchExecutor
Sets the search executor for executing searches.- Parameters:
executor
- search executor for executing searches
-
setValidator
Sets the validator used to validate this connector.- Overrides:
setValidator
in classAbstractSearchDataConnector<ExecutableSearchFilter,
SearchResultMappingStrategy> - Parameters:
validator
- used to validate this connector
-
setMappingStrategy
Sets the strategy for mapping from search results to a collection ofIdPAttribute
s.- Overrides:
setMappingStrategy
in classAbstractSearchDataConnector<ExecutableSearchFilter,
SearchResultMappingStrategy> - Parameters:
strategy
- strategy for mapping from search results to a collection ofIdPAttribute
s
-
doInitialize
- Overrides:
doInitialize
in classAbstractSearchDataConnector<ExecutableSearchFilter,
SearchResultMappingStrategy> - Throws:
ComponentInitializationException
-
policeForJVMTrust
Police TLS for JVM trust.- Throws:
ComponentInitializationException
- if we detect an SSL issue
-
retrieveAttributes
@Nullable protected Map<String,IdPAttribute> retrieveAttributes(ExecutableSearchFilter filter) throws ResolutionException Attempts to retrieve attributes from the LDAP.- Specified by:
retrieveAttributes
in classAbstractSearchDataConnector<ExecutableSearchFilter,
SearchResultMappingStrategy> - Parameters:
filter
- search filter used to retrieve data from the LDAP- Returns:
- search result from the LDAP
- Throws:
ResolutionException
- thrown if there is a problem retrieving data from the LDAP
-