Menu

#587 Can't access JMS from external app/MBEAN

v3.0 Rabbit Hole
closed-fixed
JBossMQ (152)
5
2002-07-17
2002-06-06
No

I'm trying to access a queue defined in jboss from an
external
java-application. I thought that with the
default-security-config I just
had to insert user/password in jbossmq-state.xml and
securityconf in the
queue-mbean.

I get this error:

WARN [OILServerILService] Client request resulted in a
server
exception:
javax.jms.JMSSecurityException: Connection not
authorized to subscribe
to destination: SMSUt
at
org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:141)
at
org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:599)
at
org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:298)
at
org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:287)
at java.lang.Thread.run(Thread.java:498)

Definition of the queue:

<mbean code="org.jboss.mq.server.jmx.Queue"

name="jboss.mq.destination:service=Queue,name=SMSUt">
<depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
<depends
optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
<attribute name="SecurityConf">
<security>
<role name="smssender" read="false" write="true"/>
<role name="smsdispatcher" read="true" write="true"
create="true" />
</security>
</attribute>
</mbean>

Default in login-config.xml:

<!-- Security domain for JBossMQ -->
<application-policy name = "jbossmq">
<authentication>
<login-module code =
"org.jboss.mq.sm.file.DynamicLoginModule"
flag = "sufficient">
<module-option name =
"unauthenticatedIdentity">guest</module-option>
<module-option name =
"sm.objectnam">jboss.mq:service=StateManager</module-option>
</login-module>
</authentication>
</application-policy>

In jbossmq-state.xml:

<User>
<Name>boost</Name>
<Password>****password****</Password>
</User>

Lookup-code:

Object o = ictxt.lookup("ConnectionFactory");
connFactory = (QueueConnectionFactory) o;
queueConnection =
connFactory.createQueueConnection("boost","***password*****");

The same happens when I try the same from a MBean using
INVM connectionfactory.

I have no problem publishing messages to the queue from
an ordinary session-bean using similar sequrity settings.

Discussion

  • Marius Kotsbak

    Marius Kotsbak - 2002-06-07
    • priority: 5 --> 7
     
  • Marius Kotsbak

    Marius Kotsbak - 2002-06-07

    Logged In: YES
    user_id=366650

    I think I have found a typing error in the default
    login-config.xml:

    <module-option name =
    "sm.objectnam">jboss.mq:service=StateManager</module-option>

    It should probably be "sm.objectname". It is the same in cvs
    HEAD! Unfortunately, it doesn't seem to solve my problem.

     
  • Marius Kotsbak

    Marius Kotsbak - 2002-06-07
    • priority: 7 --> 5
     
  • Marius Kotsbak

    Marius Kotsbak - 2002-06-07

    Logged In: YES
    user_id=366650

    I'm sorry, but I found that the error was because of a
    mismatch in my role names.

    But anyway, I think it is a typing-error in login-config.xml
    (see my last post). It works both when I fix this, and when
    I don't.

     
  • Andreas Schaefer

    • assigned_to: nobody --> schaefera
    • status: open --> closed-fixed
     
  • Andreas Schaefer

    Logged In: YES
    user_id=70434

    The problem with the login-config.xml is fixed in 3.0 branch
    and CVS Head.

    Andy

     
  • Andreas Schaefer

    Logged In: YES
    user_id=70434

    The problem with the login-config.xml is fixed in 3.0 branch
    and CVS Head.

    Andy

     

Log in to post a comment.

MongoDB Logo MongoDB