public abstract class ConfigModelPasswordManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>> extends AbstractAuthenticationManager<X> implements PasswordCredentialManagingAuthenticationProvider<X>, PreferencesSupportingAuthenticationProvider
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
Modifier and Type | Field and Description |
---|---|
protected Map<String,org.apache.qpid.server.security.auth.manager.ManagedUser> |
_users |
SECURED_STRING_VALUE
CONTEXT, CREATED_BY, CREATED_TIME, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
Modifier | Constructor and Description |
---|---|
protected |
ConfigModelPasswordManagingAuthenticationProvider(Map<String,Object> attributes,
Broker broker) |
Modifier and Type | Method and Description |
---|---|
<C extends ConfiguredObject> |
addChildAsync(Class<C> childClass,
Map<String,Object> attributes,
ConfiguredObject... otherParents) |
AuthenticationResult |
authenticate(SaslServer server,
byte[] response)
Authenticates a user using SASL negotiation.
|
protected abstract String |
createStoredPassword(String password) |
boolean |
createUser(String username,
String password,
Map<String,String> attributes) |
void |
deleteUser(String user) |
protected SecurityManager |
getSecurityManager() |
Map<String,Map<String,String>> |
getUsers() |
void |
recoverUser(User user) |
void |
reload()
Refreshes the cache of user and password data from the underlying storage.
|
void |
setPassword(String username,
String password) |
activate, doDelete, getBroker, getDisabledMechanisms, getPreferencesProvider, getSecureOnlyMechanisms, getSubjectCreator, getVirtualHostPortBindings, onOpen, onValidate, setPreferencesProvider, startQuiesced
addChangeListener, applyToChildren, asObjectRecord, attainState, attributeSet, authoriseCreate, authoriseCreateChild, authoriseDelete, authoriseSetAttributes, beforeClose, changeAttribute, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleted, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getActualAttributes, 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, getTaskExecutor, getType, getTypeClass, handleExceptionOnOpen, isDurable, managesChildStorage, notifyStateChanged, onClose, onCreate, onExceptionInOpen, onResolve, open, openAsync, parentsMap, postResolve, postResolveChildren, registerWithParents, removeChangeListener, rethrowRuntimeExceptionsOnOpen, runTask, setAttribute, setAttributes, setAttributesAsync, setEncrypter, setState, start, startAsync, stop, toString, validateChange, validateOnCreate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
authenticate
createSaslServer, getDisabledMechanisms, getMechanisms, getPreferencesProvider, getSecureOnlyMechanisms, getSubjectCreator, getVirtualHostPortBindings, setPreferencesProvider
addChangeListener, asObjectRecord, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, 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, getTaskExecutor, getType, getTypeClass, isDurable, managesChildStorage, open, openAsync, removeChangeListener, setAttribute, setAttributes, setAttributesAsync
getPreferencesProvider, setPreferencesProvider
public boolean createUser(String username, String password, Map<String,String> attributes)
createUser
in interface PasswordCredentialManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
protected SecurityManager getSecurityManager()
getSecurityManager
in class AbstractConfiguredObject<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
public void deleteUser(String user) throws AccountNotFoundException
deleteUser
in interface PasswordCredentialManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
AccountNotFoundException
public Map<String,Map<String,String>> getUsers()
getUsers
in interface PasswordCredentialManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
public void reload() throws IOException
PasswordCredentialManagingAuthenticationProvider
IOException
and revert to using the previous cached username
and password data. In this way, the broker will remain usable.reload
in interface PasswordCredentialManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
IOException
public void recoverUser(User user)
recoverUser
in interface AuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
recoverUser
in class AbstractAuthenticationManager<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
public void setPassword(String username, String password) throws AccountNotFoundException
setPassword
in interface PasswordCredentialManagingAuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
AccountNotFoundException
public AuthenticationResult authenticate(SaslServer server, byte[] response)
AuthenticationProvider
authenticate
in interface AuthenticationProvider<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
server
- SASL serverresponse
- SASL response to processpublic <C extends ConfiguredObject> com.google.common.util.concurrent.ListenableFuture<C> addChildAsync(Class<C> childClass, Map<String,Object> attributes, ConfiguredObject... otherParents)
addChildAsync
in class AbstractAuthenticationManager<X extends ConfigModelPasswordManagingAuthenticationProvider<X>>
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.