I have an Apache2 server running in a Docker container (httpd:2.4.54-bullseye), and an LDAP server (OpenLDAP slapd 2.4.57+dfsg-3 on Debian 11.1)
I'm trying to use mod_authnz_ldap
Apache module to authenticate certain users from the LDAP.
Here is the config of Apache :
<AuthnProviderAlias ldap org>
AuthLDAPURL ldap://org.com/dc=org,dc=com?uid
</AuthnProviderAlias>
<VirtualHost _default_:80>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/apache2/htdocs
<Location "/">
AuthName "Apache2 LDAP Check"
AuthType Basic
AuthBasicProvider org
Require ldap-user me collegue1 collegue2
</Location>
</VirtualHost>
According to the docs I should only put uids in Require ldap-user
.
The logs show that the authentication is done successfully, but it can't authorize any of the users in Require ldap-user
!!
web_auth | [Tue Aug 30 09:09:13.594015 2022] [authz_core:debug] [pid 10:tid 139920102389504] mod_authz_core.c(815): [client 192.168.103.66:2189] AH01626: authorization result of Require ldap-user me collegue1 collegue2: denied (no authenticated user yet)
web_auth | [Tue Aug 30 09:09:13.594064 2022] [authz_core:debug] [pid 10:tid 139920102389504] mod_authz_core.c(815): [client 192.168.103.66:2189] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
web_auth | [Tue Aug 30 09:09:13.594137 2022] [authnz_ldap:debug] [pid 10:tid 139920102389504] mod_authnz_ldap.c(548): [client 192.168.103.66:2189] AH01691: auth_ldap authenticate: using URL ldap://org.com/dc=org,dc=com?uid
web_auth | [Tue Aug 30 09:09:13.599377 2022] [authnz_ldap:debug] [pid 10:tid 139920102389504] mod_authnz_ldap.c(630): [client 192.168.103.66:2189] AH01697: auth_ldap authenticate: accepting me
web_auth | [Tue Aug 30 09:09:13.599404 2022] [authz_core:debug] [pid 10:tid 139920102389504] mod_authz_core.c(815): [client 192.168.103.66:2189] AH01626: authorization result of Require ldap-user me collegue1 collegue2: denied
web_auth | [Tue Aug 30 09:09:13.599411 2022] [authz_core:debug] [pid 10:tid 139920102389504] mod_authz_core.c(815): [client 192.168.103.66:2189] AH01626: authorization result of <RequireAny>: denied
web_auth | [Tue Aug 30 09:09:13.599417 2022] [authz_core:error] [pid 10:tid 139920102389504] [client 192.168.103.66:2189] AH01631: user me: authorization failure for "/":
Am I missing something ?
PS: When I use Require valid-user
everything work just fine!