Chris,

The problem he's pointing out is that the destination name is the
comma-separated concatenation of two advisory topic names. It feels like
there's a missing String.split() call earlier in the code path.

I haven't had time to go looking for where that might be, and won't for
at least a week, though if someone else has time to do it, that would
be great. Jędrzej, could you please capture a stack trace at the point
where you're seeing this behavior, to help whoever investigates this?

Tim

On Thu, Sep 26, 2019, 4:26 AM Christopher Shannon <
[email protected]> wrote:

> These are advisory messages, I suggest you read
> https://activemq.apache.org/advisory-message.html which will explain what
> they are and how to configure/disable them.
>
> On Tue, Sep 24, 2019 at 4:52 PM Jędrzej Dudkiewicz <
> [email protected]> wrote:
>
> > I wrote yet another certificate-based authentication/authorization
> > plugin. It reads CN from certificate provided by the client and
> > depending on what is in there it allows or dissalows
> > creation/deletion/writing to topics/queues. To test it I wrote a
> > simple Java client that uses OpenWire. Connection is made
> > successfully, CN is read and permissions are added are expected.
> > Unfortunately after connection is created (addConnection in plugin is
> > called), destination "topic://ActiveMQ.Advisory.Connection" is created
> > by the client, or rather in its context (ok, unexpected, but it makes
> > sense as I used advisory topics), method addConsumer() (from
> > BrokerFilter) is called, and its destination is:
> >
> > DEST:
> > topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
> > IS TOPIC: true
> > PHYSNAME:
> > topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
> > DEST AS STR: Topic
> > QUALIFIED NAME:
> > topic://ActiveMQ.Advisory.TempQueue,topic://ActiveMQ.Advisory.TempTopic
> > DEST PATHS:
> > topic://ActiveMQ|Advisory|TempQueue,topic://ActiveMQ|Advisory|TempTopic
> > IS TEMP: false
> >
> > This means that it is a topic, its physical name is equal to qualified
> > name, which makes no sense whatsoever, what more this name is made up
> > from two topics names, it isn't temporary (not what name suggests) and
> > to add insult to the injury its "getDestinationPaths()" method returns
> > array with the following elements:
> > "topic://ActiveMQ"
> > "Advisory"
> > "TempQueue,topic://ActiveMQ"
> > "Advisory"
> > "TempTopic"
> >
> > I wrote my plugin using
> > "org.apache.activemq.security.AuthorizationBroker" as a base and aside
> > from this and single problem with MQTT protocol it works fine.
> >
> > What is the reason for this topic's existence?
> > Why is its name so weird?
> > Should I expect more destinations with such names?
> > Is it enough to check for exactly this name and I will be done? I did
> > it and it works, but I can't be sure that it won't happen again with
> > different weird topic name.
> >
> > Thanks in advance,
> > --
> > Jędrzej Dudkiewicz
> >
> > I really hate this damn machine, I wish that they would sell it.
> > It never does just what I want, but only what I tell it.
> >
>

Reply via email to