Apache::TicketAccess
I am new to perl/mod_perl and I am trying to implement secure authentication with expirable ticket/cookies on our website (Apache 1.3.9-Solaris 2.8). I am trying to use Apache::TicketAccess with Apache 1.3.9, modssl, openssl, and mod_ssl installed but I am having problems even though everything compiled and installed without errors. It seems like Apache/mod_perl cant locate some of the *.pm files even though I add the lib paths using use lib. What is the difference between /usr/local/lib/perl5/5.6.1 directory and /usr/local/lib/perl/site_perl? Is site_perl platform specific? Where should modules be installed? Can anyone see any problems? Is there an easier/better solution? I know its a lot questions, but I hit a wall and need some help. [Thu Mar 7 23:12:43 2002] [error] [Thu Mar 7 23:12:43 2002] TicketAccess.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: [Thu Mar 7 23:12:43 2002] MD5.pm: Can't locate loadable object for module MD5 in @INC (@INC contains: /usr/local/apache/lib/perl/ /usr/local/lib/perl5/5.6.1//sun4-solaris /usr/local/lib/perl5/5.6.1/ /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/ /usr/local/lib/perl5/site_perl/5.6.1//sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1/ /export/home /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl /usr/local/apache/lib/perl . /usr/local/apache/) at /usr/local/apache/lib/perl//Apache/TicketTool.pm line 11 [Thu Mar 7 23:12:43 2002] TicketAccess.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: [Thu Mar 7 23:12:43 2002] MD5.pm: Compilation failed in require at /usr/local/apache/lib/perl//Apache/TicketTool.pm line 11. [Thu Mar 7 23:12:43 2002] TicketAccess.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: BEGIN failed--compilation aborted at /usr/local/apache/lib/perl//Apache/TicketTool.pm line 11. [Thu Mar 7 23:12:43 2002] TicketAccess.pm: [Thu Mar 7 23:12:43 2002] TicketTool.pm: Compilation failed in require at /usr/local/apache/lib/perl/Apache/TicketAccess.pm line 11. [Thu Mar 7 23:12:43 2002] TicketAccess.pm: BEGIN failed--compilation aborted at /usr/local/apache/lib/perl/Apache/TicketAccess.pm line 11. Compilation failed in require at (eval 220) line 3. Here is /usr/local/apache/lib/perl/Apache/TicketAccess.pm- #!/usr/local/bin/perl -w -I /usr/local/lib/perl5/site_perl/5.6.1:/usr/local/apache/lib/perl:/usr/lo cal/apache/lib/perl/Apache package Apache::TicketAccess; # file: Apache/TicketAccess.pm use strict; use warnings; use lib '/usr/local/lib/perl5/site_perl/5.6.1/'; use lib '/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/'; use lib '/usr/local/lib/perl5/5.6.1/'; use lib '/usr/local/apache/lib/perl/'; use Apache::Constants qw(:common); use Apache::TicketTool (); sub handler { my $r = shift; my $ticketTool = Apache::TicketTool-new($r); my($result, $msg) = $ticketTool-verify_ticket($r); unless ($result) { $r-log_reason($msg, $r-filename); my $cookie = $ticketTool-make_return_address($r); $r-err_headers_out-add('Set-Cookie' = $cookie); return FORBIDDEN; } return OK; } 1; Ray
RE: Apache::TicketAccess
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 12:16 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Apache::TicketAccess Ray Recendez wrote: I am new to perl/mod_perl and I am trying to implement secure authentication with expirable ticket/cookies on our website (Apache 1.3.9-Solaris 2.8). I am trying to use Apache::TicketAccess with Apache 1.3.9, modssl, openssl, and mod_ssl installed but I am having problems even though everything compiled and installed without errors. It seems like Apache/mod_perl can?t locate some of the *.pm files even though I add the lib paths using ?use lib.? The error message says it's looking for the MD5 module. Do you have it? What is the difference between /usr/local/lib/perl5/5.6.1 directory and /usr/local/lib/perl/site_perl? The site_perl directory is for modules you install, as opposed to Perl's standard library. Is site_perl platform specific? There are subdirectories under it for platform specific stuff. Usually only XS modules will have anything there. Where should modules be installed? The installation scripts for CPAN modules know where to install themselves: site_perl. If you need more information on module installation, I suggest checking out man perlmod and the CPAN FAQ. There's also lots of info in the Programming Perl book. - Perrin Yes I have MD5 installed. However, MD5.pm is located in the following locations: /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/MD5.pm ; /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/MD5/MD5.pm ; and /usr/local/lib/perl5/site_perl/5.6.1/MD5.pm. Which one is correct? Is there another similar authentication package or is Apache::TicketAccess the best one out there. Thanks, Ray
RE: Apache::TicketAccess
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 12:48 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Apache::TicketAccess Ray Recendez wrote: Yes I have MD5 installed. However, MD5.pm is located in the following locations: /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/MD5.pm ; /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/MD5/MD5.pm ; and /usr/local/lib/perl5/site_perl/5.6.1/MD5.pm. Which one is correct? All of them. There are platform-specific parts installed under the paths with solaris in them. Does it work when you use it from command-line? perl -MMD5 -e 'print ok\n;' Is there another similar authentication package or is Apache::TicketAccess the best one out there. I've never used Apache::TicketAccess, but it looks fine. Anyway, you aren't having problems with Apache::TicketAccess, you're having problems with MD5. Any auth scheme is likely to want a working MD5. - Perrin Running it from the command line seems to work: rift_rootperl -MMD5 -e 'print ok\n;' ok rift_root --Ray
Authentication???
I am trying decide which authentication scheme to use with Apache on Solaris. I want to be able to issue cookies and expire them after a set duration. What is the best method/module(s)? And which provides the most documentation on setup and configuration? Thanks, --Ray