You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Fugo <St...@avid.com> on 2006/11/27 12:49:56 UTC
Broker: setMessageAuthorizationPolicy is not working?
Hi,
I would like to introduce a mechanism for ActiveMQ which allows me to hide
certain messages for certain users/clients.
The method ServerBroker#setMessageAuthorizationPolicy seems to cover exactly
what I need, but it isn't working for me.
After some Googling arround I found this bug entry (Created 22/Jun/06):
http://issues.apache.org/activemq/browse/AMQ-775
Is this issue accepted as bug? If it is so, is a workaround available for
this?
Otherwise, maybe I did something wrong. Please see my simple snipplet below:
...
BrokerService broker = new BrokerService();
broker.setMessageAuthorizationPolicy(new
SimpleMessageAuthorizationPolicy());
broker.addConnector(this.url);
broker.start();
...
public class SimpleMessageAuthorizationPolicy implements
MessageAuthorizationPolicy {
public boolean isAllowedToConsume(ConnectionContext connectionContext,
Message message) {
System.out.println("isAllowedToConsume was called");
return true;
}
}
...
The broker starts correctly and I also can send and receive messages, but
the method isAllowedToConsume is never called. Why?
Thank you!
PS: Tried with ActiveMQ 4.1 and 4.2-snapshot
Regards
Stephan
--
View this message in context: http://www.nabble.com/Broker%3A-setMessageAuthorizationPolicy-is-not-working--tf2711341.html#a7558786
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
setMessageAuthorizationPolicy is not working?
Posted by jkurtz <jk...@gmail.com>.
I have the same problem...first I implemented the MessageAuthorizationPolicy
interface in a class, compiled that into a jar, then placed that into the
<activemq_home>lib directory.
I set the following:
messageAuthorizationPolicy
in the activemq.xml file to point to my authorization class as per the
directions on this page
http://www.activemq.org/site/security.html
I made it always return false, hoping to test it by blocking all calls.
I stopped and restarted my broker and there was no effect.
I looked at this (bug AMQ-591) and it seems like it was fixed
https://issues.apache.org/activemq/browse/AMQ-591
However, all of the links on the page are broken and I have not been able to
find the references
--
View this message in context: http://www.nabble.com/Broker%3A-setMessageAuthorizationPolicy-is-not-working--tf2711341.html#a7777009
Sent from the ActiveMQ - User mailing list archive at Nabble.com.