1 Reply Latest reply on Aug 7, 2003 5:05 AM by Tilo Thiele

    How to configure Basic Authentication?

    mengk Newbie

      On Weblogic7.0, I have configured Basic Authentication . Now I want to configure the same one on JBoss. I try it , but ocurr errors.
      such as the web.xml and weblogic.xml :

      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app>

      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>

      <security-constraint>
      <display-name>Admin</display-name>
      <web-resource-collection>
      <web-resource-name>success</web-resource-name>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>Deployer</role-name>
      </auth-constraint>
      </security-constraint>

      <security-constraint>
      <display-name>Temp</display-name>
      <web-resource-collection>
      <web-resource-name>selectinfo</web-resource-name>
      <url-pattern>/index.jsp</url-pattern>
      <url-pattern>/user.jsp</url-pattern>
      <url-pattern>/allseller.jsp</url-pattern>
      <url-pattern>/style.css</url-pattern>
      <url-pattern>/images/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>Deployer</role-name>
      <role-name>Operator</role-name>
      </auth-constraint>
      </security-constraint>

      <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>default</realm-name>
      </login-config>

      <security-role>
      <role-name>Deployer</role-name>
      </security-role>

      <security-role>
      <role-name>Operator</role-name>
      </security-role>

      </web-app>


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 7.0//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">

      <weblogic-web-app>

      <security-role-assignment>
      <role-name>Deployer</role-name>
      <principal-name>admin</principal-name>
      </security-role-assignment>

      <security-role-assignment>
      <role-name>Operator</role-name>
      <principal-name>temp</principal-name>
      </security-role-assignment>

      </weblogic-web-app>