Re: Apache::TicketAccess
On Thu, 20 Feb 2003, Nick Tonkin wrote: > > Is it the cookie doesn't get sent back thru the reverse proxy? > > As Perrin said, you need to see what is actually happening. Dumping the > headers is a great way to start. Right at the top of your handler do Or you can use Apache::DumpHeaders. http://search.cpan.org/dist/Apache-DumpHeaders/DumpHeaders.pm - ask -- ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();
Re: Apache::TicketAccess
On Thu, 20 Feb 2003, Scott Alexander wrote: > On Thu, 20 Feb 2003, Scott Alexander wrote: > > If I set my browser to david:8080/login.pl then everything works okay, > Cookie gets set, and my session is current until I logout. > > So the setup is something to do with mod_proxy on the proxy server. > > Is it the cookie doesn't get sent back thru the reverse proxy? As Perrin said, you need to see what is actually happening. Dumping the headers is a great way to start. Right at the top of your handler do sub handler { my $r = shift; warn $r->as_string; If the cookies are being sent to the browser, they'll be there. If they are and it's still not working, you need to look at the reading of the cookies in your module. - nick -- Nick Tonkin {|8^)>
Re: Apache::TicketAccess
On Thu, 20 Feb 2003, Scott Alexander wrote: If I set my browser to david:8080/login.pl then everything works okay, Cookie gets set, and my session is current until I logout. So the setup is something to do with mod_proxy on the proxy server. Is it the cookie doesn't get sent back thru the reverse proxy? I use cookies in some other areas of the application and they are working fine since moving over to a reverse_proxy server, mod_perl server setup. Regards Scott > Hi, > > I'm trying to use the example from the Eagle book on page 309 - 314 using > the TicketAccess, TicketMaster, TicketTool handlers. > > In TicketMaster in sub go_to_uri it sets the a cookie with the $ticket. > > I can print $ticket to error log to see what it contains. But for some > reason the cookie never gets set. > > Netscape's cookie manager doesn't show any new cookie from my site. > > > Here is a copy from my httpd.cong file for the two servers. > > david1 is a mod_proxy for the mod_perl server (david) > > On david1 I have > ProxyPass /login.pl http://david:8080/login.pl > ProxyPassReverse /login.pl http://david:8080/ > > > On david the mod_perl server in the httpd.conf file I have > > > > SetHandler perl-script > PerlHandler Apache::TicketMaster > PerlSetVar TicketDomain david1 > PerlSetVar TicketSecret /key.txt > PerlSetVar TicketDatabase mysql:admin > PerlSetVar TicketTableperson:user:passwd > PerlSetVar TicketExpires 100 > > > > > > PerlSendHeader On > SetHandler perl-script > PerlHandler Apache::Registry > Options +ExecCGI > > # OLD > #AuthName "Oppilaitosjärjestelmä" > #AuthType Basic > #PerlAuthenHandler Apache::AuthAny > #require valid-user > # > #require valid-user > # > > # NEW > PerlAccessHandler Apache::TicketAccess > PerlSetVar TicketDomain david1 > PerlSetVar TicketSecret /key.txt > PerlSetVar TicketDatabase mysql:admin > PerlSetVar TicketTableperson:user:passwd > PerlSetVar TicketExpires 100 > ErrorDocument 403 /login.pl > > ErrorDocument 401 /bin/admin/error/401.html > #ErrorDocument 403 /bin/admin/error/403.html > ErrorDocument 404 /bin/admin/error/404.html > ErrorDocument 500 /bin/admin/error/500.html > > > Any help is appreciated > > Scott >
Re: Apache::TicketAccess
Scott Alexander wrote: I'm trying to use the example from the Eagle book on page 309 - 314 using the TicketAccess, TicketMaster, TicketTool handlers. In TicketMaster in sub go_to_uri it sets the a cookie with the $ticket. I can print $ticket to error log to see what it contains. But for some reason the cookie never gets set. I haven't used these modules, but I suggest you do some further debugging. Try looking at the headers being sent back from the server and see if it is sending the cookie header or not. Try going straight to it without going through the proxy. Find out what is actually happening. Then you'll have a better idea what needs to be fixed. By the way, most people use CPAN modules for this rather than the stuff in the Eagle book. Look at things like Apache::AuthTicket or Apache::AuthCookieURL. (I don't have a use for any of these modules, so I can't personally recommend one.) - Perrin
Re: Apache::TicketAccess
You might want to consider Apache::AuthTicket, which IS in CPAN. It's an expanded version of the Eagle book's modules, and very capable, yet also relatively simple. --Jon Robison Per Einar Ellefsen wrote: > > At 21:50 31.05.2002, Arnold van Kampen wrote: > > >Hi > > > >Where did it go? > > The modules written for the Eagle book haven't been released to CPAN. They > are available online. See > http://modperl.com:9000/book/source/apachemod-code-1.02/lib/Apache/ > > -- > Per Einar Ellefsen > [EMAIL PROTECTED]
Re: Apache::TicketAccess
At 21:50 31.05.2002, Arnold van Kampen wrote: >Hi > >Where did it go? The modules written for the Eagle book haven't been released to CPAN. They are available online. See http://modperl.com:9000/book/source/apachemod-code-1.02/lib/Apache/ -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Apache::TicketAccess
Ray Recendez wrote: > Running it from the command line seems to work: > rift_root>perl -MMD5 -e 'print "ok\n";' > ok Is it possible that you may have installed this module using a different compiler from the one you used for mod_perl? or maybe built mod_perl against a different perl installation? Also, take all of those 'use libe' statements out of your script. If you are using the perl installed at /usr/local/lib/perl5/5.6.1/ and those things aren't in your @INC already, you have serious problems with your installation and should probably rebuild perl and mod_perl from scratch. - Perrin
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_root>perl -MMD5 -e 'print "ok\n";' ok rift_root> --Ray
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
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
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