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