#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    6
    Rep Power
    0

    Ldap authentication CGI/Perl


    I have a simple webpage deployed to tomcat which runs certain shell scripts based on user selection. The pages are written in html and cgi/perl.

    We already have a working ldap server and directory. I need to be able to add security to the web page I created so a user is asked to login using their ldap account when trying to access the home page or any off the sub pages.

    How do I add ldap authentication to my web page?

    Please be very specific as I am new to all of this. Step by step instructions including code would be greatly appreciated. Thank You

    I did a lot of research on google, but all of the solutions are generic, and I don't know where to start.

    This is a good article, but I'm not sure where do I put my connection to ldap and the binding (which of my pages)? How do I make sure the authentication will apply to the sub pages as well, or any other one created in the future?

    http://www.perlmonks.org/?node_id=32196

    Cheers
    Last edited by kavkazi; October 18th, 2012 at 11:13 AM. Reason: forgot to add link
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,967
    Rep Power
    1225
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    6
    Rep Power
    0
    Originally Posted by FishMonger
    Do I need to install anything to use this package "use Net::LDAP"??

    Also, where do I put this code so the authentication will be in effect for all pages?

    Thanks
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,967
    Rep Power
    1225
    You need to install both of those modules.

    You need to create a login page that authenticates the user and sets the session vars. Then all other pages need to check the session data and take what ever action is needed based on that session data.

IMN logo majestic logo threadwatch logo seochat tools logo