]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_authn_anon.xml
Syntax for mod_a*.xml and MPMs
[apache] / docs / manual / mod / mod_authn_anon.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_authn_anon.xml.meta">
24
25 <name>mod_authn_anon</name>
26 <description>Allows "anonymous" user access to authenticated
27     areas</description>
28 <status>Extension</status>
29 <sourcefile>mod_authn_anon.c</sourcefile>
30 <identifier>authn_anon_module</identifier>
31 <compatibility>Available in Apache 2.1 and later</compatibility>
32
33 <summary>
34     <p>This module provides authentication front-ends such as
35     <module>mod_auth_basic</module> to authenticate users similar
36     to anonymous-ftp sites, <em>i.e.</em> have a 'magic' user id
37     'anonymous' and the email address as a password. These email
38     addresses can be logged.</p>
39
40     <p>Combined with other (database) access control methods, this
41     allows for effective user tracking and customization according
42     to a user profile while still keeping the site open for
43     'unregistered' users. One advantage of using Auth-based user
44     tracking is that, unlike magic-cookies and funny URL
45     pre/postfixes, it is completely browser independent and it
46     allows users to share URLs.</p>
47
48     <p>When using <module>mod_auth_basic</module>, this module is invoked
49     via the <directive module="mod_auth_basic">AuthBasicProvider</directive>
50     directive with the <code>anon</code> value.</p>
51 </summary>
52
53 <section id="example"><title>Example</title>
54     <p>The example below is combined with "normal" htpasswd-file based
55     authentication and allows users in additionally as 'guests' with the
56     following properties:</p>
57
58     <ul>
59       <li>It insists that the user enters a userID.
60       (<directive module="mod_authn_anon"
61       >Anonymous_NoUserID</directive>)</li>
62
63       <li>It insists that the user enters a password.
64       (<directive module="mod_authn_anon"
65       >Anonymous_MustGiveEmail</directive>)</li>
66
67       <li>The password entered must be a valid email address, <em>i.e.</em>
68       contain at least one '@' and a '.'.
69       (<directive module="mod_authn_anon"
70       >Anonymous_VerifyEmail</directive>)</li>
71
72       <li>The userID must be one of <code>anonymous guest www test
73       welcome</code> and comparison is <strong>not</strong> case
74       sensitive. (<directive module="mod_authn_anon"
75       >Anonymous</directive>)</li>
76
77       <li>And the Email addresses entered in the passwd field are
78       logged to the error log file.
79       (<directive module="mod_authn_anon"
80       >Anonymous_LogEmail</directive>)</li>
81     </ul>
82
83     <example><title>Example</title>
84     <highlight language="config">
85 &lt;Directory /var/www/html/private&gt;
86     AuthName "Use 'anonymous' &amp; Email address for guest entry"
87     AuthType Basic
88     AuthBasicProvider file anon
89     AuthUserFile /path/to/your/.htpasswd
90     
91     Anonymous_NoUserID off
92     Anonymous_MustGiveEmail on
93     Anonymous_VerifyEmail on
94     Anonymous_LogEmail on
95     Anonymous anonymous guest www test welcome
96     
97     Require valid-user
98 &lt;/Directory&gt;
99       </highlight>
100     </example>
101 </section>
102
103 <directivesynopsis>
104 <name>Anonymous</name>
105 <description>Specifies userIDs that are allowed access without
106 password verification</description>
107 <syntax>Anonymous <var>user</var> [<var>user</var>] ...</syntax>
108 <contextlist><context>directory</context><context>.htaccess</context>
109 </contextlist>
110 <override>AuthConfig</override>
111
112 <usage>
113     <p>A list of one or more 'magic' userIDs which are allowed
114     access without password verification. The userIDs are space
115     separated. It is possible to use the ' and " quotes to allow a
116     space in a userID as well as the \ escape character.</p>
117
118     <p>Please note that the comparison is
119     <strong>case-IN-sensitive</strong>.<br />
120     It's strongly recommended that the magic username
121     '<code>anonymous</code>' is always one of the allowed
122     userIDs.</p>
123
124     <example><title>Example:</title>
125       Anonymous anonymous "Not Registered" "I don't know"
126     </example>
127
128     <p>This would allow the user to enter without password
129     verification by using the userIDs "anonymous",
130     "AnonyMous", "Not Registered" and "I Don't Know".</p>
131
132     <p>As of Apache 2.1 it is possible to specify the userID as
133     "<code>*</code>". That allows <em>any</em> supplied userID to be
134     accepted.</p>
135 </usage>
136 </directivesynopsis>
137
138 <directivesynopsis>
139 <name>Anonymous_LogEmail</name>
140 <description>Sets whether the password entered will be logged in the
141 error log</description>
142 <syntax>Anonymous_LogEmail On|Off</syntax>
143 <default>Anonymous_LogEmail On</default>
144 <contextlist><context>directory</context><context>.htaccess</context>
145 </contextlist>
146 <override>AuthConfig</override>
147
148 <usage>
149     <p>When set <code>On</code>, the default, the 'password' entered
150     (which hopefully contains a sensible email address) is logged in
151     the error log.</p>
152 </usage>
153 </directivesynopsis>
154
155 <directivesynopsis>
156 <name>Anonymous_MustGiveEmail</name>
157 <description>Specifies whether blank passwords are allowed</description>
158 <syntax>Anonymous_MustGiveEmail On|Off</syntax>
159 <default>Anonymous_MustGiveEmail On</default>
160 <contextlist><context>directory</context><context>.htaccess</context>
161 </contextlist>
162 <override>AuthConfig</override>
163
164 <usage>
165     <p>Specifies whether the user must specify an email address as
166     the password. This prohibits blank passwords.</p>
167 </usage>
168 </directivesynopsis>
169
170 <directivesynopsis>
171 <name>Anonymous_NoUserID</name>
172 <description>Sets whether the userID field may be empty</description>
173 <syntax>Anonymous_NoUserID On|Off</syntax>
174 <default>Anonymous_NoUserID Off</default>
175 <contextlist><context>directory</context><context>.htaccess</context>
176 </contextlist>
177 <override>AuthConfig</override>
178
179 <usage>
180     <p>When set <code>On</code>, users can leave the userID (and
181     perhaps the password field) empty. This can be very convenient for
182     MS-Explorer users who can just hit return or click directly on the
183     OK button; which seems a natural reaction.</p>
184 </usage>
185 </directivesynopsis>
186
187 <directivesynopsis>
188 <name>Anonymous_VerifyEmail</name>
189 <description>Sets whether to check the password field for a correctly
190 formatted email address</description>
191 <syntax>Anonymous_VerifyEmail On|Off</syntax>
192 <default>Anonymous_VerifyEmail Off</default>
193 <contextlist><context>directory</context><context>.htaccess</context>
194 </contextlist>
195 <override>AuthConfig</override>
196
197 <usage>
198     <p>When set <code>On</code> the 'password' entered is checked for
199     at least one '@' and a '.' to encourage users to enter valid email
200     addresses (see the above <directive
201     module="mod_authn_anon">Anonymous_LogEmail</directive>).</p>
202 </usage>
203 </directivesynopsis>
204
205 </modulesynopsis>