File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes Jboss secure JMS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss secure JMS?" Watch "Jboss secure JMS?" New topic

Jboss secure JMS?

Matt Herrington

Joined: Oct 26, 2005
Posts: 16
Hi all,

I am running Jboss EAP 4.3. I have a simple Java class which puts in and reads from a JMS queue. This works fine.

Now, I am trying to get secure JMS working. I've disabled guest access in testQueue and I have my messaging-roles(users).properties set up. However, my Java class tells me "javax.jms.JMSSecurityException: User: null is not authorized to read from destination testQueue". I've tried the following but all still don't pass the user. Does anyone know?

env.put(Context.SECURITY_PRINCIPAL, principal);
env.put(Context.SECURITY_CREDENTIALS, credentials);
env.put("", principal);
env.put("", credentials);

<mbean code="org.jboss.jms.server.destination.QueueService"
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<attribute name="SecurityConfig">
<role name="guest" read="false" write="false"/>
<role name="publisher" read="true" write="true" create="false"/>
<role name="noacc" read="false" write="false" create="false"/>
<role name="jmsuser" read="true" write="true"/>
Peter Johnson

Joined: May 14, 2008
Posts: 5852

What did you do for configuring the login module?

JBoss In Action
I agree. Here's the link:
subject: Jboss secure JMS?
It's not a secret anymore!