From: Daniel Earl Poirier Apache HTTP Server Version 2.3 Available Languages: en This document describes changes to the Apache HTTPD API from
+ version 2.2 to 2.4, that may be of interest to module/application
+ developers and core hacks. At the time of writing, the 2.4 API
+ is not finalised, and this document may serve to highlight
+ points that call for further review. API changes fall into two categories: APIs that are altogether new,
+ and existing APIs that are expanded or changed. The latter are
+ further divided into those where all changes are back-compatible
+ (so existing modules can ignore them), and those that might
+ require attention by maintainers. As with the transition from
+ HTTPD 2.0 to 2.2, existing modules and applications will require
+ recompiling and may call for some attention, but most should not
+ require any substantial updating (although some may be able to
+ take advantage of API changes to offer significant improvements). For the purpose of this document, the API is split according
+ to the public header files. These headers are themselves the
+ reference documentation, and can be used to generate a browsable
+ HTML reference with Introduces a new API to parse and evaluate boolean and algebraic
+ expressions, including provision for a standard syntax and
+ customised variants. Introduces new API to enable apache child processes to serve different purposes. Introduces an API for modules to allocate and manage memory slots
+ (normally) for shared memory. API to manage a shared object cache. common structures for heartbeat modules (should this be public API?) When possible, registering all access control hooks (including
+ authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF
+ is recommended. If all modules' access control hooks are registered
+ with this flag, then whenever the server handles an internal
+ sub-request that matches the same set of access control configuration
+ directives as the initial request (which is the common case), it can
+ avoid invoking the access control hooks another time. If your module requires the old behavior and must perform access
+ control checks on every sub-request with a different URI from the
+ initial request, even if that URI matches the same set of access
+ control configuration directives, then use AP_AUTH_INTERNAL_PER_URI. Introduces the new provider framework for authn and authz This introduces low-level APIs to send arbitrary headers,
+ and exposes functions to handle HTTP OPTIONS and TRACE. The API for ap_get_scoreboard_worker is gratuitously made non-back-compatible
+ as an alternative version is introduced. Additional proxy_balancer
+ support. Child status stuff revamped. Introduces a new API for managing HTTP Cookies. I have yet to get a handle on this update. A wrapper for APR proc and global mutexes in httpd. NEW: ap_args_to_table NEW: ap_recent_ctime_ex Available Languages: en 
API Changes in Apache HTTP Server 2.4 since 2.2
+make docs.
ap_expr (NEW!)
ap_listen (changed; back-compatible)
ap_mpm (changed)
ap_slotmem (NEW!)
ap_socache (NEW!)
heartbeat (NEW!)
http_config (changed)
http_core (changed)
httpd (changed)
http_log (changed)
http_request (changed)
mod_auth (NEW!)
mod_core (NEW!)
mod_request (NEW!)
mpm_common (changed)
scoreboard (changed)
util_cookies (NEW!)
util_ldap (changed)
util_mutex (NEW!)
util_script (changed)
util_time (changed)ap_expr (NEW!)
+
+ ap_listen (changed; back-compatible)
+
+ ap_mpm (changed)
+
+ ap_mpm_run is replaced by a new mpm hook.
+ Also ap_graceful_stop_signalled is lost, and
+ ap_mpm_register_timed_callback is new.ap_slotmem (NEW!)
+
+ ap_socache (NEW!)
+
+ heartbeat (NEW!)
+
+ http_config (changed)
+
+
+
+ http_core (changed)
+
+
+
+ httpd (changed)
+
+
+
+ http_log (changed)
+
+
+
+ http_request (changed)
+
+
+
+ mod_auth (NEW!)
+
+ mod_core (NEW!)
+
+ mod_request (NEW!)
+
+ mod_request, to make input data
+ available to multiple application/handler modules where required,
+ and to parse HTML form data.mpm_common (changed)
+
+
+
+ scoreboard (changed)
+
+ util_cookies (NEW!)
+
+ util_ldap (changed)
+
+ util_mutex (NEW!)
+
+ util_script (changed)
+
+ util_time (changed)
+
+
If no matching virtual host is found, then the first listed + virtual host that matches the IP address and port will be used.
+ +IPv6 addresses must be enclosed in square brackets, as shown in the following example:
@@ -3128,6 +3132,11 @@ itself ServerName www.example.com:80 +The ServerName directive
+ may appear anywhere within the definition of a server. However,
+ each appearance overrides the previous appearance (within that
+ server).
If no ServerName is specified, then the
server attempts to deduce the hostname by performing a reverse
lookup on the IP address. If no port is specified in the
@@ -3732,6 +3741,11 @@ hostname or IP address
ServerName from the "main"
server configuration will be inherited.
If no matching virtual host is found, then the first listed + virtual host that matches the IP address will be used. As a + consequence, the first listed virtual host is the default virtual + host.
+See the security tips document for details on why your security could be compromised if the diff --git a/docs/manual/mod/core.xml.de b/docs/manual/mod/core.xml.de index 51a51136152..d954d550748 100644 --- a/docs/manual/mod/core.xml.de +++ b/docs/manual/mod/core.xml.de @@ -1,7 +1,7 @@ - + + + +
Apache HTTP Server Version 2.3
+
Available Languages: en
+| Description: | Manages a cache of authentication credentials to relieve +the load on backends |
|---|---|
| Status: | Base |
| Module Identifier: | authn_socache_module |
| Source File: | mod_authn_socache.c |
| Compatibility: | Version 2.3 and later |
Maintains a cache of authentication credentials, so that a new backend + lookup is not required for every authenticated request.
+Some users of more heavyweight authentication such as SQL database
+ lookups (mod_authn_dbd) have reported it putting an
+ unacceptable load on their authentication provider. A typical case
+ in point is where an HTML page contains hundreds of objects
+ (images, scripts, stylesheets, media, etc), and a request to the page
+ generates hundreds of effectively-immediate requests for authenticated
+ additional contents.
mod_authn_socache provides a solution to this problem by + maintaining a cache of authentication credentials.
+The authentication cache should be used where authentication
+ lookups impose a significant load on the server, or a backend or
+ network. Authentication by file (mod_authn_file)
+ or dbm (mod_authn_dbm) are unlikely to benefit,
+ as these are fast and lightweight in their own right (though in some
+ cases, such as a network-mounted file, cacheing may be worthwhile).
+ Other providers such as SQL or LDAP based authentication are more
+ likely to benefit, particularly where there is an observed
+ performance issue. Amongst the standard modules, mod_authnz_ldap manages its own cache, so only
+ mod_authn_dbd will usually benefit from this cache.
The basic rules to cache for a provider are:
+AuthnCacheProvider directive.AuthBasicProvider or AuthDigestProvider directive.A simple usage example to accelerate mod_authn_dbd
+ using dbm as a cache engine:
+ <Directory /usr/www/myhost/private> + AuthType Basic + AuthName "Cached Authentication Example" + AuthBasicProvider socache dbd + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" + AuthnCacheProvider dbd + AuthnCacheContext dbd-authn-example + AuthnCacheSOCache dbm + Require valid-user + </Directory> +
Module developers should note that their modules must be enabled + for cacheing with mod_authn_cache. A single optional API function + ap_authn_cache_store is provided to cache credentials + a provider has just looked up or generated. Usage examples are + available in r957072, in which three authn providers are enabled for cacheing.
+| Description: | Specify a context string for use in the cache key |
|---|---|
| Syntax: | AuthnCacheContext directory|server|custom-string |
| Default: | directory |
| Context: | directory |
| Status: | Base |
| Module: | mod_authn_socache |
This directive specifies a string to be used along with the supplied + username (and realm in the case of Digest Authentication) in constructing + a cache key. This serves to disambiguate identical usernames serving + different authentication areas on the server.
+Two special values for this are directory, which uses + the directory context of the request as a string, and server + which uses the virtual host name.
+The default is directory, which is also the most
+ conservative setting. This is likely to be less than optimal, as it
+ (for example) causes $app-base, $app-base/images,
+ $app-base/scripts and $app-base/media each to
+ have its own separate cache key. A better policy is to name the
+ AuthnCacheContext for the password
+ provider: for example a htpasswd file or database table.
Contexts can be shared across different areas of a server, where + credentials are shared. However, this has potential to become a vector + for cross-site or cross-application security breaches, so this directive + is not permitted in .htaccess contexts.
+ +| Description: | Specify which authn provider(s) to cache for |
|---|---|
| Syntax: | AuthnCacheProvider authn-provider [...] |
| Default: | None |
| Context: | directory, .htaccess |
| Override: | AuthConfig |
| Status: | Base |
| Module: | mod_authn_socache |
This directive specifies an authentication provider or providers + to cache for. Credentials found by a provider not listed in an + AuthnCacheProvider directive will not be cached.
+ +For example, to cache credentials found by mod_authn_dbd
+ or by a custom provider myprovider, but leave those looked
+ up by lightweight providers like file or dbm lookup alone:
+ AuthnCacheProvider dbd myprovider
+
| Description: | Select socache backend provider to use |
|---|---|
| Syntax: | AuthnCacheSOCache provider-name |
| Context: | server config |
| Override: | None |
| Status: | Base |
| Module: | mod_authn_socache |
This is a server-wide setting. If not set, your platform's + default will be used.
+The cache is built on the the socache framework. + We need a link here once that's documented!
+| Description: | Set a timeout for cache entries |
|---|---|
| Syntax: | AuthnCacheTimeout timeout (seconds) |
| Default: | 300 (5 minutes) |
| Context: | directory, .htaccess |
| Override: | AuthConfig |
| Status: | Base |
| Module: | mod_authn_socache |
Cacheing authentication data can be a security issue, though short-term + cacheing is unlikely to be a problem. Typically a good solution is to + cache credentials for as long as it takes to relieve the load on a + backend, but no longer, though if changes to your users and passwords + are infrequent then a longer timeout may suit you. The default 300 + seconds (5 minutes) is both cautious and ample to keep the load + on a backend such as dbd (SQL database queries) down.
+This should not be confused with session timeout, which is an + entirely separate issue. However, you may wish to check your + session-management software for whether cached credentials can + "accidentally" extend a session, and bear it in mind when setting + your timeout.
+ +Available Languages: en
+