Package org.opensaml.xmlsec.impl
Class BasicWhitelistBlacklistConfiguration
- java.lang.Object
-
- org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
-
- All Implemented Interfaces:
org.opensaml.xmlsec.WhitelistBlacklistConfiguration
- Direct Known Subclasses:
BasicDecryptionConfiguration,BasicEncryptionConfiguration,BasicSignatureSigningConfiguration,BasicSignatureValidationConfiguration
public class BasicWhitelistBlacklistConfiguration extends Object implements org.opensaml.xmlsec.WhitelistBlacklistConfiguration
Basic implementation ofWhitelistBlacklistConfiguration.The value returned by
getWhitelistBlacklistPrecedence()defaults toWhitelistBlacklistConfiguration.Precedence.WHITELIST.
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<String>blacklistBlacklisted algorithm URIs.private booleanblacklistMergeBlacklist merge flag.static org.opensaml.xmlsec.WhitelistBlacklistConfiguration.PrecedenceDEFAULT_PRECEDENCEDefault precedence.private org.opensaml.xmlsec.WhitelistBlacklistConfiguration.PrecedenceprecedencePrecedence flag.private Collection<String>whitelistWhitelisted algorithm URIs.private booleanwhitelistMergeWhitelist merge flag.
-
Constructor Summary
Constructors Constructor Description BasicWhitelistBlacklistConfiguration()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getBlacklistedAlgorithms()Get the list of blacklisted algorithm URI's.org.opensaml.xmlsec.WhitelistBlacklistConfiguration.PrecedencegetWhitelistBlacklistPrecedence()Collection<String>getWhitelistedAlgorithms()Get the list of whitelisted algorithm URI's.booleanisBlacklistMerge()booleanisWhitelistMerge()voidsetBlacklistedAlgorithms(Collection<String> uris)Set the list of blacklisted algorithm URI's.voidsetBlacklistMerge(boolean flag)Set the flag indicating whether to merge this configuration's blacklist with one of a lower order of precedence, or to treat this blacklist as authoritative.voidsetWhitelistBlacklistPrecedence(org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence value)Set preference value indicating which should take precedence when both whitelist and blacklist are non-empty.voidsetWhitelistedAlgorithms(Collection<String> uris)Set the list of whitelisted algorithm URI's.voidsetWhitelistMerge(boolean flag)Set the flag indicating whether to merge this configuration's whitelist with one of a lower order of precedence, or to treat this whitelist as authoritative.
-
-
-
Field Detail
-
DEFAULT_PRECEDENCE
public static final org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence DEFAULT_PRECEDENCE
Default precedence.
-
whitelist
private Collection<String> whitelist
Whitelisted algorithm URIs.
-
whitelistMerge
private boolean whitelistMerge
Whitelist merge flag.
-
blacklist
private Collection<String> blacklist
Blacklisted algorithm URIs.
-
blacklistMerge
private boolean blacklistMerge
Blacklist merge flag.
-
precedence
private org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence precedence
Precedence flag.
-
-
Method Detail
-
getWhitelistedAlgorithms
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getWhitelistedAlgorithms()
Get the list of whitelisted algorithm URI's.- Specified by:
getWhitelistedAlgorithmsin interfaceorg.opensaml.xmlsec.WhitelistBlacklistConfiguration- Returns:
- the list of algorithms
-
setWhitelistedAlgorithms
public void setWhitelistedAlgorithms(@Nullable Collection<String> uris)Set the list of whitelisted algorithm URI's.- Parameters:
uris- the list of algorithms
-
isWhitelistMerge
public boolean isWhitelistMerge()
Defaults to:
false.- Specified by:
isWhitelistMergein interfaceorg.opensaml.xmlsec.WhitelistBlacklistConfiguration
-
setWhitelistMerge
public void setWhitelistMerge(boolean flag)
Set the flag indicating whether to merge this configuration's whitelist with one of a lower order of precedence, or to treat this whitelist as authoritative.Defaults to:
false- Parameters:
flag- true if should merge, false otherwise
-
getBlacklistedAlgorithms
@Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<String> getBlacklistedAlgorithms()
Get the list of blacklisted algorithm URI's.- Specified by:
getBlacklistedAlgorithmsin interfaceorg.opensaml.xmlsec.WhitelistBlacklistConfiguration- Returns:
- the list of algorithms
-
setBlacklistedAlgorithms
public void setBlacklistedAlgorithms(@Nullable Collection<String> uris)Set the list of blacklisted algorithm URI's.- Parameters:
uris- the list of algorithms
-
isBlacklistMerge
public boolean isBlacklistMerge()
Defaults to:
true.- Specified by:
isBlacklistMergein interfaceorg.opensaml.xmlsec.WhitelistBlacklistConfiguration
-
setBlacklistMerge
public void setBlacklistMerge(boolean flag)
Set the flag indicating whether to merge this configuration's blacklist with one of a lower order of precedence, or to treat this blacklist as authoritative.Defaults to:
true- Parameters:
flag- true if should merge, false otherwise
-
getWhitelistBlacklistPrecedence
@Nonnull public org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence getWhitelistBlacklistPrecedence()
- Specified by:
getWhitelistBlacklistPrecedencein interfaceorg.opensaml.xmlsec.WhitelistBlacklistConfiguration
-
setWhitelistBlacklistPrecedence
public void setWhitelistBlacklistPrecedence(@Nonnull org.opensaml.xmlsec.WhitelistBlacklistConfiguration.Precedence value)Set preference value indicating which should take precedence when both whitelist and blacklist are non-empty.- Parameters:
value- the precedence value
-
-