Package org.apache.activemq.security
Class SimpleAuthenticationBroker
- java.lang.Object
-
- org.apache.activemq.broker.BrokerFilter
-
- org.apache.activemq.security.AbstractAuthenticationBroker
-
- org.apache.activemq.security.SimpleAuthenticationBroker
-
- All Implemented Interfaces:
Broker
,Region
,AuthenticationBroker
,Service
public class SimpleAuthenticationBroker extends AbstractAuthenticationBroker
Handles authenticating a users against a simple user name/password map.
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.security.AbstractAuthenticationBroker
securityContexts
-
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnection(ConnectionContext context, ConnectionInfo info)
A client is establishing a connection with the broker.SecurityContext
authenticate(String username, String password, X509Certificate[] certificates)
Authenticate the given user using the mechanism provided by this service.void
setAnonymousAccessAllowed(boolean anonymousAccessAllowed)
void
setAnonymousGroup(String anonymousGroup)
void
setAnonymousUser(String anonymousUser)
void
setUserGroups(Map<String,Set<Principal>> value)
void
setUserPasswords(Map<String,String> value)
-
Methods inherited from class org.apache.activemq.security.AbstractAuthenticationBroker
refresh, removeConnection, removeDestination
-
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getNext, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConsumer, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, send, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, start, stop, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Method Detail
-
setAnonymousAccessAllowed
public void setAnonymousAccessAllowed(boolean anonymousAccessAllowed)
-
setAnonymousUser
public void setAnonymousUser(String anonymousUser)
-
setAnonymousGroup
public void setAnonymousGroup(String anonymousGroup)
-
addConnection
public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception
Description copied from interface:Broker
A client is establishing a connection with the broker.- Specified by:
addConnection
in interfaceBroker
- Overrides:
addConnection
in classBrokerFilter
- Throws:
Exception
- TODO
-
authenticate
public SecurityContext authenticate(String username, String password, X509Certificate[] certificates) throws SecurityException
Description copied from interface:AuthenticationBroker
Authenticate the given user using the mechanism provided by this service.- Parameters:
username
- the given user name to authenticate, null indicates an anonymous user.password
- the given password for the user to authenticate.certificates
- for an SSL channel the certificates from remote peer.- Returns:
- a new SecurityContext for the authenticated user.
- Throws:
SecurityException
- if the user cannot be authenticated.
-
-