Class StaticPKIXFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<PKIXX509CredentialTrustEngine>
net.shibboleth.idp.profile.spring.factory.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 boolean
Whether to enable name checking.private X509CredentialNameEvaluator
Custom instance ofX509CredentialNameEvaluator
to use.CRL resources.private org.slf4j.Logger
log.Explicit subject name(s) to match.private PKIXTrustEvaluator
Custom instance ofPKIXTrustEvaluator
to use.private Integer
Verification depth.Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PKIXX509CredentialTrustEngine
protected List<X509Certificate>
Get the configured certificates.getCRLs()
Get the configured CRL list.Class<?>
void
setCertificates
(List<Resource> certs) Set the resources which we will convert into certificates.void
setCheckNames
(boolean flag) Set whether the perform name checking in the PKIX layer.void
Set the custom instance ofX509CredentialNameEvaluator
to use.void
Set the resources which we will convert into CRLs.void
setTrustedNames
(Collection<String> names) Set explicitly trusted names to match against credential.void
setTrustEvaluator
(PKIXTrustEvaluator evaluator) Set the custom instance ofPKIXTrustEvaluator
to use.void
setVerifyDepth
(int depth) Set the verify depth.protected void
validateConfiguration
(PKIXTrustEvaluator pkixTrustEvaluator) Validate the configuration of the effectivePKIXTrustEvaluator
.Methods inherited from class net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean
createInstance, destroyInstance
Methods inherited from class org.springframework.beans.factory.config.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 ofPKIXTrustEvaluator
to use. -
credentialNameEvaluator
Custom instance ofX509CredentialNameEvaluator
to use. A non-null value overridescheckNames
.
-
-
Constructor Details
-
StaticPKIXFactoryBean
public StaticPKIXFactoryBean()Constructor.
-
-
Method Details
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<PKIXX509CredentialTrustEngine>
- Specified by:
getObjectType
in 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
public void setVerifyDepth(int depth) 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 ofPKIXTrustEvaluator
to use.- Parameters:
evaluator
- The trustEvaluator to set.
-
setCredentialNameEvaluator
Set the custom instance ofX509CredentialNameEvaluator
to use.A non-null value overrides
setCheckNames(boolean)
.- Parameters:
evaluator
- The credentialNameEvaluator to set.
-
getCertificates
Get the configured certificates.- Returns:
- the certificates
-
getCRLs
Get the configured CRL list.- Returns:
- the crls
-
doCreateInstance
- Specified by:
doCreateInstance
in 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
-