You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Christian Tytgat (JIRA)" <ji...@apache.org> on 2014/10/16 11:44:34 UTC

[jira] [Updated] (AMQ-5397) Using authorization plugin with MQTT causes ClassCastException on client reconnect.

     [ https://issues.apache.org/jira/browse/AMQ-5397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Tytgat updated AMQ-5397:
----------------------------------
    Priority: Critical  (was: Major)

> Using authorization plugin with MQTT causes ClassCastException on client reconnect. 
> ------------------------------------------------------------------------------------
>
>                 Key: AMQ-5397
>                 URL: https://issues.apache.org/jira/browse/AMQ-5397
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector, MQTT
>    Affects Versions: 5.10.0
>            Reporter: Christian Tytgat
>            Priority: Critical
>
> We have the following setup:
> MQTT client (reproducible with at least mosquitto and fusesource) with cleanSession = false and QOS = 1  (important!)
> AMQ with authentication/authorization plugin
> {noformat}
>         <plugins>
>           <statisticsBrokerPlugin/>
>           <simpleAuthenticationPlugin>
>             <users>
>               <authenticationUser username="${activemq.username}" password="${activemq.password}" groups="admins,everyone"/>
>               <authenticationUser username="mcollective" password="secret" groups="mcollective,admins,everyone"/>
>             </users>
>           </simpleAuthenticationPlugin>
>           <authorizationPlugin>
>             <map>
>               <authorizationMap>
>                 <authorizationEntries>
>                   <authorizationEntry queue=">" write="admins" read="admins" admin="admins" />
>                   <authorizationEntry topic=">" write="admins" read="admins" admin="admins" />
>                   <authorizationEntry topic="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
>                   <authorizationEntry queue="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
>                   <authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/>
>                 </authorizationEntries>
>               </authorizationMap>
>             </map>
>           </authorizationPlugin>
>         </plugins>
> {noformat}
> No problem to connect for the first time, but when reconnecting with the same client ID, the connection fails each time:
> {noformat}
> 2014-10-16 11:20:41,120 [MQ NIO Worker 3] WARN  Transport  - Transport Connection to: tcp://10.0.2.2:49479 failed: org.apache.activemq.transport.mqtt.MQTTProtocolException: Error recovering retained messages for m2mbox.macbookx.schedule: org.apache.activemq.security.AuthorizationDestinationFilter cannot be cast to org.apache.activemq.broker.region.Topic
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)