• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Security LDAP issues

 
Ranch Hand
Posts: 41
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So i can run ldapsearch and get results but i get an auth error using ldap in spring security:




this is my result on the DN when i run the above commands to each ldap server:


here is my spring security config for the ldap:



I'm getting a authentication error (ldap 49 error). see the stack below:
If anyone can help me I would be most grateful. I feel I'm missing something small.
the basic doc is very short and unclear : http://docs.spring.io/spring-security/site/docs/3.0.x/reference/ldap.html

stack trace:
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the LDAP IP address correct?
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes sorry we have three ldap server that are replicated. address 30 is the master one
 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, since I'm vaguely familiar with LDAP personally, I would put a network sniffer and manually inspect the calls going over TCP to check the differrences. However, that may not be the easiest way to get to the bottom of this

The core error is



thrown by LDAP. Spring is merely rethrowing the exception. Someone familiar with LDAP error codes might give you a better answer. I have added this question to the Java In General forum. Maybe somewhere over there has more experience with LDAP

Have you tried googling for that error code?
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://wiki.servicenow.com/index.php?title=LDAP_Error_Codes

Yes Its an authentication error on the bind i do think.

Thank you so far for your help. I have an idea I'd like to try and I'll post the response i get good or bad.
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So here is the new settings and it binds fine, i know its binding cause it will give me the 49 error stack as before when i provide it the wrong password now. Now its the 32 error with this setting. LDAP_NO_SUCH_OBJECT



here is my crude attempt to show you my structure depth of the object if this helps anyone understand my structure


here is the new stack with 32 error:
 
Joseph Swager
Ranch Hand
Posts: 41
IntelliJ IDE Spring Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So to share with everyone here is the settings i did to get the LDAP working. I built it out as beans itself and then added them to the auth Manager. Maybe it will help someone in the future:



Thanks Jayesh for your help!
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic