You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pplive <pp...@gmail.com> on 2007/08/21 06:35:59 UTC
MessageAuthorizationPolicy does not work??
BrokerService service=BrokerFactory.createBroker(new
URI("xbean:activemq.xml"));
service.setMessageAuthorizationPolicy(new MyMessageAuthorizationPolicy());
am I worong ??
--
View this message in context: http://www.nabble.com/MessageAuthorizationPolicy-does-not-work---tf4303002s2354.html#a12248240
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: MessageAuthorizationPolicy does not work??
Posted by James Strachan <ja...@gmail.com>.
On 21/08/2007, pplive <pp...@gmail.com> wrote:
>
> BrokerService service=BrokerFactory.createBroker(new
> URI("xbean:activemq.xml"));
> service.setMessageAuthorizationPolicy(new MyMessageAuthorizationPolicy());
>
> am I worong ??
That looks right to me.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: MessageAuthorizationPolicy does not work??
Posted by James Strachan <ja...@gmail.com>.
On 17/01/2008, jvr <jv...@yahoo.com> wrote:
>
>
> James.Strachan wrote:
> >
> > On 17/01/2008, jvr <jv...@yahoo.com> wrote:
> >>
> >>
> >> pplive wrote:
> >> >
> >> > BrokerService service=BrokerFactory.createBroker(new
> >> > URI("xbean:activemq.xml"));
> >> > service.setMessageAuthorizationPolicy(new
> >> > MyMessageAuthorizationPolicy());
> >> >
> >> > am I worong ??
> >> >
> >>
> >> Does this work yet?
> >
> > Yes - its fixed in trunk now.
> >
>
> Perfect - is it in Maven somewhere? I just tried 5.1-SNAPSHOT and it
> doesn't seem to work. I'm configuring it through Spring and I know it's at
> least loading the class because if I pass it a
> non-MessageAuthorizationPolicy bean it balks. But messages still seem to
> get through without going through the policy.
Its in subversion so far - it'll hit the snapshot next build.
> James.Strachan wrote:
> >
> >> Either I'm not using it right, or it's still broken in
> >> 5.0.0 which is a little disappointing considering there's a bug 775 with
> >> near exact details on what's wrong and how to fix.
> >>
> >> As a side question, does anybody implement a trusted host based model for
> >> controlling access to an ActiveMQ broker? I can't find any information
> >> on
> >> how to do this. The MessageAuthorizationPolicy seemed promising, but I
> >> can't get it to work as explicitly documented. I also see no way to get
> >> the
> >> sending host from the message once delivered to the consumer, but I'm new
> >> to
> >> JMS so maybe it's something simple.
> >
> > Yes, its something simple - but needs to be enabled...
> >
> > http://activemq.apache.org/jmsxuserid.html
> >
>
> This is useful, but ideally I would like to know the IP address or hostname
> of the host that sent the message. I basically want to have a simple static
> list of "allow these hosts to talk to the broker, disallow these hosts". I
> would much prefer this be done at the application level and not the network
> level via an e.g. firewall.
We'd need an extension for the broker to record the users IP address /
hostname which shouldn't be too hard.
Fancy submitting a patch?
http://activemq.apache.org/camel/contributing.html
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: MessageAuthorizationPolicy does not work??
Posted by jvr <jv...@yahoo.com>.
James.Strachan wrote:
>
> On 17/01/2008, jvr <jv...@yahoo.com> wrote:
>>
>>
>> pplive wrote:
>> >
>> > BrokerService service=BrokerFactory.createBroker(new
>> > URI("xbean:activemq.xml"));
>> > service.setMessageAuthorizationPolicy(new
>> > MyMessageAuthorizationPolicy());
>> >
>> > am I worong ??
>> >
>>
>> Does this work yet?
>
> Yes - its fixed in trunk now.
>
Perfect - is it in Maven somewhere? I just tried 5.1-SNAPSHOT and it
doesn't seem to work. I'm configuring it through Spring and I know it's at
least loading the class because if I pass it a
non-MessageAuthorizationPolicy bean it balks. But messages still seem to
get through without going through the policy.
James.Strachan wrote:
>
>> Either I'm not using it right, or it's still broken in
>> 5.0.0 which is a little disappointing considering there's a bug 775 with
>> near exact details on what's wrong and how to fix.
>>
>> As a side question, does anybody implement a trusted host based model for
>> controlling access to an ActiveMQ broker? I can't find any information
>> on
>> how to do this. The MessageAuthorizationPolicy seemed promising, but I
>> can't get it to work as explicitly documented. I also see no way to get
>> the
>> sending host from the message once delivered to the consumer, but I'm new
>> to
>> JMS so maybe it's something simple.
>
> Yes, its something simple - but needs to be enabled...
>
> http://activemq.apache.org/jmsxuserid.html
>
This is useful, but ideally I would like to know the IP address or hostname
of the host that sent the message. I basically want to have a simple static
list of "allow these hosts to talk to the broker, disallow these hosts". I
would much prefer this be done at the application level and not the network
level via an e.g. firewall.
Thanks for your help!
--
View this message in context: http://www.nabble.com/MessageAuthorizationPolicy-does-not-work---tp12248240s2354p14925066.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: MessageAuthorizationPolicy does not work??
Posted by James Strachan <ja...@gmail.com>.
On 17/01/2008, jvr <jv...@yahoo.com> wrote:
>
>
> pplive wrote:
> >
> > BrokerService service=BrokerFactory.createBroker(new
> > URI("xbean:activemq.xml"));
> > service.setMessageAuthorizationPolicy(new
> > MyMessageAuthorizationPolicy());
> >
> > am I worong ??
> >
>
> Does this work yet?
Yes - its fixed in trunk now.
> Either I'm not using it right, or it's still broken in
> 5.0.0 which is a little disappointing considering there's a bug 775 with
> near exact details on what's wrong and how to fix.
>
> As a side question, does anybody implement a trusted host based model for
> controlling access to an ActiveMQ broker? I can't find any information on
> how to do this. The MessageAuthorizationPolicy seemed promising, but I
> can't get it to work as explicitly documented. I also see no way to get the
> sending host from the message once delivered to the consumer, but I'm new to
> JMS so maybe it's something simple.
Yes, its something simple - but needs to be enabled...
http://activemq.apache.org/jmsxuserid.html
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: MessageAuthorizationPolicy does not work??
Posted by jvr <jv...@yahoo.com>.
pplive wrote:
>
> BrokerService service=BrokerFactory.createBroker(new
> URI("xbean:activemq.xml"));
> service.setMessageAuthorizationPolicy(new
> MyMessageAuthorizationPolicy());
>
> am I worong ??
>
Does this work yet? Either I'm not using it right, or it's still broken in
5.0.0 which is a little disappointing considering there's a bug 775 with
near exact details on what's wrong and how to fix.
As a side question, does anybody implement a trusted host based model for
controlling access to an ActiveMQ broker? I can't find any information on
how to do this. The MessageAuthorizationPolicy seemed promising, but I
can't get it to work as explicitly documented. I also see no way to get the
sending host from the message once delivered to the consumer, but I'm new to
JMS so maybe it's something simple.
--
View this message in context: http://www.nabble.com/MessageAuthorizationPolicy-does-not-work---tp12248240s2354p14913500.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.