1 Reply Latest reply on Oct 30, 2002 4:52 AM by Roman

    how to control security domains for individual beans

    Eric Newbie

      Hi,

      I'm trying to figure out how to write a jboss.xml file which will secure most, but not all, of my beans. I've come to the conclussion that I need to use the <container-configurations> element, and specify which the security domains that way.

      The docs on this syntax are not very robust, but I searched the forum and found the following syntax:

      <enterprise-beans>
      <ejb-name>some.bean.name.here</ejb-name>
      <configuration-name>server</configuration-name>
      </enterprise-beans>
      <container-configurations><container-configuration>
      <container-name>server</container-name>
      <security-domain>java:/jaas/server</security-domain>
      </container-configuration></container-configurations>




      Is this jboss.xml file correct? It does not deploy correctly. What might I be doing wrong?

      Thanks for you help.
      Eric




      org.jboss.deployment.DeploymentException: Failed to load metadata; - nested throwable:(java.lang.NullPointerException) at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:331)
      ...

        • 1. Re: how to control security domains for individual beans
          Roman Newbie

          Try like this. Replace Standart BMP EntityBean on another container (see standartjboss.xml).

          <enterprise-beans>

          <ejb-name>ProcessBean</ejb-name>
          <jndi-name>com.*.*.*.ProcessHome</jndi-name>
          <configuration-name>Secure Standard BMP EntityBean</configuration-name>

          </enterprise-beans>
          <container-configurations>
          <container-configuration extends="Standard BMP EntityBean">
          <container-name>Secure Standard BMP EntityBean</container-name>
          <role-mapping-manager>java:/jaas/JaasSecurityManager</role-mapping-manager>
          <authentication-module>java:/jaas/JaasSecurityManager</authentication-module>
          </container-configuration>
          </container-configurations>