Package org.opensaml.xmlsec.impl
Class BasicWhitelistBlacklistConfiguration
- java.lang.Object
-
- org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
-
- All Implemented Interfaces:
WhitelistBlacklistConfiguration
- Direct Known Subclasses:
BasicDecryptionConfiguration,BasicEncryptionConfiguration,BasicSignatureSigningConfiguration,BasicSignatureValidationConfiguration
public class BasicWhitelistBlacklistConfiguration extends Object implements WhitelistBlacklistConfiguration
Basic implementation ofWhitelistBlacklistConfiguration.The value returned by
getWhitelistBlacklistPrecedence()defaults toWhitelistBlacklistConfiguration.Precedence.WHITELIST.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.WhitelistBlacklistConfiguration
WhitelistBlacklistConfiguration.Precedence
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<String>blacklistBlacklisted algorithm URIs.private booleanblacklistMergeBlacklist merge flag.static WhitelistBlacklistConfiguration.PrecedenceDEFAULT_PRECEDENCEDefault precedence.private 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.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(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 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 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 interfaceWhitelistBlacklistConfiguration- 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 interfaceWhitelistBlacklistConfiguration
-
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 interfaceWhitelistBlacklistConfiguration- 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 interfaceWhitelistBlacklistConfiguration
-
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 WhitelistBlacklistConfiguration.Precedence getWhitelistBlacklistPrecedence()
- Specified by:
getWhitelistBlacklistPrecedencein interfaceWhitelistBlacklistConfiguration
-
setWhitelistBlacklistPrecedence
public void setWhitelistBlacklistPrecedence(@Nonnull WhitelistBlacklistConfiguration.Precedence value)Set preference value indicating which should take precedence when both whitelist and blacklist are non-empty.- Parameters:
value- the precedence value
-
-