Yury Gubernatorov created AMQ-9200:
--------------------------------------

             Summary: Multiple plugins elements are allowed by config schema 
but are not supported
                 Key: AMQ-9200
                 URL: https://issues.apache.org/jira/browse/AMQ-9200
             Project: ActiveMQ
          Issue Type: Bug
            Reporter: Yury Gubernatorov


Configuration schema 
(http://activemq.apache.org/schema/core/activemq-core-5.17.2.xsd for instance) 
allows multiple "plugins" elements:

<xs:element name='plugins' minOccurs='0' maxOccurs='unbounded'>

But only the last element is taken into account.
So if user by mistake ends up with multiple plugins elements in their config it 
can be a bit of surprise.

This can become critical for some users as, for example, authorization comes as 
a plugin and used does not know if it is working or not unless they do a 
negative test.

I recently saw real-life configs looking like this:

<broker>
...
  <plugins>
    <authorizationPlugin>...</authorizationPlugin>
    <forcePersistencyModeBrokerPlugin persistenceFlag="true"/>
  </plugins>
...
  <plugins/>
</broker>

The broker would run, but authorization plugin will not work allowing anyone 
with the network access to connect without providing credentials. Persistency 
is not ensured as well.

We should set maxOccurs="1" on the plugins element probably.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to