Re: Help writting a module for Apache.

2000-06-13 Thread Vegard Vesterheim

Ariel Manzur <[EMAIL PROTECTED]> writes:

> Hi..
> 
> I need Apache to do this: always ask for basic authentication, and then
> accept any conbination of username/password as correct, and set an
> enviroment variable with the password sent on the request, so I can
> retrieve that on a CGI script, and do the real authentication there.
> I couldn't find a way to do that with the 'standard' apache modules, so I
> have to write one, and I have some questions:
> 
> - is that any module that alredy does that? :)
> - Can anyone point me to a "real life" example, or guide, on how to write
> and install a module using mod_perl? I use perl a lot, but I could find
> "easy" documentation on how to write modules (I don't want to read a _huge_
> man page for this simple task)
> 
> Can anyone help? Thanks!!
> 

Sounds like mod_auth_anon in the Apache distribution could be a
starting point.


-- 
Vegard Vesterheim   : Phone: +47 73593002
Runit AS: Fax:   +47 73591700
N-7034 Trondheim, NORWAY: Email: [EMAIL PROTECTED]



Re: Help writting a module for Apache.

2000-06-12 Thread Ariel Manzur

At 17:58 12/06/2000 -0400, J. J. Horner wrote:
>On Mon, 29 May 2000, Ariel Manzur wrote:
>> - Can anyone point me to a "real life" example, or guide, on how to write
>> and install a module using mod_perl? I use perl a lot, but I could find
>> "easy" documentation on how to write modules (I don't want to read a _huge_
>> man page for this simple task)
>> 
>What is wrong with using the skeleton in Chapter 6 of the Eagle book
>(Example 6-6)?

I don't have that book. :-)




Re: Help writting a module for Apache.

2000-06-12 Thread J. J. Horner

On Mon, 29 May 2000, Ariel Manzur wrote:

> I need Apache to do this: always ask for basic authentication, and then
> accept any conbination of username/password as correct, and set an
> enviroment variable with the password sent on the request, so I can
> retrieve that on a CGI script, and do the real authentication there.
> I couldn't find a way to do that with the 'standard' apache modules, so I
> have to write one, and I have some questions:
> 
> - is that any module that alredy does that? :)
> - Can anyone point me to a "real life" example, or guide, on how to write
> and install a module using mod_perl? I use perl a lot, but I could find
> "easy" documentation on how to write modules (I don't want to read a _huge_
> man page for this simple task)
> 

What is wrong with using the skeleton in Chapter 6 of the Eagle book
(Example 6-6)?

-- 
J. J. Horner
Apache, Perl, Unix, Linux
[EMAIL PROTECTED] http://www.knoxlug.org/




RE: Help writting a module for Apache.

2000-06-12 Thread Ariel Manzur

The script is inside a password protected directory, so if I can access the
script, it means I sent a correct username and password (right?). The
"AUTHORIZATION" key inside %ENV doesn't exist.. There is a
$ENV{'AUTH_TYPE'}, it contains "basic".. I tested it on apache 1.3.6 and
1.3.3..

At 16:16 12/06/2000 -0400, Jerrad Pierce wrote:
>Then you haven't gotten a username and password back, you should get 
>basic authinfo
>
>Where authinfo is a b64 encoded string that is
>username:password
>> Are you sure? I tryed $ENV{AUTHORIZATION} in normal cgi scripts and in
>> Apache::Registry and the variable is empty..
>> 
>> How do I use that module?
>> 
>> At 16:00 12/06/2000 -0400, Jerrad Pierce wrote:
>> >Apache::Authen?
>> >
>> >As for your method, 401 username password stuff is always 
>> accessible via:
>> >$ENV{AUTHORIZATION}
>> >
>> >> Hi..
>> >> 
>> >> I need Apache to do this: always ask for basic 
>> >> authentication, and then
>> >> accept any conbination of username/password as correct, and set an
>> >> enviroment variable with the password sent on the request, so I can
>> >> retrieve that on a CGI script, and do the real 
>> authentication there.
>> >> I couldn't find a way to do that with the 'standard' apache 
>> >> modules, so I
>> >> have to write one, and I have some questions:
>> >> 
>> >> - is that any module that alredy does that? :)
>> >> - Can anyone point me to a "real life" example, or guide, on 
>> >> how to write
>> >> and install a module using mod_perl? I use perl a lot, but I 
>> >> could find
>> >> "easy" documentation on how to write modules (I don't want to 
>> >> read a _huge_
>> >> man page for this simple task)
>> >> 
>> >> Can anyone help? Thanks!!
>> >> 
>> >> Bye..
>> >> 
>> >> Ariel.
>> >> 
>> 




RE: Help writting a module for Apache.

2000-06-12 Thread Jerrad Pierce

Then you haven't gotten a username and password back, you should get 
basic authinfo

Where authinfo is a b64 encoded string that is
username:password


  o _
 /|/ |   Jerrad Pierce \ | __|_ _|
 /||/   http://pthbb.org  .  | _|   |
 \||  _.-~-._.-~-._.-~-._@"  _|\_|___|___|


> -Original Message-
> From: Ariel Manzur [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 29, 2000 09:42
> To: Jerrad Pierce; [EMAIL PROTECTED]
> Subject: RE: Help writting a module for Apache.
> 
> 
> Are you sure? I tryed $ENV{AUTHORIZATION} in normal cgi scripts and in
> Apache::Registry and the variable is empty..
> 
> How do I use that module?
> 
> At 16:00 12/06/2000 -0400, Jerrad Pierce wrote:
> >Apache::Authen?
> >
> >As for your method, 401 username password stuff is always 
> accessible via:
> >$ENV{AUTHORIZATION}
> >
> >  o _
> > /|/ |   Jerrad Pierce \ | __|_ _|
> > /||/   http://pthbb.org  .  | _|   |
> > \||  _.-~-._.-~-._.-~-._@"  _|\_|___|___|
> >
> >
> >> -Original Message-
> >> From: Ariel Manzur [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, May 29, 2000 09:09
> >> To: [EMAIL PROTECTED]
> >> Subject: Help writting a module for Apache.
> >> 
> >> 
> >> Hi..
> >> 
> >> I need Apache to do this: always ask for basic 
> >> authentication, and then
> >> accept any conbination of username/password as correct, and set an
> >> enviroment variable with the password sent on the request, so I can
> >> retrieve that on a CGI script, and do the real 
> authentication there.
> >> I couldn't find a way to do that with the 'standard' apache 
> >> modules, so I
> >> have to write one, and I have some questions:
> >> 
> >> - is that any module that alredy does that? :)
> >> - Can anyone point me to a "real life" example, or guide, on 
> >> how to write
> >> and install a module using mod_perl? I use perl a lot, but I 
> >> could find
> >> "easy" documentation on how to write modules (I don't want to 
> >> read a _huge_
> >> man page for this simple task)
> >> 
> >> Can anyone help? Thanks!!
> >> 
> >> Bye..
> >> 
> >> Ariel.
> >> 
> 



RE: Help writting a module for Apache.

2000-06-12 Thread Ariel Manzur

Are you sure? I tryed $ENV{AUTHORIZATION} in normal cgi scripts and in
Apache::Registry and the variable is empty..

How do I use that module?

At 16:00 12/06/2000 -0400, Jerrad Pierce wrote:
>Apache::Authen?
>
>As for your method, 401 username password stuff is always accessible via:
>$ENV{AUTHORIZATION}
>
>  o _
> /|/ |   Jerrad Pierce \ | __|_ _|
> /||/   http://pthbb.org  .  | _|   |
> \||  _.-~-._.-~-._.-~-._@"  _|\_|___|___|
>
>
>> -Original Message-
>> From: Ariel Manzur [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, May 29, 2000 09:09
>> To: [EMAIL PROTECTED]
>> Subject: Help writting a module for Apache.
>> 
>> 
>> Hi..
>> 
>> I need Apache to do this: always ask for basic 
>> authentication, and then
>> accept any conbination of username/password as correct, and set an
>> enviroment variable with the password sent on the request, so I can
>> retrieve that on a CGI script, and do the real authentication there.
>> I couldn't find a way to do that with the 'standard' apache 
>> modules, so I
>> have to write one, and I have some questions:
>> 
>> - is that any module that alredy does that? :)
>> - Can anyone point me to a "real life" example, or guide, on 
>> how to write
>> and install a module using mod_perl? I use perl a lot, but I 
>> could find
>> "easy" documentation on how to write modules (I don't want to 
>> read a _huge_
>> man page for this simple task)
>> 
>> Can anyone help? Thanks!!
>> 
>> Bye..
>> 
>> Ariel.
>> 




RE: Help writting a module for Apache.

2000-06-12 Thread Jerrad Pierce

Apache::Authen?

As for your method, 401 username password stuff is always accessible via:
$ENV{AUTHORIZATION}

  o _
 /|/ |   Jerrad Pierce \ | __|_ _|
 /||/   http://pthbb.org  .  | _|   |
 \||  _.-~-._.-~-._.-~-._@"  _|\_|___|___|


> -Original Message-
> From: Ariel Manzur [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 29, 2000 09:09
> To: [EMAIL PROTECTED]
> Subject: Help writting a module for Apache.
> 
> 
> Hi..
> 
> I need Apache to do this: always ask for basic 
> authentication, and then
> accept any conbination of username/password as correct, and set an
> enviroment variable with the password sent on the request, so I can
> retrieve that on a CGI script, and do the real authentication there.
> I couldn't find a way to do that with the 'standard' apache 
> modules, so I
> have to write one, and I have some questions:
> 
> - is that any module that alredy does that? :)
> - Can anyone point me to a "real life" example, or guide, on 
> how to write
> and install a module using mod_perl? I use perl a lot, but I 
> could find
> "easy" documentation on how to write modules (I don't want to 
> read a _huge_
> man page for this simple task)
> 
> Can anyone help? Thanks!!
> 
> Bye..
> 
> Ariel.
> 



Help writting a module for Apache.

2000-06-12 Thread Ariel Manzur

Hi..

I need Apache to do this: always ask for basic authentication, and then
accept any conbination of username/password as correct, and set an
enviroment variable with the password sent on the request, so I can
retrieve that on a CGI script, and do the real authentication there.
I couldn't find a way to do that with the 'standard' apache modules, so I
have to write one, and I have some questions:

- is that any module that alredy does that? :)
- Can anyone point me to a "real life" example, or guide, on how to write
and install a module using mod_perl? I use perl a lot, but I could find
"easy" documentation on how to write modules (I don't want to read a _huge_
man page for this simple task)

Can anyone help? Thanks!!

Bye..

Ariel.