This discussion is archived
0 Replies Latest reply: Aug 28, 2012 2:59 PM by 958582 RSS

Java 6 authentication issue with LDAP

958582 Newbie
Currently Being Moderated
I hate to do this, but someone closed a thread without provide a proper response.

I'm having this issue: Java 6 JNDI & Active Directory authentication issue

Now, before close the thread and talk to people like if they were stupid, please read carefully, If you have an answer it will be really appreciated.

The problem is with authentication to an Active Directory with windows server 2008, I'm using spring-ldap, but I also try to fix the problem calling directly to LdapCtx, the problem IS NOT RELATED TO CODE, actually, the same code works perfectly fine in Java 5, but, when the JVM is upgraded to Java 6 this problem araise:

javax.naming.OperationNotSupportedException:
LDAP: error code 53 - 0000001F: SvcErr: DSID-031A11E5, problem 5003 (WILL_NOT_PERFORM)

I tried several different ways to fix this, and, the closest solution I have is to add to InitialLdapContext this line:

ctx.addToEnvironment (Context.SECURITY_AUTHENTICATION, "EXTERNAL DIGEST-MD5 GSS-SPNEGO GSSAPI");

Seems like GSSAPI is the only sasl mechanisms that works, but I'm having several issues to properly configure the conection with this using Java 6.

I really think this is a bug injected in Java 6, because the things worked smooth in production for almost 2 years until we decide to upgrade to Java 6.

Any help will be appreciated.
Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points