1 Reply Latest reply: May 5, 2011 8:31 AM by user2582486 RSS

    javax.naming.AuthenticationNotSupportedException: DIGEST-MD5 on WebSphere

    843793
      Hello


      I am trying to access an LDAP-Server from inside an WebSphere-application (using WebSphere 6.1.0.27 running under Windows)

      If I select DIGEST-MD5 as authentication method and run the code in Websphere (using the Websphere JRE) I get an exception
      javax.naming.AuthenticationNotSupportedException: DIGEST-MD5.

      If I use the same JNDI parameters and run it with a SUN JRE (either 1.6 or 1.5) I can connect without any problems.

      What makes me wonder the most is that the IBM JRE supports the same LDAP Provider (com.sun.jndi.ldap.LdapCtxFactory) but behaves differently.

      Can anyone tell me what is the problem here and how can I access an LDAP server from a web application running on WebSphere application server using SSL and DIGEST-MD5 authentication?


      Best regard

      Frank Graf




      These are the JNDI settings logged by the websphere application
        JNDI param: java.naming.provider.url ==> [ldaps://testdc.testnetz.com]
        JNDI param: java.naming.factory.initial ==> [com.sun.jndi.ldap.LdapCtxFactory]
        JNDI param: java.naming.security.principal ==> [user-ris@testnetz.com]
        JNDI param: java.naming.security.authentication ==> [DIGEST-MD5]
        JNDI param: com.sun.jndi.ldap.connect.pool ==> [true]
        JNDI param: java.naming.security.credentials ==> [password]
        JNDI param: java.naming.security.protocol ==> [ssl]
      And this is the resulting exception
      javax.naming.AuthenticationNotSupportedException: DIGEST-MD5


      This is the data from
      D:\AppServer\WebSphere-6.1\java>bin\java -version java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511 (SR2)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20060504 (JIT enabled) J9VM - 20060501_06428_lHdSMR JIT  - 20060428_1800_r8
      GC   - 20060501_AA)
      JCL  - 20060511a
      This is the output of the code (testcase) when running with a Sun JRE
      java.naming.provider.url ==> ldaps://testdc.testnetz.com 
      java.naming.factory.initial ==> com.sun.jndi.ldap.LdapCtxFactory 
      java.naming.security.principal ==> user-ris@testnetz.com 
      java.naming.security.authentication ==> DIGEST-MD5 
      com.sun.jndi.ldap.connect.pool ==> true 
      java.naming.security.credentials ==> password 
      java.naming.security.protocol ==> ssl
       OK. Connection established