You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Phil Endecott <sp...@chezphil.org> on 2007/11/04 18:15:39 UTC
[users@httpd] Authentication not checked in proxied directory
Dear Experts,
I'm surprised to find that authentication does not seem to be checked
in a directory which I proxy to another local server:
<Location /something>
AuthName "my_auth_name"
AuthType basic
AuthPAM_Enabled off
AuthBasicProvider dbd
AuthDBDUserPWQuery "...sql..."
require valid-user
ProxyPass http://localhost:12345 smax=0 ttl=60
ProxyPassReverse http://localhost:12345
</Location>
I am able to access content from here without providing any credentials.
Is this the expected behaviour?
This is with 2.2.4.
Regards,
Phil.
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Authentication not checked in proxied directory
Posted by Nick Kew <ni...@webthing.com>.
On Sun, 04 Nov 2007 17:15:39 +0000
"Phil Endecott" <sp...@chezphil.org> wrote:
> Dear Experts,
>
> I'm surprised to find that authentication does not seem to be checked
> in a directory which I proxy to another local server:
>
> <Location /something>
> AuthName "my_auth_name"
> AuthType basic
> AuthPAM_Enabled off
What's that?
> AuthBasicProvider dbd
> AuthDBDUserPWQuery "...sql..."
> require valid-user
>
> ProxyPass http://localhost:12345 smax=0 ttl=60
> ProxyPassReverse http://localhost:12345
> </Location>
What "Satisfy" value and Order/Allow/deny applies?
Check your config for any other stanzas that match
(including - potentially - <Location />).
> I am able to access content from here without providing any
> credentials.
What shows up in your logs? That'll tell you if your browser
has cached credentials.
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Authentication not checked in proxied directory [NOT!]
Posted by Eric Covener <co...@gmail.com>.
On Nov 4, 2007 1:56 PM, Phil Endecott
<sp...@chezphil.org> wrote:
> DocumentRoot /var/www/something
> <Directory /var/www/something>
> ...auth stuff...
> </Directory>
>
> <Location /proxied>
> ...no auth stuff...
> ProxyPass ...
> </Location>
>
> I found that the auth stuff in the first section was not being applied
> to the proxied directory.
This is by design, your proxied content isn't anywhere in your
filesystem, much less under /var/www/something.
http://httpd.apache.org/docs/2.2/sections.html#file-and-web
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: Authentication not checked in proxied directory [NOT!]
Posted by Phil Endecott <sp...@chezphil.org>.
> I'm surprised to find that authentication does not seem to be checked
> in a directory which I proxy to another local server:
Ooops, I was changing the wrong part of the file. Ignore most of what
I wrote.
Basically I originally had this:
DocumentRoot /var/www/something
<Directory /var/www/something>
...auth stuff...
</Directory>
<Location /proxied>
...no auth stuff...
ProxyPass ...
</Location>
I found that the auth stuff in the first section was not being applied
to the proxied directory. Presumably the issue here is to do with
(lack of) inheritance between <Directory> and <Location> sections.
Maybe I should have <Location /> instead of <Directory (DocumentRoot)>
- I think there was some reason why I did it that way, but I can't
remember it now.
Anyway, having noticed the problem I decided to copy the auth lines
into the <Location /proxied> section, and they seemed to not work.
Actually I was editing the wrong part of the file.
I've now changed the right part of the file, and I think it is working
as expected.
The interesting thing about this mistake is that, because you're asked
for a password when you go to the root of the site, you get the
impression that credentials are being checked when in fact they are not
for the subdirectory. By going directly to the subdirectory, the
authentication is bypassed.
Could the semantics of the config file be more fail-safe? It would be
good to at least get a warning.
Regards,
Phil.
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org