Reputation: 3
I'm trying to implement REST services over LDAP directory. Both have Kerberos-protected access. I already have working code (based on Security Server Spnego and Form Auth Sample sample), which login user and store autentication
object in users session. Then I make REST call to my app with sessionID and Spring Security pass it through - that's ok.
But now in REST controller I want to make an LDAP call on behalf of logged user using for example Spring's LdapTemplate class.
I have KerberosUsernamePasswordAuthenticationToken
instance from user session. From it how can I make KerberosLdapContextSource
which is needed for LdapTemplate to make an LDAP calls?
Whether such an approach is correct and implementable at all? If so, could you please suggest some sample code.
Upvotes: 0
Views: 111