1 Reply Latest reply on Feb 22, 2006 11:42 PM by Nikhil Koranne

    Failed to access a SRPServerInterface instance

    Nikhil Koranne Newbie

      Hello,

      I have searched the SRP related discussions but could not able to find this specific problem.
      I am trying to perform the authentication and authorization using the SRP Authentication and my custom loginmodule.
      Here are the configurations.

      The client auth file contents
      ------------------------------------------
      srp {
      org.jboss.security.srp.jaas.SRPLoginModule required
      srpServerJndiName="srp/SRPServerInterface"
      debug=true
      ;

      org.jboss.security.ClientLoginModule required
      password-stacking="useFirstPass"
      multi-threaded=true
      ;
      };
      --------------------------------------------

      jboss-service.xml file contents
      --------------------------------------------------------------------------

      ...
      ...



      srp/TempVerifierStore
      srp/AuthenticationCache
      srp/SRPServerInterface
      Security:service=SRPDatabaseVerifierStoreService



      srp/TempVerifierStore
      TestDS
      SELECT TRIM(password) FROM users WHERE username=?



      -----------------------------------------------------------------------------------

      login-config.xml contents
      -----------------------------------------------------------------------------------
      .....

      <login-module code="org.jboss.security.srp.jaas.SRPCacheLoginModule" flag="required">
      <module-option name="cacheJndiName">srp/AuthenticationCache</module-option>
      </login-module>

      <login-module
      ... My Login module which gets the roles from database.
      </login-module>

      .....

      -----------------------------------------------------------------------------------

      I have put the srp bean related classes in a jar file and I copied that jar file into this directory
      $(JBossHOME)/server/default/lib

      After having this setup when I try to run the unitTest case for authentication and authorization it is giving me followin exception while executing lc.login() method.

      Failed to access a SRPServerInterface instance
      javax.security.auth.login.LoginException: Failed to access a SRPServerInterface instance
      at org.jboss.security.srp.jaas.SRPLoginModule.login(SRPLoginModule.java:171)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
      at


      I have checked the server log and the instance is bound in the Server, this is the text from the server log.
      ---------------------------------------------------------------------------------
      2006-02-22 14:04:57,383 DEBUG [org.jboss.security.srp.SRPService] Bound SRPServerProxy at srp/SRPServerInterface
      2006-02-22 14:04:57,383 DEBUG [org.jboss.security.srp.SRPService] Bound AuthenticationCache at srp/AuthenticationCache
      2006-02-22 14:04:57,383 DEBUG [org.jboss.security.srp.SRPService] Started Security:service=SRPService
      --------------------------------------------------------------------------------


      If anyone faced this issue earlier, please let me know, I am kind of stuck here.

      Thanks in advance.

      I hope I am making myself clear.
      If you need further information please let me know.

      Thanks
      Nik






        • 1. Re: Failed to access a SRPServerInterface instance
          Nikhil Koranne Newbie

          The jboss-service.xml file contents are not properly visible in my earlier post. I think some issues with the tags. Here are the details again, assume that this text is in proper xml format in actual jboss-serivce.xml file.

          mbean code="com.aylus.ems.jmx.srp.SRPDatabaseVerifierStoreService"
          name="Security:name=SRPDatabaseVerifierStoreService"
          attribute name="JndiName">srp/TempVerifierStore
          attribute name="DsJndiName">hibernate
          attribute name="PasswordQuery">SELECT TRIM(password) FROM users WHERE username=?
          mbean

          mbean code="org.jboss.security.srp.SRPService"
          name="Security:service=SRPService">
          attribute name="VerifierSourceJndiName">srp/TempVerifierStore
          attribute name="AuthenticationCacheJndiName">srp/AuthenticationCache
          attribute name="JndiName">srp/SRPServerInterface
          mbean


          Looking forward for your response.

          Thanks
          Nik