Package org.apache.activemq.security
Class AuthorizationBroker
java.lang.Object
org.apache.activemq.broker.BrokerFilter
org.apache.activemq.security.AuthorizationBroker
- All Implemented Interfaces:
Broker,Region,SecurityAdminMBean,org.apache.activemq.Service
Verifies if a authenticated user can do an operation against the broker using
an authorization map.
-
Field Summary
Fields inherited from class org.apache.activemq.broker.BrokerFilter
nextFields inherited from interface org.apache.activemq.security.SecurityAdminMBean
OPERATION_ADMIN, OPERATION_READ, OPERATION_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) Adds a consumer.addDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, boolean create) Used to create a destination.voidaddDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) Add and process a DestinationInfo objectvoidaddDestinationRole(jakarta.jms.Destination destination, String operation, String role) voidaddProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) Adds a producer.voidaddQueueRole(String queue, String operation, String role) voidvoidaddTopicRole(String topic, String operation, String role) voidaddUserRole(String user, String role) protected booleancheckDestinationAdmin(SecurityContext securityContext, org.apache.activemq.command.ActiveMQDestination destination) protected SecurityContextcheckSecurityContext(ConnectionContext context) voidremoveDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, long timeout) Used to destroy a destination.voidremoveDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) Remove and process a DestinationInfo objectvoidremoveDestinationRole(jakarta.jms.Destination destination, String operation, String role) voidremoveQueueRole(String queue, String operation, String role) voidremoveRole(String role) voidremoveTopicRole(String topic, String operation, String role) voidremoveUserRole(String user, String role) voidsend(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) Send a message to the broker to using the specified destination.voidMethods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, 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, messageDispatched, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConnection, removeConsumer, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, start, stop, virtualDestinationAdded, virtualDestinationRemoved
-
Constructor Details
-
AuthorizationBroker
-
-
Method Details
-
getAuthorizationMap
-
setAuthorizationMap
-
checkSecurityContext
- Throws:
SecurityException
-
checkDestinationAdmin
protected boolean checkDestinationAdmin(SecurityContext securityContext, org.apache.activemq.command.ActiveMQDestination destination) -
addDestinationInfo
public void addDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception Description copied from interface:BrokerAdd and process a DestinationInfo object- Specified by:
addDestinationInfoin interfaceBroker- Overrides:
addDestinationInfoin classBrokerFilter- Parameters:
context- connection contextinfo- destination info- Throws:
Exception- TODO
-
addDestination
public Destination addDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, boolean create) throws Exception Description copied from interface:RegionUsed to create a destination. Usually, this method is invoked as a side-effect of sending a message to a destination that does not exist yet.- Specified by:
addDestinationin interfaceRegion- Overrides:
addDestinationin classBrokerFilterdestination- the destination to create.- Returns:
- TODO
- Throws:
Exception- TODO
-
removeDestination
public void removeDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, long timeout) throws Exception Description copied from interface:RegionUsed to destroy a destination. This should try to quiesce use of the destination up to the timeout allotted time before removing the destination. This will remove all persistent messages associated with the destination.- Specified by:
removeDestinationin interfaceRegion- Overrides:
removeDestinationin classBrokerFilter- Parameters:
context- 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 quiesce- Throws:
Exception- TODO
-
removeDestinationInfo
public void removeDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception Description copied from interface:BrokerRemove and process a DestinationInfo object- Specified by:
removeDestinationInfoin interfaceBroker- Overrides:
removeDestinationInfoin classBrokerFilter- Parameters:
context- connection contextinfo- destination info- Throws:
Exception- TODO
-
addConsumer
public Subscription addConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws Exception Description copied from interface:RegionAdds a consumer.- Specified by:
addConsumerin interfaceRegion- Overrides:
addConsumerin classBrokerFilter- Parameters:
context- the environment the operation is being executed under.- Returns:
- TODO
- Throws:
Exception- TODO
-
addProducer
public void addProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception Description copied from interface:BrokerAdds a producer.- Specified by:
addProducerin interfaceBroker- Specified by:
addProducerin interfaceRegion- Overrides:
addProducerin classBrokerFilter- Parameters:
context- the environment the operation is being executed under.- Throws:
Exception- TODO
-
send
public void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) throws Exception Description copied from interface:RegionSend a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.- Specified by:
sendin interfaceRegion- Overrides:
sendin classBrokerFilter- Parameters:
producerExchange- the environment the operation is being executed under.- Throws:
Exception- TODO
-
addQueueRole
- Specified by:
addQueueRolein interfaceSecurityAdminMBean
-
addTopicRole
- Specified by:
addTopicRolein interfaceSecurityAdminMBean
-
removeQueueRole
- Specified by:
removeQueueRolein interfaceSecurityAdminMBean
-
removeTopicRole
- Specified by:
removeTopicRolein interfaceSecurityAdminMBean
-
addDestinationRole
-
removeDestinationRole
-
addRole
- Specified by:
addRolein interfaceSecurityAdminMBean
-
addUserRole
- Specified by:
addUserRolein interfaceSecurityAdminMBean
-
removeRole
- Specified by:
removeRolein interfaceSecurityAdminMBean
-
removeUserRole
- Specified by:
removeUserRolein interfaceSecurityAdminMBean
-