Package org.opensaml.xmlsec.impl
Class AbstractSecurityParametersResolver<ProductType>
- java.lang.Object
-
- org.opensaml.xmlsec.impl.AbstractSecurityParametersResolver<ProductType>
-
- Type Parameters:
ProductType
- the type of output produced by the resolver
- All Implemented Interfaces:
net.shibboleth.utilities.java.support.resolver.Resolver<ProductType,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
- Direct Known Subclasses:
BasicDecryptionParametersResolver
,BasicEncryptionParametersResolver
,BasicSignatureSigningParametersResolver
,BasicSignatureValidationParametersResolver
public abstract class AbstractSecurityParametersResolver<ProductType> extends Object implements net.shibboleth.utilities.java.support.resolver.Resolver<ProductType,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
Abstract base class for security parameters resolvers which supplies commonly used functionality for reuse.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Logger.
-
Constructor Summary
Constructors Constructor Description AbstractSecurityParametersResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.opensaml.xmlsec.keyinfo.KeyInfoGenerator
lookupKeyInfoGenerator(org.opensaml.security.credential.Credential credential, org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager manager, String keyInfoProfileName)
Resolve aKeyInfoGenerator
instance based on aNamedKeyInfoGeneratorManager
,Credential
and optional KeyInfo generation profile name.protected void
resolveAndPopulateWhiteAndBlacklists(org.opensaml.xmlsec.WhitelistBlacklistParameters params, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and populate the effective whitelist or blacklist on the supplied instance ofWhitelistBlacklistParameters
.protected Collection<String>
resolveEffectiveBlacklist(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm blacklist based on supplied configuration.protected Collection<String>
resolveEffectiveWhitelist(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm whitelist based on supplied configuration.protected org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence
resolveWhitelistBlacklistPrecedence(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm whitelist/blacklist precedence based on supplied configuration.protected Predicate<String>
resolveWhitelistBlacklistPredicate(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Get a predicate which operates according to the effective configured whitelist and blacklist policy.
-
-
-
Method Detail
-
lookupKeyInfoGenerator
@Nullable protected org.opensaml.xmlsec.keyinfo.KeyInfoGenerator lookupKeyInfoGenerator(@Nonnull org.opensaml.security.credential.Credential credential, @Nullable org.opensaml.xmlsec.keyinfo.NamedKeyInfoGeneratorManager manager, @Nullable String keyInfoProfileName)
Resolve aKeyInfoGenerator
instance based on aNamedKeyInfoGeneratorManager
,Credential
and optional KeyInfo generation profile name.- Parameters:
credential
- the credential for which a KeyInfo generator is neededmanager
- the named KeyInfo generator manager instancekeyInfoProfileName
- KeyInfo generation profile name- Returns:
- the resolved KeyInfo generator instance, or null
-
resolveAndPopulateWhiteAndBlacklists
protected void resolveAndPopulateWhiteAndBlacklists(@Nonnull org.opensaml.xmlsec.WhitelistBlacklistParameters params, @Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and populate the effective whitelist or blacklist on the supplied instance ofWhitelistBlacklistParameters
.- Parameters:
params
- the whitelist/blacklist parameters instance to populatecriteria
- the input criteria being evaluatedconfigs
- the effective list ofWhitelistBlacklistConfiguration
instances to consider
-
resolveWhitelistBlacklistPredicate
@Nonnull protected Predicate<String> resolveWhitelistBlacklistPredicate(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Get a predicate which operates according to the effective configured whitelist and blacklist policy.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofWhitelistBlacklistConfiguration
instances to consider- Returns:
- a predicate instance which operates accordingly to the effective whitelist and blacklist policy
-
resolveEffectiveBlacklist
@Nonnull protected Collection<String> resolveEffectiveBlacklist(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm blacklist based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofWhitelistBlacklistConfiguration
instances to consider- Returns:
- the effective algorithm blacklist
-
resolveEffectiveWhitelist
@Nonnull protected Collection<String> resolveEffectiveWhitelist(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm whitelist based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofWhitelistBlacklistConfiguration
instances to consider- Returns:
- the effective algorithm whitelist
-
resolveWhitelistBlacklistPrecedence
@Nonnull protected org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence resolveWhitelistBlacklistPrecedence(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends org.opensaml.xmlsec.WhitelistBlacklistConfiguration> configs)
Resolve and return the effective algorithm whitelist/blacklist precedence based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofWhitelistBlacklistConfiguration
instances to consider- Returns:
- the effective algorithm whitelist/blacklist precedence
-
-