From: André Malo Date: Wed, 2 Apr 2008 15:00:23 +0000 (+0000) Subject: update transformation X-Git-Tag: 2.2.9~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=905a496fdec53b696df281cef9e66a0c4e5aad5e;p=thirdparty%2Fapache%2Fhttpd.git update transformation git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@643928 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_authn_dbd.html.en b/docs/manual/mod/mod_authn_dbd.html.en index d6c5b693b1d..7c3f99e544d 100644 --- a/docs/manual/mod/mod_authn_dbd.html.en +++ b/docs/manual/mod/mod_authn_dbd.html.en @@ -74,44 +74,39 @@

This simple example shows use of this module in the context of the Authentication and DBD frameworks.

-#Database Management
+# mod_dbd configuration
+DBDriver pgsql
+DBDParams "dbname=apacheauth user=apache password=xxxxxx"
 
-#Use the PostgreSQL driver
-DBDriver pgsql
+DBDMin  4
+DBDKeep 8
+DBDMax  20
+DBDExptime 300
 
-#Connection string: database name and login credentials
-DBDParams "dbname=htpasswd user=apache password=xxxxxx"
+<Directory /usr/www/myhost/private>
+  # core authentication and mod_auth_basic configuration
+  # for mod_authn_dbd
+  AuthType Basic
+  AuthName "My Server"
+  AuthBasicProvider dbd
 
-#Parameters for Connection Pool Management
-DBDMin  1
-DBDKeep 2
-DBDMax  10
-DBDExptime 60
+  # core authorization configuration
+  Require valid-user
 
-#Authentication Section
-<Directory /usr/www/myhost/private>
-
-    #mod_auth configuration for authn_dbd
-    AuthType Basic
-    AuthName "My Server"
-    AuthBasicProvider dbd
-
-    #authz configuration
-    Require valid-user
-
-    #SQL query to verify a user
-    #(note: DBD drivers recognise both stdio-like %s and native syntax)
-    AuthDBDUserPWQuery "select password from authn where username = %s"
-</Directory>
+  # mod_authn_dbd SQL query to authenticate a user
+  AuthDBDUserPWQuery \
+    "SELECT password FROM authn WHERE user = %s"
+</Directory>
 
top

Exposing Login Information

-Whenever a query is made to the database server, all columns returned by -the query are placed in the environment, using environment variables with -the prefix "AUTHENTICATE_". +If httpd was built against APR version 1.3.0 +or higher, then whenever a query is made to the database server, all +column values in the first row returned by the query are placed in the +environment, using environment variables with the prefix "AUTHENTICATE_".

If a database query for example returned the username, full name and telephone number of a user, a CGI program will have access to @@ -131,16 +126,22 @@ configuration required in some web applications. Module:mod_authn_dbd

The AuthDBDUserPWQuery specifies an - SQL query to look up a password for a specified user. - The query must take a single string (typically SQL varchar) - argument (username), and return a single value (encrypted password). -

-

- AuthDBDUserPWQuery "SELECT password FROM authn WHERE username = %s" -

-

If httpd was built against apr v1.3.0 or higher, any additional - columns specified in the select statement will be inserted into - the environment with the name AUTHENTICATE_<COLUMN>. + SQL query to look up a password for a specified user. The user's ID + will be passed as a single string parameter when the SQL query is + executed. It may be referenced within the query statement using + a %s format specifier.

+

Example

+AuthDBDUserPWQuery \
+  "SELECT password FROM authn WHERE user = %s"
+
+

The first column value of the first row returned by the query + statement should be a string containing the encrypted password. + Subsequent rows will be ignored. If no rows are returned, the user + will not be authenticated through mod_authn_dbd.

+

If httpd was built against APR version 1.3.0 + or higher, any additional column values in the first row returned by + the query statement will be stored as environment variables with + names of the form AUTHENTICATE_COLUMN.

@@ -156,19 +157,23 @@ configuration required in some web applications.

The AuthDBDUserRealmQuery specifies an SQL query to look up a password for a specified user and realm. - The query must take two string (typically SQL varchar) arguments - (username and realm), and return a single value (encrypted password). -

-

- AuthDBDUserRealmQuery "SELECT password FROM authn - WHERE username = %s AND realm = %s" -

-

If httpd was built against apr v1.3.0 or higher, any additional - columns specified in the select statement will be inserted into - the environment with the name AUTHENTICATE_<COLUMN>. + The user's ID and the realm, in that order, will be passed as string + parameters when the SQL query is executed. They may be referenced + within the query statement using %s format specifiers.

+

Example

+AuthDBDUserRealmQuery \
+  "SELECT password FROM authn WHERE user = %s AND realm = %s"
+
+

The first column value of the first row returned by the query + statement should be a string containing the encrypted password. + Subsequent rows will be ignored. If no rows are returned, the user + will not be authenticated through mod_authn_dbd.

+

If httpd was built against APR version 1.3.0 + or higher, any additional column values in the first row returned by + the query statement will be stored as environment variables with + names of the form AUTHENTICATE_COLUMN.

-
diff --git a/docs/manual/mod/mod_dbd.html.en b/docs/manual/mod/mod_dbd.html.en index 2a9dbb8de4e..d568049a9f5 100644 --- a/docs/manual/mod/mod_dbd.html.en +++ b/docs/manual/mod/mod_dbd.html.en @@ -31,11 +31,14 @@

Summary

mod_dbd manages SQL database connections using - apr_dbd. - It provides database connections on request to modules - requiring SQL database functions, and takes care of + APR. It provides database connections on request + to modules requiring SQL database functions, and takes care of managing databases with optimal efficiency and scalability - for both threaded and non-threaded MPMs.

+ for both threaded and non-threaded MPMs. For details, see the + APR website and this overview of the + Apache DBD Framework + by its original developer. +

Directives

top

Apache DBD API