]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_authn_anon.xml
Update docco xforms
[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       &lt;Directory /var/www/html/private&gt;
85       <indent>
86         AuthName "Use 'anonymous' &amp; Email address for guest entry"<br />
87         AuthType Basic<br />
88         AuthBasicProvider file anon<br />
89         AuthUserFile /path/to/your/.htpasswd<br />
90         <br />
91         Anonymous_NoUserID off<br />
92         Anonymous_MustGiveEmail on<br />
93         Anonymous_VerifyEmail on<br />
94         Anonymous_LogEmail on<br />
95         Anonymous anonymous guest www test welcome<br />
96         <br />
97         Require all granted<br />
98         <br />
99         Require valid-user<br />
100       </indent>
101       &lt;/Directory&gt;
102     </example>
103 </section>
104
105 <directivesynopsis>
106 <name>Anonymous</name>
107 <description>Specifies userIDs that are allowed access without
108 password verification</description>
109 <syntax>Anonymous <var>user</var> [<var>user</var>] ...</syntax>
110 <contextlist><context>directory</context><context>.htaccess</context>
111 </contextlist>
112 <override>AuthConfig</override>
113
114 <usage>
115     <p>A list of one or more 'magic' userIDs which are allowed
116     access without password verification. The userIDs are space
117     separated. It is possible to use the ' and " quotes to allow a
118     space in a userID as well as the \ escape character.</p>
119
120     <p>Please note that the comparison is
121     <strong>case-IN-sensitive</strong>.<br />
122     It's strongly recommended that the magic username
123     '<code>anonymous</code>' is always one of the allowed
124     userIDs.</p>
125
126     <example><title>Example:</title>
127       Anonymous anonymous "Not Registered" "I don't know"
128     </example>
129
130     <p>This would allow the user to enter without password
131     verification by using the userIDs "anonymous",
132     "AnonyMous", "Not Registered" and "I Don't Know".</p>
133
134     <p>As of Apache 2.1 it is possible to specify the userID as
135     "<code>*</code>". That allows <em>any</em> supplied userID to be
136     accepted.</p>
137 </usage>
138 </directivesynopsis>
139
140 <directivesynopsis>
141 <name>Anonymous_LogEmail</name>
142 <description>Sets whether the password entered will be logged in the
143 error log</description>
144 <syntax>Anonymous_LogEmail On|Off</syntax>
145 <default>Anonymous_LogEmail On</default>
146 <contextlist><context>directory</context><context>.htaccess</context>
147 </contextlist>
148 <override>AuthConfig</override>
149
150 <usage>
151     <p>When set <code>On</code>, the default, the 'password' entered
152     (which hopefully contains a sensible email address) is logged in
153     the error log.</p>
154 </usage>
155 </directivesynopsis>
156
157 <directivesynopsis>
158 <name>Anonymous_MustGiveEmail</name>
159 <description>Specifies whether blank passwords are allowed</description>
160 <syntax>Anonymous_MustGiveEmail On|Off</syntax>
161 <default>Anonymous_MustGiveEmail On</default>
162 <contextlist><context>directory</context><context>.htaccess</context>
163 </contextlist>
164 <override>AuthConfig</override>
165
166 <usage>
167     <p>Specifies whether the user must specify an email address as
168     the password. This prohibits blank passwords.</p>
169 </usage>
170 </directivesynopsis>
171
172 <directivesynopsis>
173 <name>Anonymous_NoUserID</name>
174 <description>Sets whether the userID field may be empty</description>
175 <syntax>Anonymous_NoUserID On|Off</syntax>
176 <default>Anonymous_NoUserID Off</default>
177 <contextlist><context>directory</context><context>.htaccess</context>
178 </contextlist>
179 <override>AuthConfig</override>
180
181 <usage>
182     <p>When set <code>On</code>, users can leave the userID (and
183     perhaps the password field) empty. This can be very convenient for
184     MS-Explorer users who can just hit return or click directly on the
185     OK button; which seems a natural reaction.</p>
186 </usage>
187 </directivesynopsis>
188
189 <directivesynopsis>
190 <name>Anonymous_VerifyEmail</name>
191 <description>Sets whether to check the password field for a correctly
192 formatted email address</description>
193 <syntax>Anonymous_VerifyEmail On|Off</syntax>
194 <default>Anonymous_VerifyEmail Off</default>
195 <contextlist><context>directory</context><context>.htaccess</context>
196 </contextlist>
197 <override>AuthConfig</override>
198
199 <usage>
200     <p>When set <code>On</code> the 'password' entered is checked for
201     at least one '@' and a '.' to encourage users to enter valid email
202     addresses (see the above <directive
203     module="mod_authn_anon">Anonymous_LogEmail</directive>).</p>
204 </usage>
205 </directivesynopsis>
206
207 </modulesynopsis>