0 Replies Latest reply on Aug 19, 2003 8:21 AM by nnbindu

    realm

    nnbindu Newbie

      i am using jboss-3.2.1_tomcat-4.1.24. i am trying to configure a jass authentication realm.

      * i added tese lines in to ..server\domain\config\login-config.xml

      <application-policy name = "CKPWebFolder">

      <login-module code="com.vwssys.drive.servlet.webdav.realm.TomcatRealm" flag = "required">

      </login-module>

      </application-policy>


      * and in my application.xml added this line/
      <web-uri>CKPWebFolder.war</web-uri><context-root>CKPWebFolder</context-root>

      * in my web.xml in CKPWebFolder.war/WEB-INF/ i added

      <security-constraint>
      <display-name>Entire application</display-name>
      <web-resource-collection>
      <web-resource-name>CKPWebFolder</web-resource-name>
      <!-- Define the context-relative URL(s) to be protected -->
      <url-pattern>/*</url-pattern>
      <!-- If you list http methods, only those methods are protected -->
      <http-method>DELETE</http-method>
      <http-method>OPTIONS</http-method>
      <http-method>LOCK</http-method>
      <http-method>UNLOCK</http-method>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <http-method>PUT</http-method>
      <http-method>PROPFIND</http-method>
      <http-method>MOVE</http-method>
      <http-method>TRACE</http-method>
      </web-resource-collection>
      <auth-constraint>
      <!-- Anyone with one of the listed roles may access this area -->
      <role-name>Users</role-name>
      </auth-constraint>
      </security-constraint>

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

      <security-role>
      <role-name>Users</role-name>
      </security-role>


      * in jboss-web.xml in CKPWebFolder.war/WEB-INF/

      added this line

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

      </jboss-web>


      after restarting jboss when i try to invoke
      http://localhost:8080/CKPWebFolder/

      it is giving me this error message.
      14:50:35,028 INFO [JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@1be9a50
      14:50:35,028 INFO [JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@2136c6
      14:50:35,028 INFO [JaasSecurityManagerService] Added CKPWebFolder, org.jboss.security.plugins.SecurityDomainContext@933cba t
      o map
      14:50:35,048 ERROR [Engine] CoyoteAdapter An exception or error occurred in the container during the request processing
      java.lang.ArrayIndexOutOfBoundsException: 33
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:662)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
      at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:462)
      at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:417)
      at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:244)
      at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:219)
      at org.jboss.web.catalina.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:291)
      at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:161)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:536)


      ***********
      and in my TomcatRealm.java i am extending org.apache.catalina.realm.RealmBase and overwriting public Principal authenticate(String username, String credentials) method

      *********

      i dont understand where i am doing wrong. any help will be really appriciated

      Regards
      Hima