Folks--
I've experienced a strange problem in trying to get my mind wrapped around the users, roles and permission settings in the 2.0.0 GA release.
Say I have a user "guest3" with a password "guest3" defined in hornet-users.xml, and give that user a role of "foo".
In hornet-configuration.xml, I have:
<security-enabled>true</security-enabled>
but I do NOT add the "foo" role to any of the <permission/> elements in the <security-settings/> block.
Now I construct a session for guest3, then construct a producer, then send a message.
The message "seems" to send just fine. I get no exception when I call producer.send(msg).
However, on the server side (HQ logs), I see this:
HornetQException[errorCode=105 message=Unable to validate user: guest3 for check type SEND for address test.address]
at org.hornetq.core.security.impl.SecurityStoreImpl.check(SecurityStoreImpl.java:187)
at org.hornetq.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1976)
at org.hornetq.core.server.impl.ServerSessionImpl.handleSend(ServerSessionImpl.java:1426)
at org.hornetq.core.server.impl.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:275)
at org.hornetq.core.remoting.impl.ChannelImpl.handlePacket(ChannelImpl.java:466)
at org.hornetq.core.remoting.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:423)
at org.hornetq.core.remoting.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:389)
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:432)
at org.hornetq.integration.transports.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:67)
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:98)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:796)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:358)
at org.hornetq.integration.transports.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:171)
at org.hornetq.integration.transports.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:136)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:345)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:332)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:323)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:275)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:196)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:179)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
What I expect to see is no output on the server side, but an exception thrown by the client side.
If it helps any, a "consumer" seems to work just fine, but the error there is about "CREATE_NON_DURABLE_QUEUE", rather than "SEND" or "CONSUME".
So, is this a bug? Or have I misunderstood something?
Keith