public class JaasDualAuthenticationBroker extends BrokerFilter
An example login.config to do do this is:
activemq-domain {
org.apache.activemq.jaas.PropertiesLoginModule sufficient
debug=true
org.apache.activemq.jaas.properties.user="users.properties"
org.apache.activemq.jaas.properties.group="groups.properties";
org.apache.activemq.jaas.GuestLoginModule sufficient
debug=true
org.apache.activemq.jaas.guest.user="guest"
org.apache.activemq.jaas.guest.group="guests";
};
activemq-ssl-domain {
org.apache.activemq.jaas.TextFileCertificateLoginModule required
debug=true
org.apache.activemq.jaas.textfiledn.user="dns.properties"
org.apache.activemq.jaas.textfiledn.group="groups.properties";
};
next| Constructor and Description |
|---|
JaasDualAuthenticationBroker(Broker next,
java.lang.String jaasConfiguration,
java.lang.String jaasSslConfiguration)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnection(ConnectionContext context,
ConnectionInfo info)
Overridden to allow for authentication using different Jaas
configurations depending on if the connection is SSL or not.
|
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
Overriding removeConnection to make sure the security context is cleaned.
|
void |
removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
Used to destroy a destination.
|
acknowledge, addBroker, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, 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, stoppublic JaasDualAuthenticationBroker(Broker next, java.lang.String jaasConfiguration, java.lang.String jaasSslConfiguration)
next - The Broker that does the actual work for this Filter.jaasConfiguration - The JAAS domain configuration name for
non-SSL connections (refer to JAAS documentation).jaasSslConfiguration - The JAAS domain configuration name for
SSL connections (refer to JAAS documentation).public void addConnection(ConnectionContext context, ConnectionInfo info) throws java.lang.Exception
addConnection in interface BrokeraddConnection in class BrokerFiltercontext - The context for the incoming Connection.info - The ConnectionInfo Command representing the incoming
connection.java.lang.Exception - TODOpublic void removeConnection(ConnectionContext context, ConnectionInfo info, java.lang.Throwable error) throws java.lang.Exception
removeConnection in interface BrokerremoveConnection in class BrokerFiltercontext - the environment the operation is being executed under.error - null if the client requested the disconnect or the error
that caused the client to disconnect.java.lang.Exception - TODOpublic void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws java.lang.Exception
RegionremoveDestination in interface RegionremoveDestination in class BrokerFiltercontext - the environment the operation is being executed under.destination - what is being removed from the broker.timeout - the max amount of time to wait for the destination to quiescejava.lang.Exception - TODOCopyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.