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