|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.broker.BrokerFilter
org.apache.activemq.security.JaasDualAuthenticationBroker
public class JaasDualAuthenticationBroker
A JAAS Authentication Broker that uses different JAAS domain configurations depending if the connection is over an SSL enabled Connector or not. This allows you to, for instance, do DN based authentication for SSL connections and use a mixture of username/passwords and simple guest authentication for non-SSL connections.
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";
};
| Field Summary |
|---|
| Fields inherited from class org.apache.activemq.broker.BrokerFilter |
|---|
next |
| Constructor Summary | |
|---|---|
JaasDualAuthenticationBroker(Broker next,
String jaasConfiguration,
String jaasSslConfiguration)
Simple constructor. |
|
| Method Summary | |
|---|---|
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,
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JaasDualAuthenticationBroker(Broker next,
String jaasConfiguration,
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).| Method Detail |
|---|
public void addConnection(ConnectionContext context,
ConnectionInfo info)
throws Exception
addConnection in interface BrokeraddConnection in class BrokerFiltercontext - The context for the incoming Connection.info - The ConnectionInfo Command representing the incoming
connection.
Exception - TODO
public void removeConnection(ConnectionContext context,
ConnectionInfo info,
Throwable error)
throws 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.
Exception - TODO
public void removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
throws Exception
Region
removeDestination 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 quiesce
Exception - TODO
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||