1 Reply Latest reply on Sep 3, 2010 2:46 AM by jaikiran pai

    How to specify an application-policy for HornetQ?

    Eugene Romanenko Newbie

      JBoss 6 environment.

       

      login-config.xml have predefined application-policy "hornetq", but we have our application-policy which already using for remote EJB calls authorization and we wish use this application-policy for JMS connections. How to change application-policy which used by HornetQ from "hornetq" to our application-policy name? I checked all HornetQ .xml files, but unable to find where application-policy name is specified.

        • 1. Re: How to specify an application-policy for HornetQ?
          jaikiran pai Master

          In the JBOSS_HOME/server/< servername>/deploy/hornetq/hornetq-jboss-beans.xml, there's a HornetQSecurityManager which uses org.hornetq.integration.jboss.security.JBossASSecurityManager. The JBossASSecurityManager accepts a "securityDomainName" property value. By default, it's java:jaas/hornetq. You can override it with your policy name:

           

          <!-- The security manager -->
             <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
                <start ignored="true"/>
                <stop ignored="true"/>
                <depends>JBossSecurityJNDIContextEstablishment</depends>
                <property name="allowClientLogin">false</property>
                <property name="authoriseOnClientLogin">false</property>
                <!-- custom JAAS policy -->
                <property name="securityDomainName">java:jaas/mypolicy</property>
              </bean>