Send modauthtkt-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/modauthtkt-users
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of modauthtkt-users digest..."
Today's Topics:
1. Getting cookie values via Apache::AuthTkt (Charlie Garrison)
2. Re: Getting cookie values via Apache::AuthTkt (Perrin Harkins)
3. Re: Getting cookie values via Apache::AuthTkt (Charlie Garrison)
4. Re: Getting cookie values via Apache::AuthTkt (Perrin Harkins)
5. Re: Getting cookie values via Apache::AuthTkt (Gavin Carr)
6. Need help with installing mod_auth_tkt (Harish V Chakravarthy)
7. Re: Need help with installing mod_auth_tkt (Gavin Carr)
8. Re: Need help with installing mod_auth_tkt (Harish V Chakravarthy)
----------------------------------------------------------------------
Message: 1
Date: Thu, 7 Jun 2007 08:44:23 +1000
From: Charlie Garrison <[EMAIL PROTECTED]>
Subject: [modauthtkt-users] Getting cookie values via Apache::AuthTkt
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Good morning,
I was speaking with Peter Karman on the Catalyst mailing list
and he suggested I check here to see if there has been any
progress on adding support for reading internal values from the
ticket/cookie using the Apache::AuthTkt module.
And as a follow-on, is anyone aware of any
Catalyst::Plugin::Authentication modules that support mod_auth_tkt?
Thanks,
Charlie
--
Charlie Garrison <[EMAIL PROTECTED]>
PO Box 141, Windsor, NSW 2756, Australia
------------------------------
Message: 2
Date: Thu, 07 Jun 2007 00:47:35 -0400
From: Perrin Harkins <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Getting cookie values via
Apache::AuthTkt
To: Charlie Garrison <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Charlie Garrison wrote:
> I was speaking with Peter Karman on the Catalyst mailing list
> and he suggested I check here to see if there has been any
> progress on adding support for reading internal values from the
> ticket/cookie using the Apache::AuthTkt module.
I have some code for doing this that I can share with you to get you
started. I'll try to pull it out into something generic and post it
tomorrow. You're welcome to integrate it into Apache::AuthTkt if you
can see where it should go.
- Perrin
------------------------------
Message: 3
Date: Thu, 7 Jun 2007 15:24:27 +1000
From: Charlie Garrison <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Getting cookie values via
Apache::AuthTkt
To: Perrin Harkins <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Good afternoon,
On 7/6/07 at 12:47 AM -0400, Perrin Harkins
<[EMAIL PROTECTED]> wrote:
>I have some code for doing this that I can share with you to
>get you started. I'll try to pull it out into something
>generic and post it tomorrow. You're welcome to integrate it
>into Apache::AuthTkt if you can see where it should go.
That would be fantastic, thanks.
But is it code you wrote for Apache::AuthTkt or for something
else? I've already got my hand-rolled code which peeks inside
the cookie/ticket, so I guess I could use that too. Mine is very
specific to one task though and not generic at all. So if yours
is pretty generic (or can be easily) then I would love to see it.
Thanks,
Charlie
--
Charlie Garrison <[EMAIL PROTECTED]>
PO Box 141, Windsor, NSW 2756, Australia
------------------------------
Message: 4
Date: Thu, 07 Jun 2007 16:49:40 -0400
From: Perrin Harkins <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Getting cookie values via
Apache::AuthTkt
To: Charlie Garrison <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain
On Thu, 2007-06-07 at 15:24 +1000, Charlie Garrison wrote:
> Good afternoon,
>
> On 7/6/07 at 12:47 AM -0400, Perrin Harkins
> <[EMAIL PROTECTED]> wrote:
>
> >I have some code for doing this that I can share with you to
> >get you started. I'll try to pull it out into something
> >generic and post it tomorrow. You're welcome to integrate it
> >into Apache::AuthTkt if you can see where it should go.
>
> That would be fantastic, thanks.
> But is it code you wrote for Apache::AuthTkt or for something
> else?
It's something else.
> I've already got my hand-rolled code which peeks inside
> the cookie/ticket, so I guess I could use that too. Mine is very
> specific to one task though and not generic at all. So if yours
> is pretty generic (or can be easily) then I would love to see it.
I'm not sure if you'll find mine much more generic or not, but it does
the job. It sounds like Peter submitted a patch that adds it to the
AuthTkt module directly, which is probably better. Anyway, here's a
snip from my code. The main job is done by _parse_cookie, which is
passed the value from the mod_auth_tkt cookie.
use MIME::Base64;
use Carp qw(croak);
use Apache::AuthTkt;
use Digest::SHA1 qw(sha1_hex);
# Details on mod_auth_tkt cookie
our $Md5DigestSize = 32;
our $TimeStampSize = 8;
our $Md5DigestTimeStampSize = $Md5DigestSize + $TimeStampSize;
our $Separator = '!';
# Singleton Apache::AuthTkt object
our $TICKET_MASTER;
sub _get_ticket_master {
$TICKET_MASTER ||=
Apache::AuthTkt->new(
conf => File::Spec->catfile(ArcosRoot, 'conf',
'auth_tkt.conf'));
return $TICKET_MASTER;
}
sub _parse_cookie {
my $class = shift;
my $cookie = shift;
# base 64 encoding is on by default in Apache::AuthTkt
my $decoded_cookie = MIME::Base64::decode_base64($cookie);
my $cookie_data = substr($decoded_cookie, $Md5DigestTimeStampSize);
# this is how the cookie crumbles
my ($person_id, $tokens, $arbitrary);
my @pieces = split($Separator, $cookie_data, 3);
# there is always a person_id and arbitrary data (username)
$person_id = shift @pieces;
$arbitrary = pop @pieces;
# there might be tokens as well
$tokens = shift @pieces;
# validate by generating a new digest
my $timestamp =
hex(substr($decoded_cookie, $Md5DigestSize, $TimeStampSize));
my $ticket_master = $class->_get_ticket_master();
my $test_ticket =
$ticket_master->ticket(uid => $person_id,
tokens => $tokens || '',
data => $arbitrary,
ts => $timestamp,
base64 => 0
) or croak($ticket_master->errstr());
# compare the MD5 digests to see if they match
if (substr($decoded_cookie, 0, $Md5DigestSize) ne
substr($test_ticket, 0, $Md5DigestSize))
{
# invalid cookie
my $ip = $class->_get_users_ip();
info("mod_auth_tkt cookie from user at IP $ip failed validation:
"
. $cookie);
return;
}
return $person_id;
}
- Perrin
------------------------------
Message: 5
Date: Mon, 11 Jun 2007 10:51:41 +1000
From: Gavin Carr <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Getting cookie values via
Apache::AuthTkt
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
On Thu, Jun 07, 2007 at 08:44:23AM +1000, Charlie Garrison wrote:
> I was speaking with Peter Karman on the Catalyst mailing list
> and he suggested I check here to see if there has been any
> progress on adding support for reading internal values from the
> ticket/cookie using the Apache::AuthTkt module.
That's my fault - Peter's sent me a patch for this but I haven't found
the tuits to integrate and test it yet. I'll try and get to that this
week.
> And as a follow-on, is anyone aware of any
> Catalyst::Plugin::Authentication modules that support mod_auth_tkt?
I'm not, but I'm a Catalyst newbie. I'm going to need this soon myself
though, so I'm interested as well. Anyone looked at this yet?
Regards,
Gavin
------------------------------
Message: 6
Date: Tue, 3 Jul 2007 09:55:51 -0700
From: Harish V Chakravarthy <[EMAIL PROTECTED]>
Subject: [modauthtkt-users] Need help with installing mod_auth_tkt
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Hi,
I need help with installing mod_auth_tkt 2.0.0rc2 on Solaris 9 running
apache 2.0.54
Version of libtool, apxs using is GNU 1.5.14 . Version of libtool
executed during make is GNU 1.5.18
Any help will be appreciated.
$> ./configure --apxs=/usr/local/apache2/bin/apxs --apachever=2
$> make
cd src && make all
make[1]: Entering directory
`/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
/usr/local/apache2/bin/apxs -c -Wc,"-Wall -ansi " mod_auth_tkt.c
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
-DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -g -O2 -pthreads -I/usr/local/apache2/include
-I/usr/local/apache2/include -I/usr/local/apache2/include -Wall -ansi -c
-o mod_auth_tkt.lo mod_auth_tkt.c && touch mod_auth_tkt.slo
In file included from /usr/local/apache2/include/ap_config.h:20,
from /usr/local/apache2/include/httpd.h:30,
from mod_auth_tkt.c:5:
/usr/local/apache2/include/apr.h:393:2: #error no decision has been made
on APR_PATH_MAX for your platform
In file included from /usr/local/apache2/include/apr_general.h:33,
from /usr/local/apache2/include/apr_pools.h:39,
from /usr/local/apache2/include/apr_tables.h:26,
from /usr/local/apache2/include/apr_hooks.h:22,
from /usr/local/apache2/include/ap_config.h:21,
from /usr/local/apache2/include/httpd.h:30,
from mod_auth_tkt.c:5:
/usr/include/signal.h:195: error: parse error before '*' token
mod_auth_tkt.c: In function `auth_tkt_register_hooks':
mod_auth_tkt.c:1400: warning: implicit declaration of function
`ap_hook_check_user_id'
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_auth_tkt.la] Error 1
make[1]: Leaving directory
`/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
make: *** [all] Error 2
Cheers,
Harish
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 7
Date: Wed, 4 Jul 2007 10:00:18 +1000
From: Gavin Carr <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Need help with installing mod_auth_tkt
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Hi Harish,
On Tue, Jul 03, 2007 at 09:55:51AM -0700, Harish V Chakravarthy wrote:
> I need help with installing mod_auth_tkt 2.0.0rc2 on Solaris 9 running
> apache 2.0.54
>
> Version of libtool, apxs using is GNU 1.5.14 . Version of libtool
> executed during make is GNU 1.5.18
>
> Any help will be appreciated.
>
> $> ./configure --apxs=/usr/local/apache2/bin/apxs --apachever=2
>
> $> make
> cd src && make all
> make[1]: Entering directory
> `/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
> /usr/local/apache2/bin/apxs -c -Wc,"-Wall -ansi " mod_auth_tkt.c
> /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
> -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS
> -D_REENTRANT -g -O2 -pthreads -I/usr/local/apache2/include
> -I/usr/local/apache2/include -I/usr/local/apache2/include -Wall -ansi -c
> -o mod_auth_tkt.lo mod_auth_tkt.c && touch mod_auth_tkt.slo
> In file included from /usr/local/apache2/include/ap_config.h:20,
> from /usr/local/apache2/include/httpd.h:30,
> from mod_auth_tkt.c:5:
> /usr/local/apache2/include/apr.h:393:2: #error no decision has been made
> on APR_PATH_MAX for your platform
> In file included from /usr/local/apache2/include/apr_general.h:33,
> from /usr/local/apache2/include/apr_pools.h:39,
> from /usr/local/apache2/include/apr_tables.h:26,
> from /usr/local/apache2/include/apr_hooks.h:22,
> from /usr/local/apache2/include/ap_config.h:21,
> from /usr/local/apache2/include/httpd.h:30,
> from mod_auth_tkt.c:5:
> /usr/include/signal.h:195: error: parse error before '*' token
> mod_auth_tkt.c: In function `auth_tkt_register_hooks':
> mod_auth_tkt.c:1400: warning: implicit declaration of function
> `ap_hook_check_user_id'
> apxs:Error: Command failed with rc=65536
> .
> make[1]: *** [mod_auth_tkt.la] Error 1
> make[1]: Leaving directory
> `/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
> make: *** [all] Error 2
Hmmm.
- is your make GNU make? If not, does gmake behave any differently?
- does adding an
#include "http_request.h"
to the top of mod_auth_tkt.c make any difference?
Cheers,
Gavin
------------------------------
Message: 8
Date: Tue, 3 Jul 2007 22:46:37 -0700
From: Harish V Chakravarthy <[EMAIL PROTECTED]>
Subject: Re: [modauthtkt-users] Need help with installing mod_auth_tkt
To: [email protected]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Gavin,
I am using GNU make and adding #include "http_request.h" did not help
either.
However, by adding D__EXTENSIONS__ to the Makefile, I was able to compile.
Updated line: $(APXS) -c -Wc,"-Wall -ansi $(CFLAGS) -D__EXTENSIONS__"
$(MAT).c
Is this a preferred way ?. Can you provide me with more information ?
Cheers,
Harish
Gavin Carr <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
07/03/07 17:01
To
[email protected]
cc
Subject
Re: [modauthtkt-users] Need help with installing mod_auth_tkt
Hi Harish,
On Tue, Jul 03, 2007 at 09:55:51AM -0700, Harish V Chakravarthy wrote:
> I need help with installing mod_auth_tkt 2.0.0rc2 on Solaris 9 running
> apache 2.0.54
>
> Version of libtool, apxs using is GNU 1.5.14 . Version of libtool
> executed during make is GNU 1.5.18
>
> Any help will be appreciated.
>
> $> ./configure --apxs=/usr/local/apache2/bin/apxs --apachever=2
>
> $> make
> cd src && make all
> make[1]: Entering directory
> `/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
> /usr/local/apache2/bin/apxs -c -Wc,"-Wall -ansi " mod_auth_tkt.c
> /usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic
> -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS
> -D_REENTRANT -g -O2 -pthreads -I/usr/local/apache2/include
> -I/usr/local/apache2/include -I/usr/local/apache2/include -Wall -ansi
-c
> -o mod_auth_tkt.lo mod_auth_tkt.c && touch mod_auth_tkt.slo
> In file included from /usr/local/apache2/include/ap_config.h:20,
> from /usr/local/apache2/include/httpd.h:30,
> from mod_auth_tkt.c:5:
> /usr/local/apache2/include/apr.h:393:2: #error no decision has been made
> on APR_PATH_MAX for your platform
> In file included from /usr/local/apache2/include/apr_general.h:33,
> from /usr/local/apache2/include/apr_pools.h:39,
> from /usr/local/apache2/include/apr_tables.h:26,
> from /usr/local/apache2/include/apr_hooks.h:22,
> from /usr/local/apache2/include/ap_config.h:21,
> from /usr/local/apache2/include/httpd.h:30,
> from mod_auth_tkt.c:5:
> /usr/include/signal.h:195: error: parse error before '*' token
> mod_auth_tkt.c: In function `auth_tkt_register_hooks':
> mod_auth_tkt.c:1400: warning: implicit declaration of function
> `ap_hook_check_user_id'
> apxs:Error: Command failed with rc=65536
> .
> make[1]: *** [mod_auth_tkt.la] Error 1
> make[1]: Leaving directory
> `/install/harishvc/install/mod_auth_tkt-2.0.0rc2/src'
> make: *** [all] Error 2
Hmmm.
- is your make GNU make? If not, does gmake behave any differently?
- does adding an
#include "http_request.h"
to the top of mod_auth_tkt.c make any difference?
Cheers,
Gavin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
modauthtkt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/modauthtkt-users
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
------------------------------
_______________________________________________
modauthtkt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/modauthtkt-users
End of modauthtkt-users Digest, Vol 10, Issue 1
***********************************************