Package org.opensaml.spring.trust
Class StaticPKIXFactoryBean
java.lang.Object
net.shibboleth.shared.spring.factory.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<PKIXX509CredentialTrustEngine>
org.opensaml.spring.trust.StaticPKIXFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<PKIXX509CredentialTrustEngine>,InitializingBean
public class StaticPKIXFactoryBean
extends AbstractComponentAwareFactoryBean<PKIXX509CredentialTrustEngine>
File system specific bean for PKIXX509CredentialTrustEngine.
- Since:
- 3.3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionCertificate resources.private booleanWhether to enable name checking.private X509CredentialNameEvaluatorCustom instance ofX509CredentialNameEvaluatorto use.CRL resources.private org.slf4j.Loggerlog.Explicit subject name(s) to match.private PKIXTrustEvaluatorCustom instance ofPKIXTrustEvaluatorto use.private IntegerVerification depth.Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PKIXX509CredentialTrustEngineprotected List<X509Certificate>Get the configured certificates.getCRLs()Get the configured CRL list.Class<?>voidsetCertificates(List<Resource> certs) Set the resources which we will convert into certificates.voidsetCheckNames(boolean flag) Set whether the perform name checking in the PKIX layer.voidSet the custom instance ofX509CredentialNameEvaluatorto use.voidSet the resources which we will convert into CRLs.voidsetTrustedNames(Collection<String> names) Set explicitly trusted names to match against credential.voidsetTrustEvaluator(PKIXTrustEvaluator evaluator) Set the custom instance ofPKIXTrustEvaluatorto use.voidsetVerifyDepth(Integer depth) Set the verify depth.protected voidvalidateConfiguration(PKIXTrustEvaluator pkixTrustEvaluator) Validate the configuration of the effectivePKIXTrustEvaluator.Methods inherited from class net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean
createInstance, destroyInstance, setThrowIfNullMethods inherited from class net.shibboleth.shared.spring.factory.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
log
@Nonnull private org.slf4j.Logger loglog. -
certificateResources
Certificate resources. -
crlResources
CRL resources. -
verifyDepth
Verification depth. -
trustedNames
Explicit subject name(s) to match. -
checkNames
private boolean checkNamesWhether to enable name checking. If true a default implementation will be used. See also:credentialNameEvaluator. -
trustEvaluator
Custom instance ofPKIXTrustEvaluatorto use. -
credentialNameEvaluator
Custom instance ofX509CredentialNameEvaluatorto use. A non-null value overridescheckNames.
-
-
Constructor Details
-
StaticPKIXFactoryBean
public StaticPKIXFactoryBean()Constructor.
-
-
Method Details
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<PKIXX509CredentialTrustEngine>- Specified by:
getObjectTypein classAbstractFactoryBean<PKIXX509CredentialTrustEngine>
-
setCertificates
Set the resources which we will convert into certificates.- Parameters:
certs- the resources
-
setCRLs
Set the resources which we will convert into CRLs.- Parameters:
crls- the resources
-
setVerifyDepth
Set the verify depth.- Parameters:
depth- value to set
-
setCheckNames
public void setCheckNames(boolean flag) Set whether the perform name checking in the PKIX layer.Defaults to "true", should generally be disabled when used with an HTTP client that is already checking names.
If true a default implementation will be used unless a specific name evaluator impl has been supplied. See also:
setCredentialNameEvaluator(X509CredentialNameEvaluator).- Parameters:
flag- flag to set- Since:
- 3.4.0
-
setTrustedNames
Set explicitly trusted names to match against credential.- Parameters:
names- explicitly trusted names- Since:
- 3.4.0
-
setTrustEvaluator
Set the custom instance ofPKIXTrustEvaluatorto use.- Parameters:
evaluator-PKIXTrustEvaluatorto set
-
setCredentialNameEvaluator
Set the custom instance ofX509CredentialNameEvaluatorto use.A non-null value overrides
setCheckNames(boolean).- Parameters:
evaluator-X509CredentialNameEvaluatorto set
-
getCertificates
Get the configured certificates.- Returns:
- the certificates
-
getCRLs
Get the configured CRL list.- Returns:
- the crls
-
doCreateInstance
- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<PKIXX509CredentialTrustEngine>- Throws:
Exception
-
validateConfiguration
protected void validateConfiguration(@Nonnull PKIXTrustEvaluator pkixTrustEvaluator) throws Exception Validate the configuration of the effectivePKIXTrustEvaluator.- Parameters:
pkixTrustEvaluator- the instance whose configuration is to be evaluated- Throws:
Exception- if configuration issues are encountered
-