Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.security.jassjacc
Class JassJaccSecurityAdapter  view JassJaccSecurityAdapter download JassJaccSecurityAdapter.java

java.lang.Object
  extended byorg.activemq.security.jassjacc.JassJaccSecurityAdapter
All Implemented Interfaces:
org.activemq.security.SecurityAdapter

public class JassJaccSecurityAdapter
extends java.lang.Object
implements org.activemq.security.SecurityAdapter

Implements SecurityAdapter that uses JASS to authenticate and JACC to authorize the user operations.

Version:
$Revision: 1.1.1.1 $

Field Summary
private  java.lang.String jassConfiguration
           
 
Constructor Summary
JassJaccSecurityAdapter(java.lang.String jassConfiguration)
           
 
Method Summary
 void authorizeConnection(org.activemq.broker.BrokerClient client, org.activemq.message.ConnectionInfo info)
          Authenticates the connection and authorizes it for use with this Message Broker
 void authorizeConsumer(org.activemq.broker.BrokerClient client, org.activemq.message.ConsumerInfo info)
          Authorizes that the consumer can start with the given consumer information
 void authorizeProducer(org.activemq.broker.BrokerClient client, org.activemq.message.ProducerInfo info)
          Authorizes that the prodcuer can start with the given producer information.
 boolean authorizeReceive(org.activemq.broker.BrokerClient client, org.activemq.message.ActiveMQMessage message)
          Returns true if the given client is authorized to receive the given message.
 void authorizeSendMessage(org.activemq.broker.BrokerClient client, org.activemq.message.ActiveMQMessage message)
          Authorizes on a per message basis whether or not the client is allowed to send the given message.
private  javax.security.auth.Subject doJassLogin(org.activemq.message.ConnectionInfo info)
           
protected  java.security.AccessControlContext getAccessControlContext(org.activemq.broker.BrokerClient client)
           
protected static java.lang.String getBrokerName(org.activemq.broker.BrokerClient client)
           
private static java.lang.String getBrokerPoicyContextId(org.activemq.broker.BrokerClient client)
           
private static java.lang.String getBrokerPolicyContextId(java.lang.String brokerName)
           
private static java.lang.String getDestinationPoicyContextId(org.activemq.broker.BrokerClient client, org.activemq.message.ActiveMQDestination destination)
           
private static java.lang.String getDestinationPoicyContextId(java.lang.String brokerName, org.activemq.message.ActiveMQDestination destination)
           
static void secure(BrokerSecurityConfig brokerSecurity)
          Creates a JACC PolicyConfiguration for the broker security.
static void secure(DestinationSecurityConfig destinationSecurity)
          Creates a JACC PolicyConfiguration for the broker security.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jassConfiguration

private java.lang.String jassConfiguration
Constructor Detail

JassJaccSecurityAdapter

public JassJaccSecurityAdapter(java.lang.String jassConfiguration)
Method Detail

getAccessControlContext

protected java.security.AccessControlContext getAccessControlContext(org.activemq.broker.BrokerClient client)

getBrokerName

protected static java.lang.String getBrokerName(org.activemq.broker.BrokerClient client)

authorizeConnection

public void authorizeConnection(org.activemq.broker.BrokerClient client,
                                org.activemq.message.ConnectionInfo info)
                         throws javax.jms.JMSException
Description copied from interface: org.activemq.security.SecurityAdapter
Authenticates the connection and authorizes it for use with this Message Broker

Specified by:
authorizeConnection in interface org.activemq.security.SecurityAdapter

getBrokerPoicyContextId

private static java.lang.String getBrokerPoicyContextId(org.activemq.broker.BrokerClient client)

getBrokerPolicyContextId

private static java.lang.String getBrokerPolicyContextId(java.lang.String brokerName)

doJassLogin

private javax.security.auth.Subject doJassLogin(org.activemq.message.ConnectionInfo info)
                                         throws javax.jms.JMSException

authorizeConsumer

public void authorizeConsumer(org.activemq.broker.BrokerClient client,
                              org.activemq.message.ConsumerInfo info)
                       throws javax.jms.JMSException
Description copied from interface: org.activemq.security.SecurityAdapter
Authorizes that the consumer can start with the given consumer information

Specified by:
authorizeConsumer in interface org.activemq.security.SecurityAdapter

authorizeReceive

public boolean authorizeReceive(org.activemq.broker.BrokerClient client,
                                org.activemq.message.ActiveMQMessage message)
Description copied from interface: org.activemq.security.SecurityAdapter
Returns true if the given client is authorized to receive the given message.

Specified by:
authorizeReceive in interface org.activemq.security.SecurityAdapter

getDestinationPoicyContextId

private static java.lang.String getDestinationPoicyContextId(org.activemq.broker.BrokerClient client,
                                                             org.activemq.message.ActiveMQDestination destination)

getDestinationPoicyContextId

private static java.lang.String getDestinationPoicyContextId(java.lang.String brokerName,
                                                             org.activemq.message.ActiveMQDestination destination)

authorizeProducer

public void authorizeProducer(org.activemq.broker.BrokerClient client,
                              org.activemq.message.ProducerInfo info)
                       throws javax.jms.JMSException
Description copied from interface: org.activemq.security.SecurityAdapter
Authorizes that the prodcuer can start with the given producer information. Note that the destination information may not be present at the start of the producer.

Specified by:
authorizeProducer in interface org.activemq.security.SecurityAdapter

authorizeSendMessage

public void authorizeSendMessage(org.activemq.broker.BrokerClient client,
                                 org.activemq.message.ActiveMQMessage message)
                          throws javax.jms.JMSException
Description copied from interface: org.activemq.security.SecurityAdapter
Authorizes on a per message basis whether or not the client is allowed to send the given message. The client may not have been authorized yet for this destination as a destination may not have been specified on the previous call to SecurityAdapter.authorizeProducer(org.activemq.broker.BrokerClient, org.activemq.message.ProducerInfo)>SecurityAdapter.authorizeProducer(org.activemq.broker.BrokerClient, org.activemq.message.ProducerInfo) 55

Specified by:
authorizeSendMessage in interface org.activemq.security.SecurityAdapter

secure

public static void secure(BrokerSecurityConfig brokerSecurity)
Creates a JACC PolicyConfiguration for the broker security.


secure

public static void secure(DestinationSecurityConfig destinationSecurity)
Creates a JACC PolicyConfiguration for the broker security.