Class AbstractScramAuthenticationManager<X extends AbstractScramAuthenticationManager<X>>
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<T>
-
- org.apache.qpid.server.security.auth.manager.AbstractAuthenticationManager<X>
-
- org.apache.qpid.server.security.auth.manager.ConfigModelPasswordManagingAuthenticationProvider<X>
-
- org.apache.qpid.server.security.auth.manager.AbstractScramAuthenticationManager<X>
-
- All Implemented Interfaces:
EventLoggerProvider
,AuthenticationProvider<X>
,ConfiguredObject<X>
,ContextProvider
,ManagedInterface
,PasswordCredentialManagingAuthenticationProvider<X>
,PermissionedObject
,TaskExecutorProvider
,UsernamePasswordAuthenticationProvider<X>
,ScramSaslServerSource
- Direct Known Subclasses:
ScramSHA1AuthenticationManager
,ScramSHA256AuthenticationManager
public abstract class AbstractScramAuthenticationManager<X extends AbstractScramAuthenticationManager<X>> extends ConfigModelPasswordManagingAuthenticationProvider<X> implements PasswordCredentialManagingAuthenticationProvider<X>, ScramSaslServerSource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
-
Nested classes/interfaces inherited from interface org.apache.qpid.server.security.auth.sasl.scram.ScramSaslServerSource
ScramSaslServerSource.SaltAndPasswordKeys
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ITERATION_COUNT
static String
PLAIN
static String
QPID_AUTHMANAGER_SCRAM_ITERATION_COUNT
-
Fields inherited from class org.apache.qpid.server.security.auth.manager.ConfigModelPasswordManagingAuthenticationProvider
_users
-
Fields inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
Fields inherited from interface org.apache.qpid.server.model.ConfiguredObject
AWAIT_ATTAINMENT_TIMEOUT, CONTEXT, CREATED_BY, CREATED_TIME, DEFAULT_AWAIT_ATTAINMENT_TIMEOUT, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractScramAuthenticationManager(Map<String,Object> attributes, Broker broker)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected com.google.common.util.concurrent.ListenableFuture<Void>
activate()
AuthenticationResult
authenticate(String username, String password)
Authenticates a user using their username and password.SaslNegotiator
createSaslNegotiator(String mechanism, SaslSettings saslSettings, NamedAddressSpace addressSpace)
protected String
createStoredPassword(String password)
int
getIterationCount()
protected abstract String
getMechanismName()
List<String>
getMechanisms()
Gets the SASL mechanisms known to this manager.ScramSaslServerSource.SaltAndPasswordKeys
getSaltAndPasswordKeys(String username)
-
Methods inherited from class org.apache.qpid.server.security.auth.manager.ConfigModelPasswordManagingAuthenticationProvider
addChildAsync, createUser, deleteUser, getPasswordSource, getSupportedUserTypes, getUser, getUsers, reload, setPassword
-
Methods inherited from class org.apache.qpid.server.security.auth.manager.AbstractAuthenticationManager
getAvailableMechanisms, getDisabledMechanisms, getEventLogger, getSecureOnlyMechanisms, logCreated, logDeleted, logOperation, logRecovered, logUpdated, onValidate, startQuiesced
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeClose, beforeDelete, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleteChildren, deleteNoChecks, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getAccessControl, getActualAttributes, getAncestor, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getSubjectWithAddedSystemRights, getSystemPrincipal, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, managesChildStorage, newToken, notifyStateChanged, onClose, onCreate, onDelete, onExceptionInOpen, onOpen, onResolve, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, toString, updateModel, validateChange, validateChildDelete, validateOnCreate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.model.AuthenticationProvider
getAvailableMechanisms, getDisabledMechanisms, getSecureOnlyMechanisms
-
Methods inherited from interface org.apache.qpid.server.model.ConfiguredObject
addChangeListener, asObjectRecord, authorise, authorise, authorise, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getType, getTypeClass, getUserPreferences, hasEncrypter, isDurable, managesChildStorage, newToken, open, openAsync, removeChangeListener, removeContextVariable, setAttributes, setAttributesAsync, setContextVariable, setUserPreferences
-
Methods inherited from interface org.apache.qpid.server.model.ContextProvider
getContextKeys, getContextValue, getContextValue
-
Methods inherited from interface org.apache.qpid.server.logging.EventLoggerProvider
getEventLogger
-
Methods inherited from interface org.apache.qpid.server.model.PasswordCredentialManagingAuthenticationProvider
createUser, deleteUser, getUsers, reload, setPassword
-
Methods inherited from interface org.apache.qpid.server.security.auth.sasl.scram.ScramSaslServerSource
getDigestName, getHmacName
-
Methods inherited from interface org.apache.qpid.server.model.TaskExecutorProvider
getTaskExecutor
-
-
-
-
Field Detail
-
PLAIN
public static final String PLAIN
- See Also:
- Constant Field Values
-
QPID_AUTHMANAGER_SCRAM_ITERATION_COUNT
public static final String QPID_AUTHMANAGER_SCRAM_ITERATION_COUNT
- See Also:
- Constant Field Values
-
DEFAULT_ITERATION_COUNT
public static final int DEFAULT_ITERATION_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
protected com.google.common.util.concurrent.ListenableFuture<Void> activate()
- Overrides:
activate
in classAbstractAuthenticationManager<X extends AbstractScramAuthenticationManager<X>>
-
getMechanisms
public List<String> getMechanisms()
Description copied from interface:AuthenticationProvider
Gets the SASL mechanisms known to this manager.- Specified by:
getMechanisms
in interfaceAuthenticationProvider<X extends AbstractScramAuthenticationManager<X>>
- Returns:
- SASL mechanism names, space separated.
-
getMechanismName
protected abstract String getMechanismName()
-
createSaslNegotiator
public SaslNegotiator createSaslNegotiator(String mechanism, SaslSettings saslSettings, NamedAddressSpace addressSpace)
- Specified by:
createSaslNegotiator
in interfaceAuthenticationProvider<X extends AbstractScramAuthenticationManager<X>>
-
authenticate
public AuthenticationResult authenticate(String username, String password)
Description copied from interface:UsernamePasswordAuthenticationProvider
Authenticates a user using their username and password.- Specified by:
authenticate
in interfaceUsernamePasswordAuthenticationProvider<X extends AbstractScramAuthenticationManager<X>>
- Parameters:
username
- usernamepassword
- password- Returns:
- authentication result
-
getIterationCount
public int getIterationCount()
- Specified by:
getIterationCount
in interfaceScramSaslServerSource
-
createStoredPassword
protected String createStoredPassword(String password)
- Specified by:
createStoredPassword
in classConfigModelPasswordManagingAuthenticationProvider<X extends AbstractScramAuthenticationManager<X>>
-
getSaltAndPasswordKeys
public ScramSaslServerSource.SaltAndPasswordKeys getSaltAndPasswordKeys(String username)
- Specified by:
getSaltAndPasswordKeys
in interfaceScramSaslServerSource
-
-