ARTEMIS-3702 auth failures don't adhere to MQTT spec
authorJustin Bertram <jbertram@apache.org>
Fri, 4 Mar 2022 04:04:20 +0000 (22:04 -0600)
committerclebertsuconic <clebert.suconic@gmail.com>
Tue, 15 Mar 2022 19:33:54 +0000 (15:33 -0400)
commit2b5a25a10611366fd4f643587efcf2292b0f548f
treecbb10b2b30b4b6c13cdbfc40c0ebccfe4f5e551a
parentf7915a273359622b5c59b3bf7e40003e9f6bf77c
ARTEMIS-3702 auth failures don't adhere to MQTT spec

The commit includes the following changes:
 - Don't drop the connection on subscribe or publish authorization
failures for 3.1 clients.
 - Don't drop the connection on subscribe authorization failures for
3.1.1 clients.
 - Add configuration parameter to control behavior on publish
authorization failures for 3.1.1 clients (either disconnect or not).
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolManager.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSession.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTVersion.java [new file with mode: 0644]
docs/user-manual/en/mqtt.md
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTSecurityTest.java