github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_authz_dbm.html.en (about) 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> 4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> 5 <!-- 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 This file is generated from xml source: DO NOT EDIT 8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 9 --> 10 <title>mod_authz_dbm - Apache HTTP Server Version 2.2</title> 11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> 14 <script src="../style/scripts/prettify.min.js" type="text/javascript"> 15 </script> 16 17 <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_authz_dbm.html" rel="canonical" /></head> 18 <body> 19 <div id="page-header"> 20 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p> 21 <p class="apache">Apache HTTP Server Version 2.2</p> 22 <img alt="" src="../images/feather.gif" /></div> 23 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> 24 <div id="path"> 25 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div> 26 <div id="page-content"> 27 <div class="retired"><h4>Please note</h4> 28 <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p> 29 <p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_authz_dbm.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache Module mod_authz_dbm</h1> 30 <div class="toplang"> 31 <p><span>Available Languages: </span><a href="../en/mod/mod_authz_dbm.html" title="English"> en </a> | 32 <a href="../ko/mod/mod_authz_dbm.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 33 </div> 34 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Group authorization using DBM files</td></tr> 35 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr> 36 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>authz_dbm_module</td></tr> 37 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_authz_dbm.c</td></tr> 38 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1 and later</td></tr></table> 39 <h3>Summary</h3> 40 41 <p>This module provides authorization capabilities so that 42 authenticated users can be allowed or denied access to portions 43 of the web site by group membership. Similar functionality is 44 provided by <code class="module"><a href="../mod/mod_authz_groupfile.html">mod_authz_groupfile</a></code>.</p> 45 </div> 46 <div id="quickview"><h3 class="directives">Directives</h3> 47 <ul id="toc"> 48 <li><img alt="" src="../images/down.gif" /> <a href="#authdbmgroupfile">AuthDBMGroupFile</a></li> 49 <li><img alt="" src="../images/down.gif" /> <a href="#authzdbmauthoritative">AuthzDBMAuthoritative</a></li> 50 <li><img alt="" src="../images/down.gif" /> <a href="#authzdbmtype">AuthzDBMType</a></li> 51 </ul> 52 <h3>See also</h3> 53 <ul class="seealso"> 54 <li><code class="directive"><a href="../mod/core.html#require">Require</a></code></li> 55 <li><code class="directive"><a href="../mod/core.html#satisfy">Satisfy</a></code></li> 56 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 57 58 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 59 <div class="directive-section"><h2><a name="AuthDBMGroupFile" id="AuthDBMGroupFile">AuthDBMGroupFile</a> <a name="authdbmgroupfile" id="authdbmgroupfile">Directive</a></h2> 60 <table class="directive"> 61 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the name of the database file containing the list 62 of user groups for authorization</td></tr> 63 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthDBMGroupFile <var>file-path</var></code></td></tr> 64 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> 65 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr> 66 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 67 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authz_dbm</td></tr> 68 </table> 69 <p>The <code class="directive">AuthDBMGroupFile</code> directive sets the 70 name of a DBM file containing the list of user groups for user 71 authorization. <var>File-path</var> is the absolute path to the 72 group file.</p> 73 74 <p>The group file is keyed on the username. The value for a 75 user is a comma-separated list of the groups to which the users 76 belongs. There must be no whitespace within the value, and it 77 must never contain any colons.</p> 78 79 <div class="warning"><h3>Security</h3> 80 <p>Make sure that the <code class="directive">AuthDBMGroupFile</code> is 81 stored outside the document tree of the web-server. Do 82 <strong>not</strong> put it in the directory that it protects. 83 Otherwise, clients will be able to download the 84 <code class="directive">AuthDBMGroupFile</code> unless otherwise 85 protected.</p> 86 </div> 87 88 <p>Combining Group and Password DBM files: In some cases it is 89 easier to manage a single database which contains both the 90 password and group details for each user. This simplifies any 91 support programs that need to be written: they now only have to 92 deal with writing to and locking a single DBM file. This can be 93 accomplished by first setting the group and password files to 94 point to the same DBM:</p> 95 96 <div class="example"><p><code> 97 AuthDBMGroupFile /www/userbase<br /> 98 AuthDBMUserFile /www/userbase 99 </code></p></div> 100 101 <p>The key for the single DBM is the username. The value consists 102 of</p> 103 104 <div class="example"><p><code> 105 Encrypted Password : List of Groups [ : (ignored) ] 106 </code></p></div> 107 108 <p>The password section contains the encrypted 109 password as before. This is followed by a colon and the comma 110 separated list of groups. Other data may optionally be left in the 111 DBM file after another colon; it is ignored by the authorization 112 module. This is what www.telescope.org uses for its combined 113 password and group database.</p> 114 115 </div> 116 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 117 <div class="directive-section"><h2><a name="AuthzDBMAuthoritative" id="AuthzDBMAuthoritative">AuthzDBMAuthoritative</a> <a name="authzdbmauthoritative" id="authzdbmauthoritative">Directive</a></h2> 118 <table class="directive"> 119 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets whether authorization will be passed on to lower level 120 modules</td></tr> 121 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthzDBMAuthoritative On|Off</code></td></tr> 122 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthzDBMAuthoritative On</code></td></tr> 123 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> 124 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr> 125 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 126 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authz_dbm</td></tr> 127 </table> 128 <p>Setting the <code class="directive">AuthzDBMAuthoritative</code> 129 directive explicitly to <code>Off</code> allows group authorization 130 to be passed on to lower level modules (as defined in the 131 <code>modules.c</code> file) if there is no group found 132 for the supplied userID. If there are any groups 133 specified, the usual checks will be applied and a failure will 134 give an Authentication Required reply.</p> 135 136 <p>So if a userID appears in the database of more than one module; 137 or if a valid <code class="directive"><a href="../mod/core.html#require">Require</a></code> 138 directive applies to more than one module; then the first module 139 will verify the credentials; and no access is passed on; 140 regardless of the <code class="directive">AuthAuthoritative</code> setting.</p> 141 142 <p>A common use for this is in conjunction with one of the 143 auth providers; such as <code class="module"><a href="../mod/mod_authn_dbm.html">mod_authn_dbm</a></code> or 144 <code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code>. Whereas this DBM module supplies 145 the bulk of the user credential checking; a few (administrator) related 146 accesses fall through to a lower level with a well protected 147 <code>.htpasswd</code> file.</p> 148 149 <p>By default, control is not passed on and an unknown group 150 will result in an Authentication Required reply. Not 151 setting it thus keeps the system secure and forces an NCSA 152 compliant behaviour.</p> 153 154 <div class="warning"><h3>Security</h3> 155 <p>Do consider the implications of allowing a user to 156 allow fall-through in his .htaccess file; and verify that this 157 is really what you want; Generally it is easier to just secure 158 a single <code>.htpasswd</code> file, than it is to secure a 159 database which might have more access interfaces.</p> 160 </div> 161 162 </div> 163 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 164 <div class="directive-section"><h2><a name="AuthzDBMType" id="AuthzDBMType">AuthzDBMType</a> <a name="authzdbmtype" id="authzdbmtype">Directive</a></h2> 165 <table class="directive"> 166 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the type of database file that is used to 167 store list of user groups</td></tr> 168 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthzDBMType default|SDBM|GDBM|NDBM|DB</code></td></tr> 169 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AuthzDBMType default</code></td></tr> 170 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> 171 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr> 172 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> 173 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_authz_dbm</td></tr> 174 </table> 175 <p>Sets the type of database file that is used to store the list 176 of user groups. 177 The default database type is determined at compile time. The 178 availability of other types of database files also depends on 179 <a href="../install.html#dbm">compile-time settings</a>.</p> 180 181 <p>It is crucial that whatever program you use to create your group 182 files is configured to use the same type of database.</p> 183 184 </div> 185 </div> 186 <div class="bottomlang"> 187 <p><span>Available Languages: </span><a href="../en/mod/mod_authz_dbm.html" title="English"> en </a> | 188 <a href="../ko/mod/mod_authz_dbm.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 189 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 190 <script type="text/javascript"><!--//--><![CDATA[//><!-- 191 var comments_shortname = 'httpd'; 192 var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_authz_dbm.html'; 193 (function(w, d) { 194 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 195 d.write('<div id="comments_thread"><\/div>'); 196 var s = d.createElement('script'); 197 s.type = 'text/javascript'; 198 s.async = true; 199 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 200 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 201 } 202 else { 203 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 204 } 205 })(window, document); 206 //--><!]]></script></div><div id="footer"> 207 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> 208 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 209 if (typeof(prettyPrint) !== 'undefined') { 210 prettyPrint(); 211 } 212 //--><!]]></script> 213 </body></html>