qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kennedy <andrewinternatio...@gmail.com>
Subject Re: Java Broker Authorization on Publishers
Date Fri, 24 Sep 2010 16:14:17 GMT
Yes.

Running that Publisher against a trunk build, I get the following
output delivered to an exception listener on the connection:

org.apache.qpid.transport.SessionException: ch=0 id=0
ExecutionException(errorCode=UNAUTHORIZED_ACCESS, commandId=8,
description=Permission denied: exchange-name 'amq.topic')
	at org.apache.qpid.transport.Session.invoke(Session.java:543)
	at org.apache.qpid.transport.SessionInvoker.messageTransfer(SessionInvoker.java:96)
	at org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage(BasicMessageProducer_0_10.java:166)
	at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:490)
	at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:445)
	at org.apache.qpid.client.BasicMessageProducer.send(BasicMessageProducer.java:314)
	at org.apache.qpid.client.TopicPublisherAdapter.send(TopicPublisherAdapter.java:135)
	at org.apache.qpid.example.jmsexample.pubsub.Publisher.publishMessages(Publisher.java:130)
	at org.apache.qpid.example.jmsexample.pubsub.Publisher.runTest(Publisher.java:97)
	at org.apache.qpid.example.jmsexample.pubsub.Publisher.main(Publisher.java:44)

This will also be returned on connection close, but *not* on publish,
as there is no response for a publish message, therefore the only
place the exception can go is the connection's exception listener. I
suggest you handle the exception in the listener and use that to stop
your publisher.

Andrew.
--
-- andrew d kennedy ? edinburgh : +44 7941 197 134



On 24 September 2010 14:54, Danushka Menikkumbura
<danushka.menikkumbura@gmail.com> wrote:
> Hi Andrew,
>
> Could you please check if authourisePublish method in Securitymanager gets
> called for org.apache.qpid.example.pubsub.Publisher?. In fact I do not
> notice it is getting called for any of those sample publishers.
>
> Thank you so much for your quick response.
>
> Danushka
>
> On Fri, Sep 24, 2010 at 6:25 PM, Andrew Kennedy <
> andrewinternational@gmail.com> wrote:
>
>> Hi.
>>
>> The authourisePublish method in Securitymanager is triggered as a
>> result of the sendMessage call on a MessageProducer. This works for
>> both 0-8/0-9 and 0-10 protocol versions. What issues are you seeing?
>>
>> Andrew.
>> --
>> -- andrew d kennedy ? edinburgh : +44 7941 197 134
>>
>>
>>
>> On 24 September 2010 11:39, Danushka Menikkumbura
>>  <danushka.menikkumbura@gmail.com> wrote:
>> > Hi Devs,
>> >
>> > I can see JMS subscribers get authorized by SecurityManager for various
>> > operations they do (create queue for an example) but do not see any
>> > publishers getting checked for authorization for relevant operations
>> inside
>> > the broker (authorisePublish for an example). I have tried almost all
>> > publisher examples. Can someone please shed some light on this?. I am
>> > missing something here?.
>> >
>> > Thanks,
>> > Danushka
>> >
>> > --
>> > Danushka Menikkumbura
>> > Apache Axis2 PMC Member
>> >
>> > Apache Qpid - World Domination through Advanced Message Queueing ;
>> > http://qpid.apache.org
>> >
>> > phone : +94 77 364 1754
>> > personal blog : http://danushka-menikkumbura.blogspot.com/
>> > <http://danushka-menikkumbura.blogspot.com/>technical blog :
>> > http://danushkastechythoughts.blogspot.com/
>> >  <http://danushkastechythoughts.blogspot.com/>twitter :
>> > http://twitter.com/danushkamenik
>> > <http://twitter.com/danushkamenik>linkedin :
>> > http://lk.linkedin.com/in/danushka
>> >
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>>
>>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message