public class PKIXInformationResolver extends Object implements org.opensaml.xml.security.x509.PKIXValidationInformationResolver
Modifier and Type | Class and Description |
---|---|
protected class |
PKIXInformationResolver.MetadataCacheKey
A class which serves as the key into the cache of credentials previously resolved.
|
protected class |
PKIXInformationResolver.MetadataProviderObserver
An observer that clears the credential cache if the underlying metadata changes.
|
Constructor and Description |
---|
PKIXInformationResolver(org.opensaml.security.MetadataCredentialResolver metadataResolver,
MetadataManager metadataProvider,
KeyManager keyManager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cacheCredentials(PKIXInformationResolver.MetadataCacheKey cacheKey,
Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> credentials)
Adds resolved credentials to the cache.
|
protected void |
checkCriteriaRequirements(org.opensaml.xml.security.CriteriaSet criteriaSet)
Check that all necessary credential criteria are available.
|
protected int |
getPKIXDepth()
Allowed depth of PKIX trust path length.
|
protected ReadWriteLock |
getReadWriteLock()
Get the lock instance used to synchronize access to the credential cache.
|
protected Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> |
populateCredentials(org.opensaml.xml.security.CriteriaSet criteriaSet)
Method responsible for loading of PKIX information.
|
protected void |
populateCRLs(org.opensaml.xml.security.CriteriaSet criteriaSet,
Collection<X509Certificate> anchors,
Collection<X509CRL> crls)
Extension points for loading of certificate revocation lists.
|
protected void |
populateMetadataAnchors(org.opensaml.xml.security.CriteriaSet criteriaSet,
Collection<X509Certificate> anchors,
Collection<X509CRL> crls)
Method loads credentials satisfying the criteriaSet from the metadata of the related entity.
|
protected void |
populateTrustedKeysAnchors(org.opensaml.xml.security.CriteriaSet criteriaSet,
Collection<X509Certificate> anchors,
Collection<X509CRL> crls)
Method add trusted anchors which include all trusted certificates configuration
in the ExtendedMetadata.
|
Iterable<org.opensaml.xml.security.x509.PKIXValidationInformation> |
resolve(org.opensaml.xml.security.CriteriaSet criteria) |
protected Iterable<org.opensaml.xml.security.x509.PKIXValidationInformation> |
resolveFromSource(org.opensaml.xml.security.CriteriaSet criteriaSet) |
org.opensaml.xml.security.x509.PKIXValidationInformation |
resolveSingle(org.opensaml.xml.security.CriteriaSet criteria)
Returns first found PKIX information satisfying the condition.
|
Set<String> |
resolveTrustedNames(org.opensaml.xml.security.CriteriaSet criteriaSet) |
protected Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> |
retrieveFromCache(PKIXInformationResolver.MetadataCacheKey cacheKey)
Retrieves pre-resolved credentials from the cache.
|
boolean |
supportsTrustedNameResolution() |
public PKIXInformationResolver(org.opensaml.security.MetadataCredentialResolver metadataResolver, MetadataManager metadataProvider, KeyManager keyManager)
metadataResolver
- resolver used to extract basic credentials out of metadatametadataProvider
- provider of the metadata used to load extended metadata for an entitykeyManager
- key managerIllegalArgumentException
- thrown if the supplied provider is nullprotected ReadWriteLock getReadWriteLock()
protected Iterable<org.opensaml.xml.security.x509.PKIXValidationInformation> resolveFromSource(org.opensaml.xml.security.CriteriaSet criteriaSet) throws org.opensaml.xml.security.SecurityException
org.opensaml.xml.security.SecurityException
protected Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> populateCredentials(org.opensaml.xml.security.CriteriaSet criteriaSet) throws org.opensaml.xml.security.SecurityException
criteriaSet
- criteria for selection of data to includeorg.opensaml.xml.security.SecurityException
- in case credentials cannot be populatedprotected void checkCriteriaRequirements(org.opensaml.xml.security.CriteriaSet criteriaSet)
criteriaSet
- the credential set to evaluateprotected Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> retrieveFromCache(PKIXInformationResolver.MetadataCacheKey cacheKey)
cacheKey
- the key to the metadata cacheprotected void populateMetadataAnchors(org.opensaml.xml.security.CriteriaSet criteriaSet, Collection<X509Certificate> anchors, Collection<X509CRL> crls) throws org.opensaml.xml.security.SecurityException
criteriaSet
- criteria setanchors
- pkix anchorscrls
- CRLs for the anchorsorg.opensaml.xml.security.SecurityException
- thrown if the key, certificate, or CRL information is represented in an unsupported formatprotected void populateTrustedKeysAnchors(org.opensaml.xml.security.CriteriaSet criteriaSet, Collection<X509Certificate> anchors, Collection<X509CRL> crls) throws org.opensaml.xml.security.SecurityException
criteriaSet
- criteria setanchors
- pkix anchorscrls
- CRLs for the anchorsorg.opensaml.xml.security.SecurityException
- thrown if the key, certificate, or CRL information is represented in an unsupported
formatprotected void populateCRLs(org.opensaml.xml.security.CriteriaSet criteriaSet, Collection<X509Certificate> anchors, Collection<X509CRL> crls) throws org.opensaml.xml.security.SecurityException
criteriaSet
- criteria setanchors
- pkix anchorscrls
- crls to be populatedorg.opensaml.xml.security.SecurityException
- never thrown in default implementationprotected int getPKIXDepth()
protected void cacheCredentials(PKIXInformationResolver.MetadataCacheKey cacheKey, Collection<org.opensaml.xml.security.x509.PKIXValidationInformation> credentials)
cacheKey
- the key for caching the credentialscredentials
- collection of credentials to cachepublic Set<String> resolveTrustedNames(org.opensaml.xml.security.CriteriaSet criteriaSet) throws org.opensaml.xml.security.SecurityException, UnsupportedOperationException
resolveTrustedNames
in interface org.opensaml.xml.security.x509.PKIXValidationInformationResolver
org.opensaml.xml.security.SecurityException
UnsupportedOperationException
public boolean supportsTrustedNameResolution()
supportsTrustedNameResolution
in interface org.opensaml.xml.security.x509.PKIXValidationInformationResolver
public Iterable<org.opensaml.xml.security.x509.PKIXValidationInformation> resolve(org.opensaml.xml.security.CriteriaSet criteria) throws org.opensaml.xml.security.SecurityException
resolve
in interface org.opensaml.xml.security.Resolver<org.opensaml.xml.security.x509.PKIXValidationInformation,org.opensaml.xml.security.CriteriaSet>
org.opensaml.xml.security.SecurityException
public org.opensaml.xml.security.x509.PKIXValidationInformation resolveSingle(org.opensaml.xml.security.CriteriaSet criteria) throws org.opensaml.xml.security.SecurityException
resolveSingle
in interface org.opensaml.xml.security.Resolver<org.opensaml.xml.security.x509.PKIXValidationInformation,org.opensaml.xml.security.CriteriaSet>
criteria
- criteriaorg.opensaml.xml.security.SecurityException
- error