8 Replies Latest reply on Feb 24, 2009 2:36 AM by Denzil Fillis

    JAAS not prompting for username pwd on Linux 3 with JBoss4.0



      JAAS is not working on Linux, I deployed the application in JBoss, but it is bypassing the security manager and directly going to welcome/home page. It never prompts for the username and password. and not throwing any error also.

      But the same application war file, without changing anything, if i deploy on Windows system, it works fine.

      Here is the system details :

      Linux System Info :

      RedHat Enterprise Linux 3 (Update 4)
      Kernal Version : 2.4.21-27.0.2.ELsmp

      JBoss Version

      JDK Version

      To test it, i even tested with sample jaas application.

      In login-config.xml

      <application-policy name = "jaasproject">
       <login-module code = "org.jboss.security.ClientLoginModule"
       flag = "required">
       <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>

      In JBOSS_HOME/client/auth.conf file

      org.jboss.security.ClientLoginModule required;
      org.jboss.security.auth.spi.UsersRolesLoginModule required;

      In JBOSS_HOME/server/standard/conf/auth.conf file

      org.jboss.security.ClientLoginModule required;
      org.jboss.security.auth.spi.UsersRolesLoginModule required;

      In jboss-web.xml file


      In jndi.properties


      In web.xml

      <web-app >
       <description>Declarative security tests</description>
       <description>no description</description>
       <description>A user allowed to invoke echo methods</description>
       <description>A user allowed to invoke echo methods</description>

      and my login.jsp

      <%@ page contentType="text/html; charset=UTF-8" %>
      <%@ page language="java" %>
      <html >
      <!-- To prevent caching -->
      response.setHeader("Cache-Control","no-cache"); // HTTP 1.1
      response.setHeader("Pragma","no-cache"); // HTTP 1.0
      response.setDateHeader ("Expires", -1); // Prevents caching at the proxy server
      function submitForm() {
      var frm = document. logonForm;
      // Check if all the required fields have been entered by the user before
      // submitting the form
      if( frm.j_username.value == "" ) {
      alert("Pls Enter user name");
      return ;
      if( frm.j_password.value == "" ) {
      alert("Pls enter password");
      return ;
      <!-- FORM name="logonForm" action="home.jsp" METHOD=POST -->
      <form method="POST" action='<%= response.encodeURL( "j_security_check" ) %>'>
      <TABLE width="100%" border="0" cellspacing="0" cellpadding=
      "1" bgcolor="white">
      <TABLE width="100%" border="0" cellspacing=
      "0" cellpadding="5">
      <TR align="center">
      <TD align="right" class="Prompt"></TD>
      <TD align="left">
      UserName : <INPUT type="text" name="j_username" maxlength=20>
      <TR align="center">
      <TD align="right" class="Prompt"> </TD>
      <TD align="left">
      Password : <INPUT type="password"
      name="j_password" maxlength=20 >
      <TR align="center">
      <TD align="right" class="Prompt"> </TD>
      <TD align="left">
      <input type="submit" onclick="javascript:submitForm();" value="Login">

      users.properties, This and roles properties files i placed in WEB-INF/classes folder and also in /standard/conf/props folder


      and roles.properties


      Above are the configurations, This works fine in Windows system with all versions of the JBosss.

      But it is not working, and simply going to welcome page without prompting for username and password on Linux Server.

      I even tried with other JBoss 4.0.1 rpm package also.

      Do i need to do any extra configuration on Linux and JBoss ??

      Can anybody please help ??

      Apreciate your help

      Thanks in advance....