1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

75 Commits

Author SHA1 Message Date
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
f19641462b Compare value instead of string pointer
Remove unused label
Remove unused var


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157357 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 09:14:33 +00:00
Eric Covener
62bc7146c8 remove (the only) retry logic in mod_authnz_ldap's authentication path
because it's causing the ample retries in mod_ldap to be multiplied by this
outter loop.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1156007 13f79535-47bb-0310-9956-ffa450edef68
2011-08-10 03:24:45 +00:00
Stefan Fritsch
602791140b Revert r1129808:
Incorporate the ap_ldap incomplete API, as there is no interest or effort
    at APR to make this a complete abstraction, and it was voted 'off the island'
    with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
    or apr+util 1.x.

This also reverts part of r1142938, which needs to be re-done.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150172 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:29:42 +00:00
Stefan Fritsch
2d42def875 Revert r1140069:
Fix load order dependencies in LDAP code by switching to use of APR
    optional functions for the inter-module API...



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:10:49 +00:00
Joe Orton
559c6ae018 Fix load order dependencies in LDAP code by switching to use of APR
optional functions for the inter-module API:

* modules/ldap/ldap_private.h: New file, containing "real" function
  declarations, copied from...

* include/ap_ldap.h.in, include/ap_ldap_url.h,
  include/ap_ldap_option.h, include/ap_ldap_init.h,
  include/ap_ldap_rebind.h: ... here.  All declarations changed to APR
  optional function declarations.

* modules/ldap/util_ldap.c (util_ldap_register_hooks): Register all
  the new optional functions.

* modules/aaa/mod_authnz_ldap.c (ImportULDAPOptFn): Pick up optional
  function stub for ap_ldap_url_parse.
  (mod_auth_ldap_parse_url): Use it here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1140069 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 09:27:04 +00:00
Stefan Fritsch
51692222f6 Various code cleanup
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
William A. Rowe Jr
37770675d7 Incorporate the ap_ldap incomplete API, as there is no interest or effort
at APR to make this a complete abstraction, and it was voted 'off the island'
with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
or apr+util 1.x.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129808 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 17:10:11 +00:00
Stefan Fritsch
5a69116259 Some LDAP servers (wrongly) return LDAP_CONSTRAINT_VIOLATION if a user is
locked due to too many password retries. This should not cause an internal
server error but be treated as "auth denied".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125646 13f79535-47bb-0310-9956-ffa450edef68
2011-05-21 08:13:59 +00:00
Eric Covener
67fa31c64b PR51163: Resolve crashes when LDAP is used for authorization-only
Submitted By: Scott Hill <shill genscape.com>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1100786 13f79535-47bb-0310-9956-ffa450edef68
2011-05-08 18:36:17 +00:00
Eric Covener
964575078c * add the constructed filter at TRACE1 to authn, and to existing debug authz
messages.

* Drop the level of the LDAPURL parsing to TRACE1 from debug (appears in
console/event viewer once per directive)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1088627 13f79535-47bb-0310-9956-ffa450edef68
2011-04-04 13:55:48 +00:00
Stefan Fritsch
1008c27260 Allow authz providers to check args while reading the config and allow
them to cache parsed args.

Use this to check that argument to 'all' provider is 'granted' or 'denied'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998706 13f79535-47bb-0310-9956-ffa450edef68
2010-09-19 17:55:47 +00:00
Stefan Fritsch
aa576071af - Remove a load of unused variables (or variables that are set but never read).
- Move some declarations into the correct #ifdef scope.

I couldn't compile/test netware, but the changes look obvious enough.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982016 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:45:21 +00:00
Stefan Fritsch
f14218c7ad 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
2010-07-14 19:59:31 +00:00
Stefan Fritsch
56eaabbe46 more pid logging cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956376 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 17:04:34 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Eric Covener
67f3df7be5 When checking direct group membership, interpret LDAP_NO_SUCH_ATTRIBUTE the same as
LDAP_COMPARE_FALSE and continue on to subgroup (nested group) processing. This 
triggers when the group has no "direct" members but may have entries that 
represent nested groups to check.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@950249 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 21:26:28 +00:00
Eric Covener
a8720fa901 mod_authnz_ldap: Search or Comparison during authorization phase
can use the credentials from the authentication phase
(AuthLDAPSearchAsUSer,AuthLDAPCompareAsUser).
PR 48340 

Submitted by: Domenico Rotiroti, Eric Covener
Reviewed by: Eric Covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@950248 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 21:19:06 +00:00
Ruediger Pluem
4dda9383cb * Fix compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@949673 13f79535-47bb-0310-9956-ffa450edef68
2010-05-31 07:15:35 +00:00
Eric Covener
d15983f1d1 mod_authnz_ldap: Allow the initial DN lookup to bind with a
transformation of the basic auth username.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@949436 13f79535-47bb-0310-9956-ffa450edef68
2010-05-29 20:19:10 +00:00
Eric Covener
27c654fc67 Allow mod_authnz_ldap to set environment variables when it only performs authorization.
AuthLDAPAuthorizePrefix can be used to force this to overlap with the prefix used
for authentication.

PR 45584


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@949336 13f79535-47bb-0310-9956-ffa450edef68
2010-05-29 02:32:22 +00:00
Stefan Fritsch
0d7fe7ffd7 mod_authnz_ldap: If AuthLDAPCharsetConfig is set, also convert the password to
UTF-8.

PR: 45318
Adapted patch from Johannes Müller


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902654 13f79535-47bb-0310-9956-ffa450edef68
2010-01-24 21:52:29 +00:00
Eric Covener
fa60d18103 Change LDAP authentication failures (user->DN or password check) to log
level INFO from log level WARNING.  This is still liberal for authn
providers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902641 13f79535-47bb-0310-9956-ffa450edef68
2010-01-24 20:54:05 +00:00
Eric Covener
d5861f048a Add AuthLDAPBindAuthoritative to allow other authentication providers a chance
to run when mod_authnz_ldap finds a user but can't verify their password.

Submitted By: Justin Erenkrantz, Joe Schaefer, Tony Stevenson



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881808 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 15:49:48 +00:00
Jeff Trawick
4ba05cdabb fix the name of this module in an error log message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@745073 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17 13:59:30 +00:00
Paul J. Reder
0ae9279219 mod_authnz_ldap: Reduce number of initialization debug messages and make
information more clear. PR 46342 [Dan Poirier]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@732912 13f79535-47bb-0310-9956-ffa450edef68
2009-01-09 02:32:12 +00:00
Chris Darroch
704feaaeb3 Implement checks for NULL r->user as per r705361.
NOTE: If someone with an LDAP setup can ensure this compiles and works,
that would be great.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@707183 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 20:11:07 +00:00
Nick Kew
e8dd90b487 mod_authnz_ldap: avoid returning NULL env vars
PR 39045


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@693328 13f79535-47bb-0310-9956-ffa450edef68
2008-09-09 00:52:03 +00:00
Eric Covener
bb7398fce0 revert r672639 which lacked a necessary major bump, add a major MMN bump
to account for the short-lived API addition/removal.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@678947 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 23:49:51 +00:00
Eric Covener
b159abbf7a caught by Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@672671 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 20:09:45 +00:00
Eric Covener
bbc850ee33 mod_auth_digest: Detect during startup when AuthDigestProvider
is configured to use an incompatible provider via AuthnProviderAlias.
PR 45196 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@672639 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 16:42:43 +00:00
Chris Darroch
9864958fcd Convert common provider version strings ("0") to
AUTHN/Z_PROVIDER_VERSION macros defined in mod_auth.h.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@658046 13f79535-47bb-0310-9956-ffa450edef68
2008-05-19 23:53:05 +00:00
Chris Darroch
c8ba67fb83 Avoid calling access control hooks for internal requests with
configurations which match those of the initial request.  Revert to
the original behaviour (call access control hooks for internal requests
with URIs different from the initial request) if any access control hooks
or providers are not registered as permitting this optimization.
Introduce wrappers for access control hook and provider registration
which can accept additional mode and flag data.

The configuration walk optimizations were originally proposed a while
ago (see http://marc.info/?l=apache-httpd-dev&m=116536713506234&w=2);
they have been used since then in production systems and appear to be
stable and effective.  They permit certain combinations of modules
and clients to function efficiently, especially when a deeply recursive
series of internal requests, such as those generated by certain WebDAV
requests, are all subject to the identical authentication and authorization
directives.

The major change from the original proposal is a cleaner mechanism for
detecting modules which may expect the old behaviour.  This has been
tested successfully with Subversion's mod_authz_svn, which specifically
requires the old behaviour when performing path-based authorization based
against its own private access control configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644525 13f79535-47bb-0310-9956-ffa450edef68
2008-04-03 21:51:07 +00:00
Eric Covener
e5143bc75a return AUTHZ_GRANTED instead of OK from the LDAP nested group checking.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@633620 13f79535-47bb-0310-9956-ffa450edef68
2008-03-04 20:20:00 +00:00
Eric Covener
7c9503a556 When using the MS SDK, re-establish LDAP backend connections on a
return code of LDAP_UNAVAILABLE as if it were LDAP_SERVER_DOWN.

With this SDK, LDAP_UNAVAIALBLE is returned when the socket had been closed 
between LDAP API calls.

PR 39095



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607766 13f79535-47bb-0310-9956-ffa450edef68
2007-12-31 19:20:25 +00:00
Paul J. Reder
4ae49c0ce4 Ooops. Not sure why this didn't get deleted in the last commit to this file. This
is no longer required due to the more optimal way the list of subgroup attributes
is now handled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@600017 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 23:51:48 +00:00
Paul J. Reder
b92b10f079 Remove code that was both memory intensive and unnecessary. Replace the
complicated code with a simple list.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599877 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 17:11:53 +00:00
Paul J. Reder
8e90a80064 Improve logged information and fix broken doc.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599872 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 16:59:14 +00:00
Graham Leggett
1fc39f2164 mod_authnz_ldap, mod_authn_dbd: Tidy up the code to expose authn parameters to the environment. Improve portability to EBCDIC machines by using apr_toupper()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571798 13f79535-47bb-0310-9956-ffa450edef68
2007-09-01 13:26:27 +00:00
Jim Jagielski
94d6c33002 detabify
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@563244 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 20:02:27 +00:00
Paul J. Reder
cc4a706e61 mod_ldap, mod_authnzldap: Add support for nested groups (i.e. the ability
to authorize an authenticated user via a "require ldap-group X" directive
     where the user is not in group X, but is in a subgroup contained in X.
     PR 42891 [Paul J. Reder]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@560373 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 20:34:41 +00:00
Eric Covener
f65de07e7e revert revision 555470
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557772 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 21:05:16 +00:00
Eric Covener
ab845c1671 This data is passed in an unsafe way to the LDAP SDK if the compiler
chooses to use shorts for the enum values.
http://www.redbooks.ibm.com/redbooks/SG245992/nn4/SG245992_88.html

Submitted by: David Jones


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@555470 13f79535-47bb-0310-9956-ffa450edef68
2007-07-12 02:42:44 +00:00
Graham Leggett
2d79512131 mod_authn_dbd: Export any additional columns queried in the SQL select
into the environment with the name AUTHENTICATE_<COLUMN>. This brings
mod_authn_dbd behaviour in line with mod_authnz_ldap.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@466865 13f79535-47bb-0310-9956-ffa450edef68
2006-10-22 19:11:51 +00:00
Graham Leggett
488411491b mod_authnz_ldap: Add an AuthLDAPRemoteUserAttribute directive. If
set, REMOTE_USER will be set to this attribute, rather than the
username supplied by the user. Useful for example when you want users
to log in using an email address, but need to supply a userid instead
to the backend.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@463427 13f79535-47bb-0310-9956-ffa450edef68
2006-10-12 20:52:37 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Jeff Trawick
4b0c598d3c spellcheck
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@413730 13f79535-47bb-0310-9956-ffa450edef68
2006-06-12 19:35:09 +00:00
Bradley Nicholes
da77cf5678 Fix a problem with invalid auth error detection for LDAP client SDKs that don't support LDAP_SECURITY_ERROR macro. PR#39529
Submitted by: [Ray Price <dohrayme yahoo.com>], [Josh Fenlason <jfenlason ptc.com>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@411306 13f79535-47bb-0310-9956-ffa450edef68
2006-06-02 22:01:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00