October 18th, 2012, 10:02 AM
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?
Last edited by kavkazi; October 18th, 2012 at 10:13 AM.
Reason: forgot to add link
October 18th, 2012, 10:18 AM
October 18th, 2012, 10:32 AM
Do I need to install anything to use this package "use Net::LDAP"??
Originally Posted by FishMonger
Also, where do I put this code so the authentication will be in effect for all pages?
October 18th, 2012, 10:40 AM
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.