You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by John Fletcher <fl...@gmail.com> on 2011/08/18 11:01:50 UTC
Per-transportconnector authentication
I have an ActiveMQ instance with transport connectors as follows:
<transportConnector name="local" uri="tcp://localhost:61616"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:61617"/>
Is it possible to require authentication on the ssl connector but allow
anonymous authentication on the local connector? I don't have complicated
authorisation rules, I could just give admin access to anyone who
successfully connects by either route.
John
Re: Per-transportconnector authentication
Posted by John Fletcher <fl...@gmail.com>.
I had a look at the code. I think it would be a valid and useful feature.
The tricky thing is where to configure it. Configure an auth plugin to
reference a certain transportconnector? Or configure a transportconnector to
reference a certain auth plugin? The latter seems more logical from a
useability point of view. But if you start allowing this kind of config then
do you allow simply one transport conncector, one auth plugin? Or can you
specify certain users from an auth plugin on a transport connector? Hmmm...
John
2011/8/18 Dejan Bosanac <de...@nighttale.net>
> We don't have that at the moment. The closest thing there is to that is
> Jaas
> dual plugin, which uses certificates to authenticate ssl connections and
> user/pass for plain ones.
>
> It shouldn't be hard to implement it. If you want to give it a try take a
> look at current plugins
>
>
> https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security
>
>
> Regards
> --
> Dejan Bosanac - http://twitter.com/dejanb
> -----------------
> The experts in open source integration and messaging -
> http://fusesource.com
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Thu, Aug 18, 2011 at 11:01 AM, John Fletcher <fl...@gmail.com>
> wrote:
>
> > I have an ActiveMQ instance with transport connectors as follows:
> > <transportConnector name="local" uri="tcp://localhost:61616"/>
> > <transportConnector name="ssl" uri="ssl://0.0.0.0:61617"/>
> >
> > Is it possible to require authentication on the ssl connector but allow
> > anonymous authentication on the local connector? I don't have complicated
> > authorisation rules, I could just give admin access to anyone who
> > successfully connects by either route.
> >
> > John
> >
>
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.
Re: Per-transportconnector authentication
Posted by RonK <ro...@wincor-nixdorf.com>.
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 Dejan Bosanac <de...@nighttale.net>.
We don't have that at the moment. The closest thing there is to that is Jaas
dual plugin, which uses certificates to authenticate ssl connections and
user/pass for plain ones.
It shouldn't be hard to implement it. If you want to give it a try take a
look at current plugins
https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security
Regards
--
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
On Thu, Aug 18, 2011 at 11:01 AM, John Fletcher <fl...@gmail.com> wrote:
> I have an ActiveMQ instance with transport connectors as follows:
> <transportConnector name="local" uri="tcp://localhost:61616"/>
> <transportConnector name="ssl" uri="ssl://0.0.0.0:61617"/>
>
> Is it possible to require authentication on the ssl connector but allow
> anonymous authentication on the local connector? I don't have complicated
> authorisation rules, I could just give admin access to anyone who
> successfully connects by either route.
>
> John
>