]> granicus.if.org Git - apache/commit
The approach for allowing authorization by user or IP introduced in r956387,
authorStefan Fritsch <sf@apache.org>
Wed, 14 Jul 2010 19:59:31 +0000 (19:59 +0000)
committerStefan Fritsch <sf@apache.org>
Wed, 14 Jul 2010 19:59:31 +0000 (19:59 +0000)
commitf14218c7ad848377d62b7c24240832b67794eafd
tree6d7554660d4505da1c356991121b9c5ef0aeaf3f
parented67c11e05656a9536b457083d7ec5279ecf33c9
The approach for allowing authorization by user or IP introduced in r956387,
etc. causes problems because the authentication module calls
note_*_auth_failure if authentication fails. This is inappropriate if access is
later allowed because of the IP.

So, instead of calling the auth_checker hook even if authentication failed, we
introduce a new access_checker_ex hook that runs between the access_checker and
the check_user_id hooks. If an access_checker_ex functions returns OK, the
request will be allowed without authentication.

To make use of this, change mod_authz_core to walk the require blocks in the
access_checker_ex phase and deny/allow the request if the authz result does not
depend on an authenticated user. To distinguish a real AUTHZ_DENIED from an
authz provider from an authz provider needing an authenticated user, the latter
must return the new AUTHZ_DENIED_NO_USER code.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@964156 13f79535-47bb-0310-9956-ffa450edef68
13 files changed:
docs/manual/developer/new_api_2_4.xml
include/ap_mmn.h
include/http_request.h
include/mod_auth.h
modules/aaa/mod_authnz_ldap.c
modules/aaa/mod_authz_core.c
modules/aaa/mod_authz_dbd.c
modules/aaa/mod_authz_dbm.c
modules/aaa/mod_authz_groupfile.c
modules/aaa/mod_authz_host.c
modules/aaa/mod_authz_owner.c
modules/aaa/mod_authz_user.c
server/request.c