1 Reply Latest reply on Mar 31, 2005 9:20 PM by starksm64

    Setting jaas realm for jms destinations

    gray1

      Hi,

      This is a simple question I believe.

      SIMPLE VERSION

      How do I set a given jms destination to live in a jaas realm that is different from the default "jbossmq" realm?

      DETAILED VERSION

      In my login-config.xml I have specified different realms "app1-jms", "app2-jms" etc since multiple ears can be deployed on one running app server instance and these could potentially have different security settings since they are written by different people.

      I have a file in my jboss server that is specific to a given app's jms requirements <server-directory>/deploy/jboss/app1-jms-destinations-service.xml that contains the following

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=SecureQueue">
       <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="guest" read="false" write="false" create="false"/>
       <role name="trader" read="true" write="true" create="false"/>
       <role name="noacc" read="false" write="false" create="false"/>
       </security>
       </attribute>
       </mbean>
      </server>
      


      What do I put in the above file to tell it to use the "app1-jms" jaas domain?


        • 1. Re: Setting jaas realm for jms destinations
          starksm64

           

           <mbean code="org.jboss.mq.security.SecurityManager" name="jboss.mq:service=SecurityManager">
           <attribute name="DefaultSecurityConfig">
           <security>
           <role name="guest" read="true" write="true" create="true"/>
           </security>
           </attribute>
          
           <attribute name="SecurityDomain">java:/jaas/NOT-jbossmq</attribute>
          
           <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
           </mbean>