You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Takashi Sato <ta...@lans-tv.com> on 2008/11/24 16:07:26 UTC
Fw: MatchAll description
I sent the mail to a wrong address.
I send it again to docs@
Begin forwarded message:
Date: Sat, 15 Nov 2008 11:09:25 +0900
From: Takashi Sato <ta...@lans-tv.com>
To: doc@httpd.apache.org
Cc: dev@httpd.apache.org
Subject: MatchAll description
http://httpd.apache.org/docs/trunk/mod/mod_authz_core.html#matchall
"If none of the directives contained within the <MatchAll> directive fails,
and at least one succeeds, then the <MatchAll> directive succeeds. "
According to this, following config would grant an access from 127.0.0.1
with no username/password.
<Location /server-info>
SetHandler server-info
AuthType Digest
AuthName "private area"
AuthUserFile "/var/www/password"
Match valid-user
Match ip 127.0.0.0/8
</Location>
But actually 127.0.0.1 needs to be "valid-user".
Considering difference between MatchAll and MatchAny,
this is correct behavior.
The How to says different thing from mod_authz_core doc:
http://httpd.apache.org/docs/trunk/howto/auth.html#beyond
"To authorize the request, none of the negated directives can match
their parameters, while all of the positive directives must match their
parameters (or else return a neutral result)."
mod_authz_core doc should be fixed ?
I'm not sure which is better for this mail, docs@ or dev@.
Regards,
Takashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: MatchAll description
Posted by Takashi Sato <ta...@lans-tv.com>.
> Takashi Sato wrote:
>
> > http://httpd.apache.org/docs/trunk/mod/mod_authz_core.html#matchall
> > "If none of the directives contained within the <MatchAll> directive fails,
> > and at least one succeeds, then the <MatchAll> directive succeeds. "
> >
> > According to this, following config would grant an access from 127.0.0.1
> > with no username/password.
> >
> > <Location /server-info>
> > SetHandler server-info
> >
> > AuthType Digest
> > AuthName "private area"
> > AuthUserFile "/var/www/password"
> >
> > Match valid-user
> > Match ip 127.0.0.0/8
> > </Location>
> >
> > But actually 127.0.0.1 needs to be "valid-user".
>
> Yes, that's true, because the "valid-user" authz provider will
> succeed for any request with a login (it assumes the authn providers
> have authenticated that login), but fail for any request without
> a login. So in the case you describe, it fails, which means the block
> as a whole fails (since one or more of the directives failed).
>
> There are certainly some subtle aspects to all of this, in particular,
> the way that "positive" directives (like Match and Require) can only
> return success or failure, while "negated" directives can only return
> failure or a neutral value. Then you've got the specific action of
> the various authz providers.
Thanks for explanation. I thought "positive" directives can only return
success or neutral value.
> Here I might think we want to add a note to the docs on the
> valid-user provider that it fails if there's no login. Would that help,
> do you think?
I'm looking at mod_authz_user.xml, and IMHO it is sufficient.
I feel like add something to mod_authz_core.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Fw: Re: MatchAll description
Posted by Takashi Sato <ta...@lans-tv.com>.
Begin forwarded message:
Date: Mon, 17 Nov 2008 09:27:03 -0800
From: Chris Darroch <ch...@pearsoncmg.com>
To: doc@httpd.apache.org
Cc: takashi@lans-tv.com
Subject: Re: MatchAll description
From: Chris Darroch <ch...@pearsoncmg.com>
To: doc@httpd.apache.org
CC: takashi@lans-tv.com
Subject: Re: MatchAll description
Date: Mon, 17 Nov 2008 09:27:03 -0800
Organization: Pearson CMG/CTG
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080925 SeaMonkey/1.1.12
Takashi Sato wrote:
> http://httpd.apache.org/docs/trunk/mod/mod_authz_core.html#matchall
> "If none of the directives contained within the <MatchAll> directive fails,
> and at least one succeeds, then the <MatchAll> directive succeeds. "
>
> According to this, following config would grant an access from 127.0.0.1
> with no username/password.
>
> <Location /server-info>
> SetHandler server-info
>
> AuthType Digest
> AuthName "private area"
> AuthUserFile "/var/www/password"
>
> Match valid-user
> Match ip 127.0.0.0/8
> </Location>
>
> But actually 127.0.0.1 needs to be "valid-user".
Yes, that's true, because the "valid-user" authz provider will
succeed for any request with a login (it assumes the authn providers
have authenticated that login), but fail for any request without
a login. So in the case you describe, it fails, which means the block
as a whole fails (since one or more of the directives failed).
There are certainly some subtle aspects to all of this, in particular,
the way that "positive" directives (like Match and Require) can only
return success or failure, while "negated" directives can only return
failure or a neutral value. Then you've got the specific action of
the various authz providers.
Here I might think we want to add a note to the docs on the
valid-user provider that it fails if there's no login. Would that help,
do you think?
Chris.
--
GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263 E4DE C8E3 FA36 366A 375B
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org