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 ConnectionFactoryFactory for retrieving LDAP connections.private booleanWhether the default mapping strategy is being used.private booleanWhether the default validator is being used.private final org.slf4j.LoggerClass logger.private SearchExecutorFor executing LDAP searches. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidGets the connection factory for retrievingConnections.Gets the search executor for executing searches.private voidPolice TLS for JVM trust.protected Map<String,IdPAttribute> Attempts to retrieve attributes from the LDAP.voidsetConnectionFactory(ConnectionFactory factory) Sets the connection factory for retrievingConnections.voidSets the strategy for mapping from search results to a collection ofIdPAttributes.voidsetSearchExecutor(SearchExecutor executor) Sets the search executor for executing searches.voidsetValidator(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, setResultsCacheMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelayMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformationMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getIdMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitializedMethods 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 retrievingConnections.- Returns:
- connection factory for retrieving
Connections
-
setConnectionFactory
Sets the connection factory for retrievingConnections.- Parameters:
factory- connection factory for retrievingConnections
-
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:
setValidatorin classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Parameters:
validator- used to validate this connector
-
setMappingStrategy
Sets the strategy for mapping from search results to a collection ofIdPAttributes.- Overrides:
setMappingStrategyin classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Parameters:
strategy- strategy for mapping from search results to a collection ofIdPAttributes
-
doInitialize
- Overrides:
doInitializein classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()- Overrides:
doDestroyin classAbstractResolverPlugin<Map<String,IdPAttribute>>
-
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:
retrieveAttributesin 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
-