Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Advice for saving a plaintext password for LDAP re-binds using StartTLS

by ghenry (Vicar)
on Aug 15, 2013 at 20:22 UTC ( #1049650=perlquestion: print w/ replies, xml ) Need Help??
ghenry has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'm developing a web gui with Dojo and Catalyst for contacts management. It's for the public directory servers that power the SureVoIP IM service and store your global and private contact list.

ldap.surevoip.co.uk is public now and I'm working on syncing in from LinkedIn, Google and Salesforce. You just point your phone, email etc. at the server and import/export vcards, or LDIF.

Anyway, problem is that on the initial login I do an LDAP bind over StartTLS for authenticating and then create the session. That's fine as the session ticks over until it expires. My problem scope is that any LDAP operations need a re-bind as the logged in user (the user DN is in the session, so that's OK), but I don't have the plaintext password to re-bind with. Should I save this? I can't save a hash as I need the plaintext one.

Advice?

Thanks,
Gavin.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Comment on Advice for saving a plaintext password for LDAP re-binds using StartTLS
Re: Advice for saving a plaintext password for LDAP re-binds using StartTLS
by 5mi11er (Deacon) on Aug 16, 2013 at 22:52 UTC
    It's been a while since I've done a lot of LDAP, but I think it would be possible to immediately rebind as that user once the login is successful. Hopefully at the time of successful login you still have the password available?

    -Scott

      thanks. Yes, that is possible although I've decided to create a contacts admin user with restricted necessary only permissions.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1049650]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-09-24 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (244 votes), past polls