You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ryan Thompson <ht...@sasknow.com> on 2002/02/11 01:29:54 UTC
Passing CGI environment to auth
Hi all,
Hopefully what I'm doing isn't so strange that nobody knows what I'm
trying to do. :-)
Basically, I need an external auth program (used with mod_auth_any, or
mod_auth_external.. I don't really care which) to be able to see the
standard CGI variables, like DOCUMENT_URI. I need to do this so I can
authorize users based on user, pass AND the requested document.
When I set up an auth program with mod_auth_any, for example, the user
and password are send as command line arguments. The DOCUMENT_URI
environment variable, however, is not defined.
I won't swear to it, but I thought I'd tried this with apache 1.3.20
and it worked. I'm using 1.3.22 now.
Suggestions?
Thanks,
- Ryan
--
Ryan Thompson <ry...@sasknow.com>
Network Administrator, Accounts
SaskNow Technologies - http://www.sasknow.com
#106-380 3120 8th St E - Saskatoon, SK - S7H 0W2
Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon
Toll-Free: 877-727-5669 (877-SASKNOW) North America
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Passing CGI environment to auth
Posted by Martin Haase-Thomas <mh...@meome-ag.de>.
Hmm, perhaps mod_rewrite may help you:
RewriteRule (.*) $1 [E=REQUEST_URI:$1]
Looks a bit weird, and i've never tried it so far, but maybe... ;)
cheers
Martin
Ryan Thompson wrote:
>Hi all,
>
>Hopefully what I'm doing isn't so strange that nobody knows what I'm
>trying to do. :-)
>
>Basically, I need an external auth program (used with mod_auth_any, or
>mod_auth_external.. I don't really care which) to be able to see the
>standard CGI variables, like DOCUMENT_URI. I need to do this so I can
>authorize users based on user, pass AND the requested document.
>
>When I set up an auth program with mod_auth_any, for example, the user
>and password are send as command line arguments. The DOCUMENT_URI
>environment variable, however, is not defined.
>
>I won't swear to it, but I thought I'd tried this with apache 1.3.20
>and it worked. I'm using 1.3.22 now.
>
>Suggestions?
>
>Thanks,
>- Ryan
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
SOLVED: Re: Passing CGI environment to auth
Posted by Ryan Thompson <ry...@sasknow.com>.
Ryan Thompson wrote to users@httpd.apache.org:
> When I set up an auth program with mod_auth_any, for example, the
> user and password are send as command line arguments. The
> DOCUMENT_URI environment variable, however, is not defined.
Ok... I pointed mod_auth_external at /usr/bin/printenv to discover
that mod_auth_external passes its own "URI" environment variable along
with the USER and PASS variables. Knowing this, it was a simple matter
of changing getenv("DOCUMENT_URI") to getenv("URI")... but who knew?
:-)
mod_auth_any doesn't seem to do anything like this.
- Ryan
--
Ryan Thompson <ry...@sasknow.com>
Network Administrator, Accounts
SaskNow Technologies - http://www.sasknow.com
#106-380 3120 8th St E - Saskatoon, SK - S7H 0W2
Tel: 306-664-3600 Fax: 306-664-1161 Saskatoon
Toll-Free: 877-727-5669 (877-SASKNOW) North America
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org