You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2000/04/13 21:06:56 UTC

Re: cvs commit: apache-1.3 STATUS

>    Available Patches:
>   +
>   +    * Gerd Knorr <gk...@berlinonline.de>'s patch to enable mod_auth_digest
>   +      to handle both Digest *and* Basic authentication modes.
>   +	PR: 5879
>   +	Status: 

I'm probably missing something, so I'll ask.  :-)  Why is this patch
necessary, can't this be done by just using both mod_auth_digest and
mod_auth?  As long as neither say "AuthAuthoritative", the roll-over that
this patch provides is already provided.

So, what am I missing?

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-1.3 STATUS

Posted by Greg Stein <gs...@lyra.org>.
On Mon, 8 May 2000, Life is hard, and then you die wrote:
>...
> Ok, I can see that working, sort of. But then how do you handle AuthName?
> I.e. I want to set up both Basic and Digest for a directory:
> 
> <Directory /foo/>
> AuthType Basic
> AuthName basic-realm
> ...
> 
> AuthType +Digest
> AuthName digest-realm
> ...
> 
> </Directory>
> 
> I guess AuthName would have to be split up into AuthBasicName and
> AuthDigestName and not handled by the core.

Yes, there should be two different directives. Each type of authentication
must add a "challenge" (per RFC2617) to the available list, which
ultimately goes into WWW-Authenticate. Basic will only add a realm. Digest
has a realm, (multiple) domains, qop-options, etc. I see no problem using
different directives to set up these parameters.

(and maybe just with a "Digest" prefix rather than "AuthDigest")

> Also, the command handlers
> would have to know which of +, -, or no-prefix was specified so they
> could determine whether to add or remove the values, which in turn
> would require the core to know which directives belong together.

Urm. I think the +/- only goes in the selection of auth mechanisms. If you
have different directives, then (say) a digest directive would simply
override a parent dir/loc directive.

Ya know... maybe the right approach is simply to have something like:

<Location /foo>
  AuthBasic on
  AuthBasicRealm "blah"

  AuthDigest on
  AuthDigestRealm "baz"
  AuthDigestFoo ...
</Location>


In other words, deprecate AuthType and AuthName.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Re: cvs commit: apache-1.3 STATUS

Posted by "Life is hard, and then you die" <ro...@innovation.ch>.
On Sun, May 07, 2000 at 07:27:20PM -0700, Greg Stein wrote:
> On Sun, 7 May 2000, Life is hard, and then you die wrote:
> >...
> > resource. This is probably more involved than just making the
> > ap_auth_type and ap_auth_name fields take more than one value - the
> > question of scoping arises. E.g. if I have
> > 
> > <Directory /foo>
> > AuthType Basic
> > ...
> > </Directory>
> > 
> > <Directory /foo/bar>
> > AuthType Digest
> > ...
> > </Directory>
> > 
> > should the resulting auth-type for /for/bar/ be just Digest or both? I
> > don't know what the best solution is here.
> 
> I think you could use a scheme similar to what Options does:
> 
>    AuthType Basic   # set to just Basic
>    AuthType +Basic  # add Basic to the allowable types
>    AuthType -Basic  # remove Basic from the allowable types

Ok, I can see that working, sort of. But then how do you handle AuthName?
I.e. I want to set up both Basic and Digest for a directory:

<Directory /foo/>
AuthType Basic
AuthName basic-realm
...

AuthType +Digest
AuthName digest-realm
...

</Directory>

I guess AuthName would have to be split up into AuthBasicName and
AuthDigestName and not handled by the core. Also, the command handlers
would have to know which of +, -, or no-prefix was specified so they
could determine whether to add or remove the values, which in turn
would require the core to know which directives belong together.

Maybe auth should be in a container of its own:

<Auth Basic>
AuthName ...
...
</Auth>

<Auth +Digest>
AuthName ...
...
</Auth>

Or maybe I'm just confused.


  Cheers,

  Ronald


Re: cvs commit: apache-1.3 STATUS

Posted by Greg Stein <gs...@lyra.org>.
On Sun, 7 May 2000, Life is hard, and then you die wrote:
>...
> resource. This is probably more involved than just making the
> ap_auth_type and ap_auth_name fields take more than one value - the
> question of scoping arises. E.g. if I have
> 
> <Directory /foo>
> AuthType Basic
> ...
> </Directory>
> 
> <Directory /foo/bar>
> AuthType Digest
> ...
> </Directory>
> 
> should the resulting auth-type for /for/bar/ be just Digest or both? I
> don't know what the best solution is here.

I think you could use a scheme similar to what Options does:

   AuthType Basic   # set to just Basic
   AuthType +Basic  # add Basic to the allowable types
   AuthType -Basic  # remove Basic from the allowable types


Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Re: cvs commit: apache-1.3 STATUS

Posted by "Life is hard, and then you die" <ro...@innovation.ch>.
On Sat, Apr 15, 2000 at 11:20:18AM -0400, Rodent of Unusual Size wrote:
> rbb@covalent.net wrote:
> > 
> > Now personally, I don't see a need for this patch, because this
> > functionalitly can be acheived with the current code.
> 
> Really?  What the patch supposedly does is tell mod_auth_digest
> to include two WWW-Authenticate fields in the 401 response, one
> for the Digest mechanism and one for Basic.  My impression is
> that right now 1.3 will only emit one or the other, but not
> both.  His point is that providing both lets the client choose
> which one to use.

Correct. Note that the AuthAuthoritative only allows the processing of
Basic auth to be handled by others too - the core makes the assumption
that only one auth type may be active for a given resource.

> I don't like the implementation, since it's overloading mod_auth_digest
> with something that isn't its job, but I like the idea of sending
> both fields when both auth-methods are available for a resource.

I agree with Ken. We need some way to be able to handle multiple auth
schemes for the same resource (currently this may be Basic, Digest, and
NTLM). There are two problems: 1) auth modules must not assume they're
the only ones generating the WWW-Authenticate header or parsing the
Authorization header - this is easy to solve, though it requires some
help from the core (it needs to keep iterating over the modules even
after one returnes AUTH_REQUIRED). 2) The core needs to handle the fact
that there may be more than one auth type appropriate for a given
resource. This is probably more involved than just making the
ap_auth_type and ap_auth_name fields take more than one value - the
question of scoping arises. E.g. if I have

<Directory /foo>
AuthType Basic
...
</Directory>

<Directory /foo/bar>
AuthType Digest
...
</Directory>

should the resulting auth-type for /for/bar/ be just Digest or both? I
don't know what the best solution is here.


  Cheers,

  Ronald


Re: cvs commit: apache-1.3 STATUS

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
rbb@covalent.net wrote:
> 
> Now personally, I don't see a need for this patch, because this
> functionalitly can be acheived with the current code.

Really?  What the patch supposedly does is tell mod_auth_digest
to include two WWW-Authenticate fields in the 401 response, one
for the Digest mechanism and one for Basic.  My impression is
that right now 1.3 will only emit one or the other, but not
both.  His point is that providing both lets the client choose
which one to use.

I don't like the implementation, since it's overloading mod_auth_digest
with something that isn't its job, but I like the idea of sending
both fields when both auth-methods are available for a resource.
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

Re: cvs commit: apache-1.3 STATUS

Posted by rb...@covalent.net.
On Fri, 14 Apr 2000, Rodent of Unusual Size wrote:

> rbb@covalent.net wrote:
> > 
> > I'm probably missing something, so I'll ask.  :-)
> 
> You're missing that this is a patch that someone submitted,
> which deserves therefore to be listed so people can look
> at it, think about it, and possibly discuss it.  Maybe
> it sucks.. but the STATUS file is for possibilities,
> not certainties.  If it were only for certainties, we wouldn't
> need it at all.
> 
> How would you feel if you weren't a member of the group, and
> your submissions and ideas were just silently thrown away?  Eh?
> You'd be real motivated, I'll bet.
> 
> We certainly can use input from outside our little closed
> group; we already have something of a reputation as being
> a cliquish old-boys club.

Whoah, this was not a why is this in the STATUS file, my question was "Why
do we need the patch?"  Which is the beginning of a discussion about
something in the STATUS file, which if I'm reading your post correctly is
exactly what you wanted by putting it in there.

Now personally, I don't see a need for this patch, because this
functionalitly can be acheived with the current code.  

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-1.3 STATUS

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
rbb@covalent.net wrote:
> 
> I'm probably missing something, so I'll ask.  :-)

You're missing that this is a patch that someone submitted,
which deserves therefore to be listed so people can look
at it, think about it, and possibly discuss it.  Maybe
it sucks.. but the STATUS file is for possibilities,
not certainties.  If it were only for certainties, we wouldn't
need it at all.

How would you feel if you weren't a member of the group, and
your submissions and ideas were just silently thrown away?  Eh?
You'd be real motivated, I'll bet.

We certainly can use input from outside our little closed
group; we already have something of a reputation as being
a cliquish old-boys club.
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>