You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by RonK <ro...@wincor-nixdorf.com> on 2011/12/01 18:20:31 UTC

Re: Per-transportconnector authentication

I tried to implement a transportconnector-specific authenticator, but I
failed miserably.

My problem is, that the ConnectionContext contains a connector which is
vm://something while the "real" transport connector is tcp://0.0.0.0:1234
I saw that a DemandForwardingBridge binds a vm-connector and a tcp-connector
together, but I can't find any way to get the Bridge when I have  the
vm-connector and the tcp-connector is actually the one bound to the accepted
port, i.e. it will be something like tcp://0.0.0.0:47253 and I still can't
tell if that one was accepted via port 1234.

Is there any other way to find out which configured transport connector
corresponds to a vm-connector?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Per-transportconnector-authentication-tp3752107p4129516.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Per-transportconnector authentication

Posted by RonK <ro...@wincor-nixdorf.com>.
I finally found a way, but it seems to be a bit dirty.

To add some Information to my previous post: I need to handle
broker-to-broker connections, not just "normal" connections. From inspecting
JaasDualAuthenticationBroker I assume that normal client connections can
directly access at least the TcpTransport, which may help, but probably does
not, if there is no way back to the original connector.

Anyway, my solution is to build a TransportConnector manually and insert a
filter in front of the TransportServer, which in turn adds a Filter to the
Transport when it is accepted. The latter filter will then scan every
incoming command and modify the userName in BrokerInfo and ConnectionInfo by
prepending some tag.

That tag can be used in an AuthenticationBroker to differentiate connections
from different connectors.


--
View this message in context: http://activemq.2283324.n4.nabble.com/Per-transportconnector-authentication-tp3752107p4159985.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.