0 Replies Latest reply on Mar 25, 2010 4:20 AM by sasi2103

    javax.security.auth.callback.UnsupportedCallbackException: Unrecognized Callback

      Hi all,

       

      I'm using digest authentication and my storeDigestCallback defined like:

       
       <module-option name="storeDigestCallback">org.jboss.security.auth.spi.RFC2617Digest</module-option>
      
      The other relevant information is:
      
      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
             <module-option name="unauthenticatedIdentity">Unknown</module-option>
             <module-option name="hashAlgorithm">MD5</module-option>
           <module-option name="hashEncoding">rfc2617</module-option>
           <module-option name="hashUserPassword">false</module-option>
           <module-option name="hashStorePassword">true</module-option>
           <module-option name="passwordIsA1Hash">false</module-option>
           <module-option name="storeDigestCallback">org.jboss.security.auth.spi.RFC2617Digest</module-option>
      </login-module>
      

       

      I tried to login with RMI like:

       

      Properties properties = new Properties();
      properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.LoginInitialContextFactory");
      properties.setProperty(Context.PROVIDER_URL, "jnp://" + host + ":" + DEFAULT_PORT);
      properties.setProperty(Context.SECURITY_PRINCIPAL, username);
      properties.setProperty(Context.SECURITY_CREDENTIALS, password);
      properties.setProperty(Context.SECURITY_PROTOCOL, "Domain");
      properties.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      
      When I tried to run my code i'm getting the following exception:
      Caused by: javax.naming.AuthenticationException: Failed to login using protocol=Domain....
      Caused by: javax.security.auth.login.LoginException: storeDigestCallback callback failed...
      Caused by: javax.security.auth.callback.UnsupportedCallbackException: Unrecognized Callback...
      
      The last line is the important ones.
      
      

       

      Why do I get unrecognized callback?

       

       

      I'm using JBoss 4.2.3