Bugs item #565472, was opened at 2002-06-06 11:48
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=565472&group_id=22866

Category: JBossMQ
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Marius Kotsbak (mkotsbak)
>Assigned to: Andreas Schaefer (schaefera)
Summary: Can't access JMS from external app/MBEAN

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Andreas Schaefer (schaefera)
Date: 2002-07-17 16:28

Message:
Logged In: YES 
user_id=70434

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

Andy

----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-06-07 06:53

Message:
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.

----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-06-07 04:37

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=565472&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to