1 Reply Latest reply on Jun 3, 2013 6:00 AM by erasmo2 marciano2

    JAAS config on Jboss 6

    sirair airsir Newbie

      Hi all,

       

       

      I want to run JAAS on Jboss 6, but I get an exception when starting server.

       

      15:24:15,467 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfs:///C:/Users/md/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.x_Runtime_Server1366663323539/deploy/JAAS_EVALUATION.war state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///C:/Users/sascha/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.x_Runtime_Server1366663323539/deploy/JAAS_EVALUATION.war
      ...
      
      

      Here are my configs:

       

       

      server.xml


      <?xml version="1.0" encoding="UTF-8"?>
      <?xml version="1.0" encoding="UTF-8"?>
      <Context>
          <Realm className="org.apache.catalina.realm.JAASRealm" appName="JAAS_EVALUATION" />
      </Context>
      
      

       

       

      jboss-web.xml

       

      <jboss-web>
          <security-domain>java:/jaas/testLogin</security-domain>
      </jboss-web>
      
      

       

       

      web.xml

       

       

      <webapp>
      
          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>All resources</web-resource-name>
                  <description>Protects all resources</description>
                  <url-pattern>/admin/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                  <role-name>md</role-name>
              </auth-constraint>
          </security-constraint>
      
          <security-role>
              <role-name>md</role-name>
          </security-role>
      
          <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>Test Realm</realm-name>
          </login-config>
      
      </webapp>
      
      

       

       

       

      login-config.xml

       

       

      <application-policy name="testLogin">
          <authentication>
            <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
              flag="required">
              <module-option name="usersProperties">users.properties</module-option>
              <module-option name="rolesProperties">roles.properties</module-option>
            </login-module>
          </authentication>
        </application-policy>