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>
blacklist
Blacklisted algorithm URIs.private boolean
blacklistMerge
Blacklist merge flag.static WhitelistBlacklistConfiguration.Precedence
DEFAULT_PRECEDENCE
Default precedence.private WhitelistBlacklistConfiguration.Precedence
precedence
Precedence flag.private Collection<String>
whitelist
Whitelisted algorithm URIs.private boolean
whitelistMerge
Whitelist 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.Precedence
getWhitelistBlacklistPrecedence()
Collection<String>
getWhitelistedAlgorithms()
Get the list of whitelisted algorithm URI's.boolean
isBlacklistMerge()
boolean
isWhitelistMerge()
void
setBlacklistedAlgorithms(Collection<String> uris)
Set the list of blacklisted algorithm URI's.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.void
setWhitelistBlacklistPrecedence(WhitelistBlacklistConfiguration.Precedence value)
Set preference value indicating which should take precedence when both whitelist and blacklist are non-empty.void
setWhitelistedAlgorithms(Collection<String> uris)
Set the list of whitelisted algorithm URI's.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.
-
-
-
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:
getWhitelistedAlgorithms
in 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:
isWhitelistMerge
in 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:
getBlacklistedAlgorithms
in 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:
isBlacklistMerge
in 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:
getWhitelistBlacklistPrecedence
in 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
-
-