Bug 45584

Summary: No AUTHENTICATE_* environment variables from mod_authz_ldap
Product: Apache httpd-2 Reporter: Alexandra Kossovsky <Alexandra.Kossovsky>
Component: mod_authz_ldapAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: FixedInTrunk
Priority: P2    
Version: 2.2.9   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Fix for the problem (obviously wrong)
Set environment variables when only using LDAP authorization.

Description Alexandra Kossovsky 2008-08-06 23:37:38 UTC
Created attachment 22398 [details]
Fix for the problem (obviously wrong)

I use non-ldap authn module (Kerberos, really) with ldap authz module (i.e. "AuthLDAPURL" and "Require ldap-filter" directives) with apache 2.2.9. The documentation to mod_authnz_ldap module tells me that "LDAP attributes specified in the AuthLDAPUrl directive are placed in environment variables with the prefix "AUTHENTICATE_"".  However, I get no AUTHENTICATE_ variables -- they are set only when checking LDAP password, and it is not my case.

I think it is very useful to get AUTHENTICATE_* variables available for CGI scripts even then ldap is used as authorization module and does not authenticate user.

The attached patch works for me, but it is obviously wrong (for example, it sets AUTHENTICATE_* variable twice if ldap is used for both authorization and authentication).
Comment 1 magne.andreassen 2009-08-24 02:56:35 UTC
Created attachment 24156 [details]
Set environment variables when only using LDAP authorization.

Alternative patch for setting the AUTHENTICATE_ variables when only doing LDAP authorization. Default off. To enable set 'AuthLDAPAuthzSetEnvironment' to 'on' in the Apache config.
Comment 2 Eric Covener 2010-05-29 15:49:33 UTC
I've added this capability in r949336
Comment 3 Stefan Fritsch 2012-02-26 16:48:40 UTC
fixed in 2.4.1