You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brad Nicholes <BN...@novell.com> on 2006/11/27 20:12:53 UTC

Re: how mod_authnz_ldap ldap provider is supposed to work as basic auth provider?

>>> On 11/25/2006 at 4:37 PM, in message
<Pi...@kehillah.jewish.org.pl>, Piotr Wadas
<pw...@jewish.org.pl> wrote:
> Cite from 
> http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html 
> 
> "The authn_ldap authentication provider can be enabled through the 
> AuthBasicProvider directive using the ldap value."
> 
> This seems clear.
> 
> Now, I looked into apache 2.2.3 source (apt-get source 
> apache2-mpm-prefork), into mod_auth_basic.c, lines 75-80, 
> and see what I get:
> 
> if (!newp->provider->check_password) {
>         /* if it doesn't provide the appropriate function, reject it */
>         return apr_psprintf(cmd->pool,
>                             "The '%s' Authn provider doesn't support "
>                             "Basic Authentication", newp->provider_name);
>     }
> 
> 
> As far as I can see, mod_authnz_ldap does not provide a check_password
> routine - but it does (1167-1170)
> 
> static const authn_provider authn_ldap_provider =
> {
>     &authn_ldap_check_password,
> };
> 
> so, the question is, how using authn_ldap_provider is suppose to work
> as basic_auth provider, if it really does work for now? On the other
> hand, if I look into mod_authn_file.c, I can find (lines 158-162)
> 
> static const authn_provider authn_file_provider =
> {
>     &check_password,
> [..]
> 
> So, it seems that there's really a need for a "method" named 
> "check_password". Can anyone explain this to me? :)
> 
> Regards,
> Piot

The actual name of the check_password function doesn't matter.  All that matters is that a check_password provider function as been implemented and referenced through the authn_provider structure.  As you noted in your message,  both authn_file and authn_ldap take care of this through the authn_file_provider and authn_ldap_provider structures respectively.

Brad