aspose file tools*
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
Author

Jboss secure JMS?

Matt Herrington
Greenhorn

Joined: Oct 26, 2005
Posts: 16
    
    1
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("java.naming.security.principal", principal);
env.put("java.naming.security.credentials", credentials);


testQueue:
=======
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=testQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="SecurityConfig">
<security>
<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"/>
</security>
</attribute>
</mbean>
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

What did you do for configuring the login module?


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jboss secure JMS?