]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_authn_anon.xml
full clean-up of the auth-docs; feel free to shake out any
[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>
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.</li>
56
57       <li>And the Email addresses entered in the passwd field are
58       logged to the error log file
59       (<directive module="mod_authn_anon"
60       >Anonymous_LogEmail</directive>)</li>
61     </ul>
62
63     <example><title>Example</title>
64       &lt;Directory /foo&gt;
65       <indent>
66         AuthName "Use 'anonymous' &amp; Email address for guest entry"<br />
67         AuthType Basic<br />
68         AuthBasicProvider file anon<br />
69         AuthUserFile /path/to/your/.htpasswd<br />
70         <br />
71         Anonymous_NoUserId off<br />
72         Anonymous_MustGiveEmail on<br />
73         Anonymous_VerifyEmail on<br />
74         Anonymous_LogEmail on<br />
75         Anonymous anonymous guest www test welcome<br />
76         <br />
77         Order Deny,Allow<br />
78         Allow from all<br />
79         <br />
80         Require valid-user<br />
81       </indent>
82       &lt;/Directory&gt;
83     </example>
84 </section>
85
86 <directivesynopsis>
87 <name>Anonymous</name>
88 <description>Specifies userIDs that areallowed access without
89 password verification</description>
90 <syntax>Anonymous <var>user</var> [<var>user</var>] ...</syntax>
91 <contextlist><context>directory</context><context>.htaccess</context>
92 </contextlist>
93 <override>AuthConfig</override>
94
95 <usage>
96     <p>A list of one or more 'magic' userIDs which are allowed
97     access without password verification. The userIDs are space
98     separated. It is possible to use the ' and " quotes to allow a
99     space in a userID as well as the \ escape character.</p>
100
101     <p>Please note that the comparison is
102     <strong>case-IN-sensitive</strong>.<br />
103     It's strongly recommended that the magic username
104     '<code>anonymous</code>' is always one of the allowed
105     userIDs.</p>
106
107     <example><title>Example:</title>
108       Anonymous anonymous "Not Registered" "I don't know"
109     </example>
110
111     <p>This would allow the user to enter without password
112     verification by using the userIDs "anonymous",
113     "AnonyMous", "Not Registered" and "I Don't Know".</p>
114 </usage>
115 </directivesynopsis>
116
117 <directivesynopsis>
118 <name>Anonymous_LogEmail</name>
119 <description>Sets whether the password entered will be logged in the
120 error log</description>
121 <syntax>Anonymous_LogEmail On|Off</syntax>
122 <default>Anonymous_LogEmail On</default>
123 <contextlist><context>directory</context><context>.htaccess</context>
124 </contextlist>
125 <override>AuthConfig</override>
126
127 <usage>
128     <p>When set <code>On</code>, the default, the 'password' entered
129     (which hopefully contains a sensible email address) is logged in
130     the error log.</p>
131 </usage>
132 </directivesynopsis>
133
134 <directivesynopsis>
135 <name>Anonymous_MustGiveEmail</name>
136 <description>Specifies whether blank passwords are allowed</description>
137 <syntax>Anonymous_MustGiveEmail On|Off</syntax>
138 <default>Anonymous_MustGiveEmail On</default>
139 <contextlist><context>directory</context><context>.htaccess</context>
140 </contextlist>
141 <override>AuthConfig</override>
142
143 <usage>
144     <p>Specifies whether the user must specify an email address as
145     the password. This prohibits blank passwords.</p>
146 </usage>
147 </directivesynopsis>
148
149 <directivesynopsis>
150 <name>Anonymous_NoUserID</name>
151 <description>Sets whether the userID field may be empty</description>
152 <syntax>Anonymous_NoUserID On|Off</syntax>
153 <default>Anonymous_NoUserID Off</default>
154 <contextlist><context>directory</context><context>.htaccess</context>
155 </contextlist>
156 <override>AuthConfig</override>
157
158 <usage>
159     <p>When set <code>On</code>, users can leave the userID (and
160     perhaps the password field) empty. This can be very convenient for
161     MS-Explorer users who can just hit return or click directly on the
162     OK button; which seems a natural reaction.</p>
163 </usage>
164 </directivesynopsis>
165
166 <directivesynopsis>
167 <name>Anonymous_VerifyEmail</name>
168 <description>Sets whether to check the password field for a correctly
169 formatted email address</description>
170 <syntax>Anonymous_VerifyEmail On|Off</syntax>
171 <default>Anonymous_VerifyEmail Off</default>
172 <contextlist><context>directory</context><context>.htaccess</context>
173 </contextlist>
174 <override>AuthConfig</override>
175
176 <usage>
177     <p>When set <code>On</code> the 'password' entered is checked for
178     at least one '@' and a '.' to encourage users to enter valid email
179     addresses (see the above <directive
180     module="mod_authn_anon">Anonymous_LogEmail</directive>).</p>
181 </usage>
182 </directivesynopsis>
183
184 </modulesynopsis>