]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_auth_digest.xml
Update the stylesheet reference to the new language-specific version.
[apache] / docs / manual / mod / mod_auth_digest.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 <name>mod_auth_digest</name>
6 <description>User authentication using MD5
7     Digest Authentication.</description>
8 <status>Experimental</status>
9 <sourcefile>mod_auth_digest.c</sourcefile>
10 <identifier>auth_digest_module</identifier>
11
12 <summary>
13     <p>This module implements HTTP Digest Authentication.  However, it
14     has not been extensively tested and is therefore marked
15     experimental.</p>
16 </summary>
17
18 <seealso><directive module="core">AuthName</directive></seealso>
19 <seealso><directive module="core">AuthType</directive></seealso>
20 <seealso><directive module="core">Require</directive></seealso>
21 <seealso><directive module="core">Satisfy</directive></seealso>
22
23 <section><title>Using Digest Authentication</title>
24
25     <p>Using MD5 Digest authentication is very simple. Simply set
26     up authentication normally, using "AuthType Digest" and
27     "AuthDigestFile" instead of the normal "AuthType Basic" and
28     "AuthUserFile"; also, replace any "AuthGroupFile" with
29     "AuthDigestGroupFile". Then add a "AuthDigestDomain" directive
30     containing at least the root URI(s) for this protection space.
31     Example:</p>
32 <example>
33   &lt;Location /private/&gt;<br />
34   AuthType Digest<br />
35   AuthName "private area"<br />
36   AuthDigestDomain /private/ http://mirror.my.dom/private2/<br />
37   AuthDigestFile /web/auth/.digest_pw<br />
38   Require valid-user<br />
39   &lt;/Location&gt;
40 </example>
41
42 <note><title>Note</title>
43     <p>MD5 authentication provides a more
44     secure password system than Basic authentication, but only
45     works with supporting browsers. As of this writing (October 2001),
46     the only major browsers which support digest authentication are
47     <a href="http://www.opera.com/">Opera 4.0</a>,
48     <a href="http://www.microsoft.com/windows/ie/">MS Internet
49     Explorer 5.0</a> and <a href="http://www.w3.org/Amaya/">Amaya</a>.
50     Therefore, we do not yet recommend using this feature on a large
51     Internet site. However, for personal and intra-net use, where
52     browser users can be controlled, it is ideal.</p>
53 </note>
54 </section>
55
56 <directivesynopsis>
57 <name>AuthDigestFile</name>
58 <description>Location of the text file containing the list
59 of users and encoded passwords for digest authentication</description>
60 <syntax>AuthDigestFile <em>file-path</em></syntax>
61 <contextlist><context>directory</context><context>.htaccess</context>
62 </contextlist>
63 <override>AuthConfig</override>
64
65 <usage>
66     <p>The <directive>AuthDigestFile</directive> directive sets the
67     name of a textual file containing the list of users and encoded
68     passwords for digest authentication. <em>File-path</em> is the
69     absolute path to the user file.</p>
70
71     <p>The digest file uses a special format. Files in this format
72     can be created using the <a
73     href="../programs/htdigest.html">htdigest</a> utility found in
74     the support/ subdirectory of the Apache distribution.</p>
75 </usage>
76 </directivesynopsis>
77
78 <directivesynopsis>
79 <name>AuthDigestGroupFile</name>
80 <description>Name of the text file containing the list of groups
81 for digest authentication</description>
82 <syntax>AuthDigestGroupFile <em>file-path</em></syntax>
83 <contextlist><context>directory</context><context>.htaccess</context>
84 </contextlist>
85 <override>AuthConfig</override>
86
87 <usage>
88     <p>The <directive>AuthDigestGroupFile</directive> directive sets
89     the name of a textual file containing the list of groups and their
90     members (user names). <em>File-path</em> is the absolute path to
91     the group file.</p>
92
93     <p>Each line of the group file contains a groupname followed by
94     a colon, followed by the member usernames separated by spaces.
95     Example:</p>
96
97 <example>mygroup: bob joe anne</example>
98
99     <p>Note that searching large text files is <em>very</em>
100     inefficient.</p>
101
102     <p>Security: make sure that the AuthGroupFile is stored outside
103     the document tree of the web-server; do <em>not</em> put it in
104     the directory that it protects. Otherwise, clients will be able
105     to download the AuthGroupFile.</p>
106 </usage>
107 </directivesynopsis>
108
109 <directivesynopsis>
110 <name>AuthDigestQop</name>
111 <description>Determines the quality-of-protection to use in digest
112 authentication</description>
113 <syntax>AuthDigestQop none|auth|auth-int [auth|auth-int]</syntax>
114 <default>AuthDigestQop auth</default>
115 <contextlist><context>directory</context><context>.htaccess</context>
116 </contextlist>
117 <override>AuthConfig</override>
118
119 <usage>
120     <p>The <directive>AuthDigestQop</directive> directive determines
121     the quality-of-protection to use. <em>auth</em> will only do
122     authentication (username/password); <em>auth-int</em> is
123     authentication plus integrity checking (an MD5 hash of the entity
124     is also computed and checked); <em>none</em> will cause the module
125     to use the old RFC-2069 digest algorithm (which does not include
126     integrity checking). Both <em>auth</em> and <em>auth-int</em> may
127     be specified, in which the case the browser will choose which of
128     these to use. <em>none</em> should only be used if the browser for
129     some reason does not like the challenge it receives otherwise.</p>
130
131     <p><strong><em>auth-int</em> is not implemented
132     yet</strong>.</p>
133 </usage>
134 </directivesynopsis>
135
136 <directivesynopsis>
137 <name>AuthDigestNonceLifetime</name>
138 <description>How long the server nonce is valid</description>
139 <syntax>AuthDigestNonceLifetime <em>seconds</em></syntax>
140 <default>AuthDigestNonceLifetime 300</default>
141 <contextlist><context>directory</context><context>.htaccess</context>
142 </contextlist>
143 <override>AuthConfig</override>
144
145 <usage>
146     <p>The <directive>AuthDigestNonceLifetime</directive> directive
147     controls how long the server nonce is valid. When the client
148     contacts the server using an expired nonce the server will send
149     back a 401 with <code>stale=true</code>. If <em>seconds</em> is
150     greater than 0 then it specifies the amount of time for which the
151     nonce is valid; this should probably never be set to less than 10
152     seconds. If <em>seconds</em> is less than 0 then the nonce never
153     expires. <!-- Not implemented yet If <EM>seconds</EM> is 0 then
154     the nonce may be used exactly once by the client. Note that while
155     one-time-nonces provide higher security against replay attacks,
156     they also have significant performance implications, as the
157     browser cannot pipeline or multiple connections for the
158     requests. Because browsers cannot easily detect that
159     one-time-nonces are being used, this may lead to browsers trying
160     to pipeline requests and receiving 401 responses for all but the
161     first request, requiring the browser to resend the requests. Note
162     also that the protection against reply attacks only makes sense
163     for dynamically generated content and things like POST requests;
164     for static content the attacker may already have the complete
165     response, so one-time-nonces do not make sense here.  -->
166     </p>
167 </usage>
168 </directivesynopsis>
169
170 <directivesynopsis>
171 <name>AuthDigestNonceFormat</name>
172 <description>Determines how the nonce is generated</description>
173 <syntax>???</syntax>
174 <default>???</default>
175 <contextlist><context>directory</context><context>.htaccess</context>
176 </contextlist>
177 <override>AuthConfig</override>
178
179 <usage>
180     <p><strong>Not implemented yet.</strong> <!--
181             <P>The AuthDigestNonceFormat directive determines how the nonce is
182             generated.
183             -->
184     </p>
185 </usage>
186 </directivesynopsis>
187
188 <directivesynopsis>
189 <name>AuthDigestNcCheck</name>
190 <description>Enables or disables checking of the nonce-count sent by the
191 server</description>
192 <syntax>AuthDigestNcCheck On|Off</syntax>
193 <default>AuthDigestNcCheck Off</default>
194 <contextlist><context>server config</context></contextlist>
195
196 <usage>
197     <p><strong>Not implemented yet.</strong> <!--
198             <P>The AuthDigestNcCheck directive enables or disables the checking of the
199             nonce-count sent by the server.
200
201             <P>While recommended from a security standpoint, turning this directive
202             On has one important performance implication. To check the nonce-count
203             *all* requests (which have an Authorization header, irrespective of
204             whether they require digest authentication) must be serialized through
205             a critical section. If the server is handling a large number of
206             requests which contain the Authorization header then this may noticeably
207             impact performance.
208             -->
209     </p>
210 </usage>
211 </directivesynopsis>
212
213 <directivesynopsis>
214 <name>AuthDigestAlgorithm</name>
215 <description>Selects the algorithm used to calculate the challenge and
216 response hases in digest authentication</description>
217 <syntax>AuthDigestAlgorithm MD5|MD5-sess</syntax>
218 <default>AuthDigestAlgorithm MD5</default>
219 <contextlist><context>directory</context><context>.htaccess</context>
220 </contextlist>
221 <override>AuthConfig</override>
222
223 <usage>
224     <p>The <directive>AuthDigestAlgorithm</directive> directive
225     selects the algorithm used to calculate the challenge and response
226     hashes.</p>
227
228     <p><strong><em>MD5-sess</em> is not correctly implemented
229     yet</strong>. <!--
230             <P>To use <EM>MD5-sess</EM> you must first code up the
231             <VAR>get_userpw_hash()</VAR> function in <VAR>mod_auth_digest.c</VAR> .
232             -->
233     </p>
234 </usage>
235 </directivesynopsis>
236
237 <directivesynopsis>
238 <name>AuthDigestDomain</name>
239 <description>URIs that are in the same protection space for digest
240 authentication</description>
241 <syntax>AuthDigestDomain <em>URI</em> [<em>URI</em>] ...</syntax>
242 <contextlist><context>directory</context><context>.htaccess</context>
243 </contextlist>
244 <override>AuthConfig</override>
245
246 <usage>
247     <p>The <directive>AuthDigestDomain</directive> directive allows
248     you to specify one or more URIs which are in the same protection
249     space (i.e. use the same realm and username/password info). The
250     specified URIs are prefixes, i.e. the client will assume that all
251     URIs "below" these are also protected by the same
252     username/password. The URIs may be either absolute URIs
253     (i.e. inluding a scheme, host, port, etc) or relative URIs.</p>
254
255     <p>This directive <em>should</em> always be specified and
256     contain at least the (set of) root URI(s) for this space.
257     Omitting to do so will cause the client to send the
258     Authorization header for <em>every request</em> sent to this
259     server. Apart from increasing the size of the request, it may
260     also have a detrimental effect on performance if
261     "AuthDigestNcCheck" is on.</p>
262
263     <p>The URIs specified can also point to different servers, in
264     which case clients (which understand this) will then share
265     username/password info across multiple servers without
266     prompting the user each time. </p>
267 </usage>
268 </directivesynopsis>
269
270 </modulesynopsis>
271