mod_auth_basic.xml revision 6f10385908fbdfd4849e4bc50e690ee54c62f2cd
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<?xml version="1.0"?>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd 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
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="mod_auth_basic.xml.meta">
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<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>
169280c7e65362d4ed444ec262c3f22a6a280166nd<compatibility>Available in Apache 2.1 and later</compatibility>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<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
3604deb3632beeca54cfdb3864d872715971c300slive <module>mod_auth_digest</module>. This module should
3604deb3632beeca54cfdb3864d872715971c300slive usually be combined with at least one authentication module
3604deb3632beeca54cfdb3864d872715971c300slive such as <module>mod_authn_file</module> and one authorization
3604deb3632beeca54cfdb3864d872715971c300slive module such as <module>mod_authz_user</module>.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</summary>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<seealso><directive module="mod_authn_core">AuthName</directive></seealso>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<seealso><directive module="mod_authn_core">AuthType</directive></seealso>
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<seealso><directive module="mod_authz_core">Require</directive></seealso>
92988aaf68a67c9fa417556cb944eba6bb82ef92rbowen<seealso><a href="/howto/auth.html">Authentication howto</a></seealso>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<name>AuthBasicProvider</name>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<description>Sets the authentication provider(s) for this location</description>
3604deb3632beeca54cfdb3864d872715971c300slive<syntax>AuthBasicProvider <var>provider-name</var>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd[<var>provider-name</var>] ...</syntax>
3604deb3632beeca54cfdb3864d872715971c300slive<default>AuthBasicProvider file</default>
f07998c217193b829f55c5ca8f4313ad5ba28f84nd<contextlist><context>directory</context><context>.htaccess</context>
f07998c217193b829f55c5ca8f4313ad5ba28f84nd</contextlist>
f07998c217193b829f55c5ca8f4313ad5ba28f84nd<override>AuthConfig</override>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<usage>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <p>The <directive>AuthBasicProvider</directive> directive sets
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd which provider is used to authenticate the users for this location.
3604deb3632beeca54cfdb3864d872715971c300slive The default <code>file</code> provider is implemented
3604deb3632beeca54cfdb3864d872715971c300slive by the <module>mod_authn_file</module> module. Make sure
3604deb3632beeca54cfdb3864d872715971c300slive that the chosen provider module is present in the server.</p>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <example><title>Example</title>
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh <highlight language="config">
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh&lt;Location /secure&gt;
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh AuthType basic
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh AuthName "private area"
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh AuthBasicProvider dbm
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh AuthDBMType SDBM
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh AuthDBMUserFile /www/etc/dbmpasswd
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh Require valid-user
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh&lt;/Location&gt;
6f10385908fbdfd4849e4bc50e690ee54c62f2cdhumbedooh </highlight>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd </example>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener <p> Providers are queried in order until a provider finds a match
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim for the requested username, at which point this sole provider will
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener attempt to check the password. A failure to verify the password does
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener not result in control being passed on to subsequent providers.</p>
41618b507c149c7adf89bd92a0cc2c6962a29dcfcovener
3604deb3632beeca54cfdb3864d872715971c300slive <p>Providers are implemented by <module>mod_authn_dbm</module>,
3604deb3632beeca54cfdb3864d872715971c300slive <module>mod_authn_file</module>, <module>mod_authn_dbd</module>,
5632f75dd34db0112cf4b6b7527eb538c80d976cniq <module>mod_authnz_ldap</module> and <module>mod_authn_socache</module>.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</usage>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<name>AuthBasicAuthoritative</name>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd<description>Sets whether authorization and authentication are passed to
35ffb30f57f777dbf3f17c5a5ddf706559942c16ndlower level modules</description>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd<syntax>AuthBasicAuthoritative On|Off</syntax>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd<default>AuthBasicAuthoritative On</default>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd<contextlist><context>directory</context><context>.htaccess</context>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</contextlist>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<override>AuthConfig</override>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<usage>
3604deb3632beeca54cfdb3864d872715971c300slive <p>Normally, each authorization module listed in <directive
3604deb3632beeca54cfdb3864d872715971c300slive module="mod_auth_basic">AuthBasicProvider</directive> will attempt
3604deb3632beeca54cfdb3864d872715971c300slive to verify the user, and if the user is not found in any provider,
3604deb3632beeca54cfdb3864d872715971c300slive access will be denied. Setting the
3604deb3632beeca54cfdb3864d872715971c300slive <directive>AuthBasicAuthoritative</directive> directive explicitly
3604deb3632beeca54cfdb3864d872715971c300slive to <code>Off</code> allows for both authentication and
3604deb3632beeca54cfdb3864d872715971c300slive authorization to be passed on to other non-provider-based modules
3604deb3632beeca54cfdb3864d872715971c300slive if there is <strong>no userID</strong> or <strong>rule</strong>
3604deb3632beeca54cfdb3864d872715971c300slive matching the supplied userID. This should only be necessary when
3604deb3632beeca54cfdb3864d872715971c300slive combining <module>mod_auth_basic</module> with third-party modules
3604deb3632beeca54cfdb3864d872715971c300slive that are not configured with the <directive
3604deb3632beeca54cfdb3864d872715971c300slive module="mod_auth_basic">AuthBasicProvider</directive>
3604deb3632beeca54cfdb3864d872715971c300slive directive. When using such modules, the order of processing
3604deb3632beeca54cfdb3864d872715971c300slive is determined in the modules' source code and is not configurable.</p>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</usage>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz</modulesynopsis>