summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_authn_anon.xml
blob: bd19909d34068d1b046bcfb6334ef8b70b119362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>

<!--
 Copyright 2002-2004 Apache Software Foundation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_authn_anon.xml.meta">

<name>mod_authn_anon</name>
<description>Allows "anonymous" user access to authenticated
    areas</description>
<status>Extension</status>
<sourcefile>mod_authn_anon.c</sourcefile>
<identifier>authn_anon_module</identifier>
<compatibility>Available in Apache 2.1 and later</compatibility>

<summary>
    <p>This module provides authentication front-ends such as
    <module>mod_auth_basic</module> to authenticate users similar
    to anonymous-ftp sites, <em>i.e.</em> have a 'magic' user id
    'anonymous' and the email address as a password. These email
    addresses can be logged.</p>

    <p>Combined with other (database) access control methods, this
    allows for effective user tracking and customization according
    to a user profile while still keeping the site open for
    'unregistered' users. One advantage of using Auth-based user
    tracking is that, unlike magic-cookies and funny URL
    pre/postfixes, it is completely browser independent and it
    allows users to share URLs.</p>

    <p>When using <module>mod_auth_basic</module>, this module is invoked
    via the <directive module="mod_auth_basic">AuthBasicProvider</directive>
    directive with the <code>anon</code> value.</p>
</summary>

<section id="example"><title>Example</title>
    <p>The example below is combined with "normal" htpasswd-file based
    authentication and allows users in additionally as 'guests' with the
    following properties:</p>

    <ul>
      <li>It insists that the user enters a userID.
      (<directive module="mod_authn_anon"
      >Anonymous_NoUserID</directive>)</li>

      <li>It insists that the user enters a password.
      (<directive module="mod_authn_anon"
      >Anonymous_MustGiveEmail</directive>)</li>

      <li>The password entered must be a valid email address, <em>i.e.</em>
      contain at least one '@' and a '.'.
      (<directive module="mod_authn_anon"
      >Anonymous_VerifyEmail</directive>)</li>

      <li>The userID must be one of <code>anonymous guest www test
      welcome</code> and comparison is <strong>not</strong> case
      sensitive. (<directive module="mod_authn_anon"
      >Anonymous</directive>)</li>

      <li>And the Email addresses entered in the passwd field are
      logged to the error log file.
      (<directive module="mod_authn_anon"
      >Anonymous_LogEmail</directive>)</li>
    </ul>

    <example><title>Example</title>
      &lt;Directory /foo&gt;
      <indent>
        AuthName "Use 'anonymous' &amp; Email address for guest entry"<br />
        AuthType Basic<br />
        AuthBasicProvider file anon<br />
        AuthUserFile /path/to/your/.htpasswd<br />
	<br />
        Anonymous_NoUserID off<br />
        Anonymous_MustGiveEmail on<br />
        Anonymous_VerifyEmail on<br />
        Anonymous_LogEmail on<br />
        Anonymous anonymous guest www test welcome<br />
        <br />
        Order Deny,Allow<br />
        Allow from all<br />
        <br />
        Require valid-user<br />
      </indent>
      &lt;/Directory&gt;
    </example>
</section>

<directivesynopsis>
<name>Anonymous</name>
<description>Specifies userIDs that are allowed access without
password verification</description>
<syntax>Anonymous <var>user</var> [<var>user</var>] ...</syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p>A list of one or more 'magic' userIDs which are allowed
    access without password verification. The userIDs are space
    separated. It is possible to use the ' and " quotes to allow a
    space in a userID as well as the \ escape character.</p>

    <p>Please note that the comparison is
    <strong>case-IN-sensitive</strong>.<br />
    It's strongly recommended that the magic username
    '<code>anonymous</code>' is always one of the allowed
    userIDs.</p>

    <example><title>Example:</title>
      Anonymous anonymous "Not Registered" "I don't know"
    </example>

    <p>This would allow the user to enter without password
    verification by using the userIDs "anonymous",
    "AnonyMous", "Not Registered" and "I Don't Know".</p>

    <p>As of Apache 2.1 it is possible to specify the userID as
    "<code>*</code>". That allows <em>any</em> supplied userID to be
    accepted.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>Anonymous_LogEmail</name>
<description>Sets whether the password entered will be logged in the
error log</description>
<syntax>Anonymous_LogEmail On|Off</syntax>
<default>Anonymous_LogEmail On</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p>When set <code>On</code>, the default, the 'password' entered
    (which hopefully contains a sensible email address) is logged in
    the error log.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>Anonymous_MustGiveEmail</name>
<description>Specifies whether blank passwords are allowed</description>
<syntax>Anonymous_MustGiveEmail On|Off</syntax>
<default>Anonymous_MustGiveEmail On</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p>Specifies whether the user must specify an email address as
    the password. This prohibits blank passwords.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>Anonymous_NoUserID</name>
<description>Sets whether the userID field may be empty</description>
<syntax>Anonymous_NoUserID On|Off</syntax>
<default>Anonymous_NoUserID Off</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p>When set <code>On</code>, users can leave the userID (and
    perhaps the password field) empty. This can be very convenient for
    MS-Explorer users who can just hit return or click directly on the
    OK button; which seems a natural reaction.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>Anonymous_VerifyEmail</name>
<description>Sets whether to check the password field for a correctly
formatted email address</description>
<syntax>Anonymous_VerifyEmail On|Off</syntax>
<default>Anonymous_VerifyEmail Off</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p>When set <code>On</code> the 'password' entered is checked for
    at least one '@' and a '.' to encourage users to enter valid email
    addresses (see the above <directive
    module="mod_authn_anon">Anonymous_LogEmail</directive>).</p>
</usage>
</directivesynopsis>

</modulesynopsis>