• 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

Transitioning LDAP to Spring

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there anything out there that can give examples on how to code LDAP for Spring and then use it? Specifically, I don't need it for authentication, but rather to get the child values for what data the user can access. When I pull the ldif, I get something like cn=appId, cn=accessId, ou=dataAccessLevel, dc=level2, dc=level1, dc=com. What I want to get are the values underneath that would show up as cn=regionId, cn=accessId, ou=dataAccessLevel... etc. I've seen the context to set up for the spring connection but I can't seem to find code for doing this. The ancient code we have hits LDAP multiple times just to extract all the info for just one thing and can cause the process to take up to 30 seconds just pulling the LDAP data (so you can see why I'm hot to move to Spring). And I want to do this correctly. Any info you can provide would be great. Thanks.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it isn't really a transition. LDAP and Spring are two totally different things. Spring is not a replacement for LDAP. Now for Spring Security, you can use LDAP as the storage for the User and Roles data. For that you need to Google "LDAP UserDetailsService" and see what you find.

Mark
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, guess I wasn't clear. I'm transitioning LDAP from old java interface to spring. Not intereted in authentication, just getting objects from specific location.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean using this?

http://www.springsource.org/node/1000

Unfortunately, I haven't used this Spring Module, but usually the Spring documentation on the projects are pretty good.

Here is the link to that documentation

http://static.springsource.org/spring-ldap/docs/1.3.x/reference/html/

And it looks like there is a Template class that makes calls to LDAP for you, so that boilerplate code is removed.

Good Luck

Mark
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured a way around this. Sorry for being so obtuse - wasn't my intention and I am very new to Spring, so I wasn't sure what to ask for. The link is actually beneficial although it wasn't what I needed. Thanks for trying to help me, though. I really appreciate it.
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. 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