org.apache.activemq.security
Class JaasCertificateAuthenticationBroker
java.lang.Object
org.apache.activemq.broker.BrokerFilter
org.apache.activemq.security.JaasCertificateAuthenticationBroker
- All Implemented Interfaces:
- Broker, Region, Service
public class JaasCertificateAuthenticationBroker
- extends BrokerFilter
A JAAS Authentication Broker that uses SSL Certificates.
This class will provide the JAAS framework with a JaasCertificateCallbackHandler that will grant JAAS access to
incoming connections' SSL certificate chains.
NOTE: There is a chance that the incoming connection does not have a valid certificate (has null).
- Author:
- sepandm@gmail.com (Sepand)
Methods inherited from class org.apache.activemq.broker.BrokerFilter |
acknowledge, addBroker, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, commitTransaction, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getPeerBrokerInfos, getPendingDurableSubscriberPolicy, getPreparedTransactions, getTempDataStore, isFaultTolerantConfiguration, isSlaveBroker, isStopped, messagePull, prepareTransaction, processDispatch, processDispatchNotification, removeBroker, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, send, setAdminConnectionContext, setPendingDurableSubscriberPolicy, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaasCertificateAuthenticationBroker
public JaasCertificateAuthenticationBroker(Broker next,
java.lang.String jaasConfiguration)
- Simple constructor. Leaves everything to superclass.
- Parameters:
next
- The Broker that does the actual work for this Filter.jassConfiguration
- The JAAS domain configuration name (refere to JAAS documentation).
addConnection
public void addConnection(ConnectionContext context,
ConnectionInfo info)
throws java.lang.Exception
- Overridden to allow for authentication based on client certificates.
Connections being added will be authenticated based on their certificate chain and the JAAS module specified
through the JAAS framework.
NOTE: The security context's username will be set to the first UserPrincipal created by the login module.
- Specified by:
addConnection
in interface Broker
- Overrides:
addConnection
in class BrokerFilter
- Parameters:
context
- The context for the incoming Connection.info
- The ConnectionInfo Command representing the incoming connection.
- Throws:
java.lang.Exception
- TODO
removeConnection
public void removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
throws java.lang.Exception
- Overriding removeConnection to make sure the security context is cleaned.
- Specified by:
removeConnection
in interface Broker
- Overrides:
removeConnection
in class BrokerFilter
- Parameters:
context
- 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.
- Throws:
java.lang.Exception
- TODO
Copyright © 2009 Apache Software Foundation. All Rights Reserved.