Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.6.3
-
None
-
None
Description
When sending persistent, behaviour is blocking and a Security exception is thrown. The same behaviour that the client is exposed to the client when sending non-persistent, so that a client could log or take action asynchronously.
This can be recreated easily by the following:
Add the following security section , that means guest is not auth'd to send to "guest.cannot.send"
activemq-artemis/tests/jms-tests/src/test/resources/broker.xml
<security-setting match="guest.cannot.send">
<permission type="createDurableQueue" roles="guest,def"/>
<permission type="deleteDurableQueue" roles="guest,def"/>
<permission type="createNonDurableQueue" roles="guest,def"/>
<permission type="deleteNonDurableQueue" roles="guest,def"/>
<permission type="consume" roles="guest,def"/>
<permission type="browse" roles="guest,def"/>
<permission type="send" roles="def"/>
</security-setting>
Then add the following tests to this test (first is proving exception correctly is thrown when persistent is sent using jms api, and second shows behaviour difference and no error):
activemq-artemis/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SecurityTest.java
/**
- Login with valid user and password
- But try send to address not authorised - Persistent
- Should not allow and should throw exception
*/
@Test
public void testLoginValidUserAndPasswordButNotAuthorisedToSend() throws ExceptionUnknown macro: { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp}
Attachments
Issue Links
- is duplicated by
-
ARTEMIS-2054 Artemis appears to never issue a JMS callback on error
- Resolved
- links to