1 Reply Latest reply on Nov 11, 2004 8:36 PM by starksm64

    JMS and custom application policy?

    boo

      Hi,

      I wonder if it is possible to configure a org.jboss.mq.server.jmx.Topic MBean in order to make it work with my custom application-policy. It took me hours to search the pay-for-docs and the forums but I could not figure it out. I hope this is the right place to get a solution for my question.

      The application-policy (inside conf/login-config.xml) looks like that:

       <application-policy name="my_policy">
       <authentication>
       <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
       <module-option name="dsJndiName">java:/myDataSource</module-option>
       </login-module>
       </authentication>
       </application-policy>
      

      The application-policy is working fine for my Session and EntityBeans, when I access them from a client using a appropriate auth.conf file. What is not working, is to publish JMS messages from within a session bean.
      The MBean (inside deploy/myjms-service.xml) looks like that:
       <mbean code="org.jboss.mq.server.jmx.Topic"
       name="jboss.mq.destination:service=Topic,name=MyTestTopic">
       <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="Authenticated" read="true" write="true" create="true"/>
       </security>
       </attribute>
       </mbean>
      

      "Authenticated" is an entry in the "Roles" table. Every principal is in that role.
      After some searchings I have changed the following entry inside conf/login-config.xml:
       <!-- Security domain for JBossMQ -->
      <!-- Original version.
       <application-policy name = "jbossmq">
       <authentication>
       <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
       flag = "required">
       <module-option name = "unauthenticatedIdentity">guest</module-option>
       <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
       </login-module>
       </authentication>
       </application-policy>
      -->
       <application-policy name = "jbossmq">
       <authentication>
       <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
       <module-option name="dsJndiName">java:/myDataSource</module-option>
       </login-module>
       </authentication>
       </application-policy>
      

      in the hope to get it running. But it didn't and I don't have any clue why. What did I wrong?
      Can you help me?

      Boo