[openssl-users] Problems with ""sequencing" of FakeBasicAuth vs. Require using client certs for Authentication

o haya ohaya at yahoo.com
Wed May 4 16:29:23 UTC 2016


[My apologies for this cross-post, but I think that I realized after I posted this on the Apache mailing list that it might be more appropriate here, as "SSLOptions +FakeBasicAuth" is under mod_ssl...]


Hi,

We are trying to use client certs with Apache 2.4.x (2.4.16, with openssl version 1.0.1e fips) and to have Apache check the client cert strings against users in an LDAP (and OpenDS instance but are encountering what appears to be a timing problem between when Apache authz_core is doing the authentication vs. when the FakeBasicAuth is happening.

We CAN already do username/password (Basic) authentication against the LDAP using something like:

AuthType Basic
AuthName "xyz"
AuthBasicProvider ldap
AuthBasicLDAPURL
AuthBASICLDAPDN
AuthBASICLDAPPassword
Require valid-user

and that works fine (so the LDAP part appears to be working ok).

However, if we use client certs and do the following:

SSLVerifyClient required
SSLOptions +FakeBasicAuth
AuthType Basic
AuthName "xyz"
AuthBasicProvider ldap
AuthBasicLDAPURL
AuthBASICLDAPDN
AuthBASICLDAPPassword
Require valid-user

then it doesn't work.

Looking at the Apache logs, what we see when this fails is:

mod_authz_core: AH01626: authorization result of Require valid-user : denied (no authenticated user yet) then
mod_authz_core: AH01626: authorization result of <RequireAny>: denied (no authenticated user yet) then
ssl: AH02036: Faking HTTP Basic Auth header: "Authorization: Basic xxxxxxxxxxxxx"

>From the logging (as above), it seems like mod_authz_core is denying the authentication (because there is no authenticated user yet) BEFORE the Basic Auth "Faking" occurs, and thus, BEFORE the LDAP authentication occurs.

Does anyone know if this interpretation of what is happening correct?

And, if so, is there some way to configure Apache so that it does the authentication vs. authentication checking in "the correct" order/sequence?

Thanks!

Jim

P.S.  I have also tried moving the LoadModule for mod_ssl to the last one but that didn't make a difference.


More information about the openssl-users mailing list