1 Reply Latest reply on Nov 9, 2001 1:53 PM by Allen Fogleson

    form based login

    charles Newbie

      hi all
      i made a WAR file with security mappings. I gave
      <auth-constrint>
      <role-name>authorizedUser</role-name>
      <auth-constraint>

      i made two files
      users.properties with userneme:password

      and roles.properties with
      authorizedUser:username

      and placed these files in /jboss/conf/jetty directory

      but on submitting the login form the following error comes in the browser

      HTTP ERROR: 500 Internal Server Error
      java.lang.ClassCastException: java.lang.String
      RequestURI=/compass/protected/index.html

      and in server

      [Jetty] Security- User: suresh is authenticated
      [Jetty] Security- User: suresh
      [Jetty] WARNING: GET /compass/protected/index.html HTTP/1.1
      java.lang.ClassCastException: java.lang.String
      at org.jboss.security.plugins.JaasSecurityManager.doesUserHaveRole(JaasS
      ecurityManager.java:278)
      at org.jboss.jetty.JBossUserRealm$User.isUserInRole(JBossUserRealm.java:
      105)
      at org.mortbay.http.handler.SecurityHandler.authenticatedInRole(Security
      Handler.java:360)
      at org.mortbay.http.handler.SecurityHandler.handle(SecurityHandler.java:
      286)
      at org.mortbay.http.HandlerContext.handle(HandlerContext.java:1037)
      at org.mortbay.http.HandlerContext.handle(HandlerContext.java:992)
      at org.mortbay.http.HttpServer.service(HttpServer.java:699)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
      148)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Unknown Source)

      i'd like to know the following

      1 format of the users.properties & roles.properties
      2 where to put these files (in WAR or in /jboss/conf/jetty)
      3 whether we have to make any Realm mapping.

      i am using the jboss 2.4.3-jetty 3.1.3-1.

      regards