public class SubjectFilter extends EnvironmentFilter
SubjectFilter ensures a Shiro Subject representing the client's identity is associated with
every connection to the ActiveMQ Broker. The Subject is made available to downstream broker filters so
they may perform security checks as necessary.
This implementation does not perform any security checks/assertions itself. It is expected that other broker filters
will be configured after this one and those will perform any security behavior or checks as necessary.next| Constructor and Description |
|---|
SubjectFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnection(ConnectionContext context,
org.apache.activemq.command.ConnectionInfo info)
Creates a
Subject instance reflecting the specified Connection. |
protected SecurityContext |
createSecurityContext(SubjectConnectionReference conn) |
protected org.apache.shiro.subject.Subject |
createSubject(ConnectionReference conn) |
ConnectionSubjectFactory |
getConnectionSubjectFactory() |
SecurityContextFactory |
getSecurityContextFactory() |
void |
removeConnection(ConnectionContext context,
org.apache.activemq.command.ConnectionInfo info,
Throwable error) |
void |
setConnectionSubjectFactory(ConnectionSubjectFactory connectionSubjectFactory) |
void |
setSecurityContextFactory(SecurityContextFactory securityContextFactory) |
getEnvironment, setEnvironmentisEnabled, setEnabledacknowledge, 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, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, send, sendToDeadLetterQueue, setAdminConnectionContext, setNext, slowConsumer, start, stoppublic SubjectFilter()
public ConnectionSubjectFactory getConnectionSubjectFactory()
public void setConnectionSubjectFactory(ConnectionSubjectFactory connectionSubjectFactory)
public SecurityContextFactory getSecurityContextFactory()
public void setSecurityContextFactory(SecurityContextFactory securityContextFactory)
protected org.apache.shiro.subject.Subject createSubject(ConnectionReference conn)
protected SecurityContext createSecurityContext(SubjectConnectionReference conn)
public void addConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info) throws Exception
Subject instance reflecting the specified Connection. The Subject is then stored in
a SecurityContext instance which is set as the Connection's
securityContext.addConnection in interface BrokeraddConnection in class MutableBrokerFiltercontext - state associated with the client's connectioninfo - info about the client's connectionException - if there is a problem creating a Subject or SecurityContext instance.public void removeConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info, Throwable error) throws Exception
removeConnection in interface BrokerremoveConnection in class MutableBrokerFilterExceptionCopyright © 2005–2016 FuseSource, Corp.. All rights reserved.