[Xitami] Password protected Perl CGI.
David Michaels
xitami@lists.xitami.org
Mon, 13 Aug 2001 11:50:30 -0400
Morning.
A 2 part challenge. This CGI is running on a Win32 platform, but I would like the solution to work on any. I've got a few hours of Googling on this but don't seem to be hitting the right keyword combos, and I couldn't find anything helpful in the local bookstore computer section. I've read through the O'reilly DBI, CGI.pm, Programming Perl and Perl Cookbook manuals and the cpan.org security mods section but haven't found what I'm looking for.
First part. I have been searching for a simple way to password protect a Perl CGI program. (I'm using CGI.pm and DBI.pm). I don't need heavy authentication, just basic security - something to keep casual browsers out. Is there a Perl module that can supply this functionality? If so, is there a HOWTO? If not, has anyone written a secure front-end (Perl or HTML/CGI.pm) to a Perl CGI that they are willing to share? I can see how to do it without a libmod, but I think I'd just be re-inventing, and probably not as well as someone who does this all the time.
Second part. At this time, a user can bookmark this CGI location, bypassing any password protection scheme. Is there some way around this using Perl and/or HTML? I've seen this with forms using ASP or PHP but haven't found it with Perl. It seems to me that the CGI is static, and I can't think of a way to keep it from being loaded if someone goes directly to the page, unless the password code is an integral part of the code itself - but this becomes a hassle for folks who are doing multiple entries (20 -30) at one session.
All helpful thoughts accepted. I will compile and post the results to ADV-HTML, including replies from other lists referenced.
Aloha!
David
______________________________________________________
David Michaels
Technology Development Office, College of Education, USC