Package org.wildfly.security.sasl.util
Class AbstractSaslFactory
java.lang.Object
org.wildfly.security.sasl.util.AbstractSaslFactory
- Direct Known Subclasses:
AbstractAnonymousFactory,GssapiClientFactory,GssapiServerFactory,LocalUserSaslFactory
Abstract SASL factory base class.
- Author:
- David M. Lloyd
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSaslFactory(String name) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionString[]getMechanismNames(Map<String, ?> props) Get the mechanism names matching the given properties.protected booleangetPropertyValue(String property, Map<String, ?> props, boolean defaultValue) Get a boolean property value from the properties map.protected booleanDetermine whether the mechanism is susceptible to active attack.protected booleanDetermine whether the algorithm is anonymous.protected booleanDetermine whether the mechanism is susceptible to dictionary (passive) attacks.protected booleanDetermine whether forward secrecy is implemented.protected booleanisIncluded(String... names) Determine whether our mechanism name is among those given.protected booleanDetermine whether the mechanism passes client credentials.protected booleanDetermine whether the algorithm employs plain text.protected booleanDetermine whether the properties match this mechanism.
-
Constructor Details
-
AbstractSaslFactory
Construct a new instance.- Parameters:
name- the mechanism name
-
-
Method Details
-
getMechanismNames
Get the mechanism names matching the given properties.- Parameters:
props- the properties- Returns:
- the mechanism names
-
matches
Determine whether the properties match this mechanism.- Parameters:
props- the propertiesquery- is this call querying names? Or creating the mechanism.- Returns:
trueif there is a match,falseotherwise
-
isPassCredentials
protected boolean isPassCredentials()Determine whether the mechanism passes client credentials.- Returns:
trueif it does (default isfalse)
-
isDictionarySusceptible
protected boolean isDictionarySusceptible()Determine whether the mechanism is susceptible to dictionary (passive) attacks.- Returns:
trueif it is (default istrue)
-
isActiveSusceptible
protected boolean isActiveSusceptible()Determine whether the mechanism is susceptible to active attack.- Returns:
trueif it is (default istrue)
-
isForwardSecrecy
protected boolean isForwardSecrecy()Determine whether forward secrecy is implemented.- Returns:
trueif it is (default isfalse)
-
isPlainText
protected boolean isPlainText()Determine whether the algorithm employs plain text.- Returns:
trueif it does so (default istrue)
-
isAnonymous
protected boolean isAnonymous()Determine whether the algorithm is anonymous.- Returns:
trueif it is (default istrue)
-
getPropertyValue
Get a boolean property value from the properties map.- Parameters:
property- the property nameprops- the properties mapdefaultValue- the default value- Returns:
- the value
-
isIncluded
Determine whether our mechanism name is among those given.- Parameters:
names- the names- Returns:
trueif the names include our mechanism
-