public class MetadataPKIXValidationInformationResolver extends AbstractInitializableComponent implements org.opensaml.security.x509.PKIXValidationInformationResolver
PKIXValidationInformationResolver which resolves PKIXValidationInformation based
on information stored in SAML 2 metadata. Validation information is retrieved from Shibboleth-specific metadata
extensions to EntityDescriptor represented by instances of KeyAuthority, as well as instances of
PKIXValidationInformation which have been previously populated within the data set available from
XMLObject.getObjectMetadata().
Resolution of trusted names for an entity is also supported, based on KeyName
information contained within the KeyInfo of a role descriptor's KeyDescriptor element.| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_AUTHORITY_VERIFY_DEPTH_DEFAULT
Default value for Shibboleth KeyAuthority verify depth.
|
private org.slf4j.Logger |
log
Class logger.
|
private org.opensaml.saml.metadata.resolver.RoleDescriptorResolver |
roleDescriptorResolver
Metadata RoleDescriptor resolver used to resolve metadata information.
|
| Constructor and Description |
|---|
MetadataPKIXValidationInformationResolver(org.opensaml.saml.metadata.resolver.RoleDescriptorResolver resolver)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCriteriaRequirements(CriteriaSet criteriaSet)
Check that all necessary criteria are available.
|
protected void |
extractPKIXInfo(Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator,
KeyAuthority keyAuthority)
Retrieves validation information from the Shibboleth KeyAuthority resolver extension element.
|
org.opensaml.saml.metadata.resolver.RoleDescriptorResolver |
getRoleDescriptorResolver()
Get the metadata RoleDescriptor resolver instance used by this resolver.
|
protected Iterable<org.opensaml.saml.saml2.metadata.RoleDescriptor> |
getRoleDescriptors(CriteriaSet criteriaSet,
String entityID,
QName role,
String protocol)
Get the list of resolver role descriptors which match the given entityID, role and protocol.
|
protected void |
getTrustedNames(Set<String> accumulator,
org.opensaml.xmlsec.signature.KeyInfo keyInfo)
Extract trusted names from a KeyInfo element.
|
protected boolean |
matchUsage(org.opensaml.security.credential.UsageType metadataUsage,
org.opensaml.security.credential.UsageType criteriaUsage)
Match usage enum type values from resolver KeyDescriptor and from specified resolution criteria.
|
Iterable<org.opensaml.security.x509.PKIXValidationInformation> |
resolve(CriteriaSet criteriaSet) |
protected void |
resolvePKIXInfo(Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator,
org.opensaml.saml.saml2.metadata.Extensions extensions)
Retrieves validation information from the resolver extension element.
|
protected void |
resolvePKIXInfo(Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator,
org.opensaml.saml.saml2.metadata.RoleDescriptor roleDescriptor)
Retrieves validation information from the provided role descriptor.
|
org.opensaml.security.x509.PKIXValidationInformation |
resolveSingle(CriteriaSet criteriaSet) |
Set<String> |
resolveTrustedNames(CriteriaSet criteriaSet) |
protected Collection<org.opensaml.security.x509.PKIXValidationInformation> |
retrievePKIXInfoFromMetadata(CriteriaSet criteriaSet,
String entityID,
QName role,
String protocol)
Retrieves validation information from the provided resolver.
|
protected Set<String> |
retrieveTrustedNamesFromMetadata(CriteriaSet criteriaSet,
String entityID,
QName role,
String protocol,
org.opensaml.security.credential.UsageType usage)
Retrieves trusted name information from the provided resolver.
|
boolean |
supportsTrustedNameResolution() |
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedpublic static final int KEY_AUTHORITY_VERIFY_DEPTH_DEFAULT
@Nonnull private final org.slf4j.Logger log
@Nonnull private org.opensaml.saml.metadata.resolver.RoleDescriptorResolver roleDescriptorResolver
public MetadataPKIXValidationInformationResolver(@Nonnull@ParameterName(name="resolver") org.opensaml.saml.metadata.resolver.RoleDescriptorResolver resolver)
resolver - role descriptor resolver@Nonnull public org.opensaml.saml.metadata.resolver.RoleDescriptorResolver getRoleDescriptorResolver()
public org.opensaml.security.x509.PKIXValidationInformation resolveSingle(CriteriaSet criteriaSet) throws ResolverException
resolveSingle in interface Resolver<org.opensaml.security.x509.PKIXValidationInformation,CriteriaSet>ResolverExceptionpublic Iterable<org.opensaml.security.x509.PKIXValidationInformation> resolve(CriteriaSet criteriaSet) throws ResolverException
resolve in interface Resolver<org.opensaml.security.x509.PKIXValidationInformation,CriteriaSet>ResolverException@Nonnull public Set<String> resolveTrustedNames(CriteriaSet criteriaSet) throws ResolverException
resolveTrustedNames in interface org.opensaml.security.x509.PKIXValidationInformationResolverResolverExceptionpublic boolean supportsTrustedNameResolution()
supportsTrustedNameResolution in interface org.opensaml.security.x509.PKIXValidationInformationResolverprotected void checkCriteriaRequirements(CriteriaSet criteriaSet)
criteriaSet - the criteria set to evaluateprotected Collection<org.opensaml.security.x509.PKIXValidationInformation> retrievePKIXInfoFromMetadata(CriteriaSet criteriaSet, String entityID, QName role, String protocol) throws ResolverException
criteriaSet - the criteria set being processedentityID - entity ID for which to resolve validation informationrole - role in which the entity is operatingprotocol - protocol over which the entity is operating (may be null)ResolverException - thrown if the key, certificate, or CRL information is represented in an unsupported
formatprotected void resolvePKIXInfo(Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator, org.opensaml.saml.saml2.metadata.RoleDescriptor roleDescriptor) throws ResolverException
roleDescriptor - the role descriptor from which to resolve information.accumulator - accumulator of PKIX validation information to returnResolverException - thrown if the key, certificate, or CRL information is represented in an unsupported
formatprotected void resolvePKIXInfo(Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator, org.opensaml.saml.saml2.metadata.Extensions extensions) throws ResolverException
extensions - the extension element from which to resolve informationaccumulator - accumulator of PKIX validation information to returnResolverException - thrown if the key, certificate, or CRL information is represented in an unsupported
formatprotected void extractPKIXInfo(@Nonnull Collection<org.opensaml.security.x509.PKIXValidationInformation> accumulator, @Nonnull KeyAuthority keyAuthority) throws ResolverException
keyAuthority - the Shibboleth KeyAuthority element from which to resolve informationaccumulator - accumulator of PKIX validation information to returnResolverException - thrown if the key, certificate, or CRL information is represented in an unsupported
formatprotected Set<String> retrieveTrustedNamesFromMetadata(CriteriaSet criteriaSet, String entityID, QName role, String protocol, org.opensaml.security.credential.UsageType usage) throws ResolverException
criteriaSet - the criteria set being processedentityID - entity ID for which to resolve trusted namesrole - role in which the entity is operatingprotocol - protocol over which the entity is operating (may be null)usage - usage specifier for role descriptor key descriptors to evaluateSecurityException - thrown if there is an error extracting trusted name informationResolverException - if we have an error getting the role descriptorsprotected void getTrustedNames(Set<String> accumulator, org.opensaml.xmlsec.signature.KeyInfo keyInfo)
keyInfo - the KeyInfo instance from which to extract trusted namesaccumulator - set of trusted names to returnprotected boolean matchUsage(org.opensaml.security.credential.UsageType metadataUsage,
org.opensaml.security.credential.UsageType criteriaUsage)
metadataUsage - the value from the 'use' attribute of a resolver KeyDescriptor elementcriteriaUsage - the value from specified criteriaprotected Iterable<org.opensaml.saml.saml2.metadata.RoleDescriptor> getRoleDescriptors(CriteriaSet criteriaSet, String entityID, QName role, String protocol) throws ResolverException
criteriaSet - the criteria set being processedentityID - entity ID of the resolver entity descriptor to resolverole - role in which the entity is operatingprotocol - protocol over which the entity is operating (may be null)ResolverException - thrown if there is an error retrieving role descriptors from the resolver providerCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.