mod_auth_basic.xml revision d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacd
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<?xml version="1.0"?>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Copyright 2002-2004 Apache Software Foundation
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed under the Apache License, Version 2.0 (the "License");
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding you may not use this file except in compliance with the License.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding You may obtain a copy of the License at
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<modulesynopsis metafile="mod_auth_basic.xml.meta">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
7db9f691a00ead175b03335457ca296a33ddf31bnd<name>mod_auth_basic</name>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<description>Basic authentication</description>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<status>Base</status>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<sourcefile>mod_auth_basic.c</sourcefile>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<identifier>auth_basic_module</identifier>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<compatibility>Available in Apache 2.1 and later</compatibility>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
169280c7e65362d4ed444ec262c3f22a6a280166nd<summary>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>This module allows the use of HTTP Basic Authentication to
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz restrict access by looking up users in the given providers.
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz HTTP Digest Authentication is provided by
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <module>mod_auth_digest</module>.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</summary>
3604deb3632beeca54cfdb3864d872715971c300slive<seealso><directive module="core">AuthName</directive></seealso>
3604deb3632beeca54cfdb3864d872715971c300slive<seealso><directive module="core">AuthType</directive></seealso>
3604deb3632beeca54cfdb3864d872715971c300slive
3604deb3632beeca54cfdb3864d872715971c300slive<directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<name>AuthBasicProvider</name>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<description>Sets the authentication provider(s) for this location</description>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<syntax>AuthBasicProvider On|Off|<var>provider-name</var>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes[<var>provider-name</var>] ...</syntax>
ac1a656380fb9c5636a1f41b7e284f8eb2d60011chrisd<default>AuthBasicProvider On</default>
92988aaf68a67c9fa417556cb944eba6bb82ef92rbowen<contextlist><context>directory</context><context>.htaccess</context>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</contextlist>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<override>AuthConfig</override>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<usage>
3604deb3632beeca54cfdb3864d872715971c300slive <p>The <directive>AuthBasicProvider</directive> directive sets
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd which provider is used to authenticate the users for this location.
3604deb3632beeca54cfdb3864d872715971c300slive Setting the value to <code>On</code> will choose the default provider
f07998c217193b829f55c5ca8f4313ad5ba28f84nd (<code>file</code>). Since the <code>file</code> provider is implemented
f07998c217193b829f55c5ca8f4313ad5ba28f84nd by the <module>mod_authn_file</module> module, you have to make sure,
f07998c217193b829f55c5ca8f4313ad5ba28f84nd that the module is present in the server.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <example><title>Example</title>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz &lt;Location /secure&gt;<br />
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <indent>
3604deb3632beeca54cfdb3864d872715971c300slive AuthBasicProvider dbm<br />
3604deb3632beeca54cfdb3864d872715971c300slive AuthDBMType SDBM<br />
3604deb3632beeca54cfdb3864d872715971c300slive AuthDBMUserFile /www/etc/dbmpasswd<br />
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd Require valid-user<br />
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd </indent>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd &lt;/Location&gt;
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd </example>
3604deb3632beeca54cfdb3864d872715971c300slive
a5bff87eecd8413fcbee33eae01db42945b76becrbowen <p>See <module>mod_authn_dbm</module> and <module>mod_authn_file</module>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd for providers.</p>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <p>The value <code>Off</code> clears the provider list and sets it back
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd to the default.</p>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd</usage>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd</directivesynopsis>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<directivesynopsis>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener<name>AuthBasicAuthoritative</name>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener<description>Sets whether authorization and authentication are passed to
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovenerlower level modules</description>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener<syntax>AuthBasicAuthoritative On|Off</syntax>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener<default>AuthBasicAuthoritative On</default>
3604deb3632beeca54cfdb3864d872715971c300slive<contextlist><context>directory</context><context>.htaccess</context>
3604deb3632beeca54cfdb3864d872715971c300slive</contextlist>
5632f75dd34db0112cf4b6b7527eb538c80d976cniq<override>AuthConfig</override>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<usage>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>Setting the <directive>AuthBasicAuthoritative</directive> directive
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz explicitly to <code>Off</code> allows for both
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz authentication and authorization to be passed on to lower level
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd modules (as defined in the <code>modules.c</code> files) if there is
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <strong>no userID</strong> or <strong>rule</strong> matching the
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd supplied userID. If there is a userID and/or rule specified, the usual
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd password and access checks will be applied and a failure will give
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd an "Authentication Required" reply.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>So if a userID appears in the database of more than one module;
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz or if a valid <directive module="core">Require</directive>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz directive applies to more than one module; then the first module
3604deb3632beeca54cfdb3864d872715971c300slive will verify the credentials; and no access is passed on;
3604deb3632beeca54cfdb3864d872715971c300slive regardless of the <directive>AuthBasicAuthoritative</directive>
3604deb3632beeca54cfdb3864d872715971c300slive setting.</p>
3604deb3632beeca54cfdb3864d872715971c300slive
3604deb3632beeca54cfdb3864d872715971c300slive <p>By default control is not passed on and an unknown userID or
3604deb3632beeca54cfdb3864d872715971c300slive rule will result in an "Authentication Required" reply. Not setting
3604deb3632beeca54cfdb3864d872715971c300slive it thus keeps the system secure and forces an NCSA compliant
3604deb3632beeca54cfdb3864d872715971c300slive behaviour.</p>
3604deb3632beeca54cfdb3864d872715971c300slive</usage>
3604deb3632beeca54cfdb3864d872715971c300slive</directivesynopsis>
3604deb3632beeca54cfdb3864d872715971c300slive
3604deb3632beeca54cfdb3864d872715971c300slive</modulesynopsis>
3604deb3632beeca54cfdb3864d872715971c300slive