It would apoear that org.apache.activemq.security.AuthorizationBroker uses Security context in some way to cache the results of authorization.
This means if I have a dynamic map (i.e. the permissions could change from one 'send' request to the next, for any destination) the dynamic nature is lost due to caching. Can the caching be disabled or circumvented in any way? I would like the AuthorizationBroker (or my equivalent of it) to check the map EVERY time. Thanks On 6 Apr 2017 04:02, "abhijith" <topcoderabhij...@gmail.com> wrote: > Hi, > > We are using Artemis 1.4.0 version and have a jms topic defined. We have > defined two specific roles for all topics, one to send and another to > consume > > artemis-roles.properties: > sendtopic=testtopicuser > consumetopic=testtopicuser > > broker.xml: > <topic name="exampleTopic"/> > <security-setting match="jms.topic.#"> > <permission type="consume" roles="consumetopic"/> > <permission type="send" roles="sendtopic"/> > </security-setting> > > When I try to send to this topic, it works fine. But when I try to consume > from this topic it fails giving below error. If I add <permission > type="createNonDurableQueue" roles="consumetopic"/> permission, it works > fine. Is this a bug in Artemis or am I missing something? Any help is > greatly appreciated. > > javax.jms.JMSSecurityException: AMQ119032: User: testtopicuser does not > have > permission='CREATE_NON_DURABLE_QUEUE' on address jms.topic.exampleTopic > > at > org.apache.activemq.artemis.core.protocol.core.impl.ChannelI > mpl.sendBlocking(ChannelImpl.java:409) > at > org.apache.activemq.artemis.core.protocol.core.impl.ChannelI > mpl.sendBlocking(ChannelImpl.java:307) > at > org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQ > SessionContext.createQueue(ActiveMQSessionContext.java:590) > at > org.apache.activemq.artemis.core.client.impl.ClientSessionIm > pl.internalCreateQueue(ClientSessionImpl.java:1620) > at > org.apache.activemq.artemis.core.client.impl.ClientSessionIm > pl.createTemporaryQueue(ClientSessionImpl.java:314) > at > org.apache.activemq.artemis.jms.client.ActiveMQSession.creat > eConsumer(ActiveMQSession.java:690) > at > org.apache.activemq.artemis.jms.client.ActiveMQSession.creat > eConsumer(ActiveMQSession.java:353) > at > org.apache.activemq.artemis.jms.client.ActiveMQSession.creat > eConsumer(ActiveMQSession.java:325) > at > BasicSendReceiveTopicISTest.testBasicSendReceiveForStringMes > sage(BasicSendReceiveTopicISTest.java:59) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.testng.internal.MethodInvocationHelper.invokeMethod(Meth > odInvocationHelper.java:85) > at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) > at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816) > at org.testng.internal.Invoker.invokeTestMethods(Invoker.java: > 1124) > at > org.testng.internal.TestMethodWorker.invokeTestMethods(TestM > ethodWorker.java:125) > at org.testng.internal.TestMethodWorker.run(TestMethodWorker. > java:108) > at org.testng.TestRunner.privateRun(TestRunner.java:774) > at org.testng.TestRunner.run(TestRunner.java:624) > at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) > at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) > at org.testng.SuiteRunner.run(SuiteRunner.java:261) > at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java > :52) > at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) > at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) > at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) > at org.testng.TestNG.run(TestNG.java:1048) > at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) > at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter. > java:127) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at com.intellij.rt.execution.application.AppMain.main(AppMain. > java:147) > Caused by: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION > message=AMQ119032: User: testtopicuser does not have > permission='CREATE_NON_DURABLE_QUEUE' on address jms.topic.exampleTopic] > ... 37 more > > > > > > -- > View this message in context: http://activemq.2283324.n4.nab > ble.com/Artemis-Bug-Consume-from-non-durable-jms-topic-tp4724597.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >