title: How do I restrict Apache/SVN access to specific users (LDAP/file-based authentication)?
body: <p>I have Apache/SVN running on Windows Server 2003 with authentication via LDAP/Active Directory and a flat-file.</p>
  
  <p>It's working great except that <em>any</em> LDAP user can access everything. I'd like to be able to limit SVN repositories by user or group.</p>
  
  <p>Ideally, I'd get to something like this:</p>
  
  <pre><code>&lt;Location /svn/repo1&gt;
    # Restricted to ldap-user1, file-user1, or members of ldap-group1,
    # all others denied
  &lt;/Location&gt;
  
  &lt;Location /svn/repo2&gt;
    # Restricted to ldap-user2, file-user2, or members of ldap-group2,
    # all others denied
  &lt;/Location&gt;
  </code></pre>
  
  <p>The real trick might be that I have mixed authentication: LDAP and file:</p>
  
  <pre><code>&lt;Location /svn&gt;
    DAV svn
    SVNParentPath C:/svn_repository
    AuthName "Subversion Repository"
    AuthType Basic
    AuthBasicProvider ldap file
    AuthUserFile "svn-users.txt" #file-based, custom users
    AuthzLDAPAuthoritative On
    AuthLDAPBindDN ldapuseraccount@directory.com
    AuthLDAPBindPassword ldappassword
    AuthLDAPURL ldap://directory.com:389/cn=Users,dc=directory,dc=com?sAMAccountName?sub?(objectCategory=person)
    Require valid-user
  &lt;/Location&gt;
  </code></pre>
  
  <hr>
  
  <p>In my googling, I've seen some people accomplish this by pulling in the <code>authz</code> file like this:</p>
  
  <pre><code>&lt;Location /svn&gt;
    ...
    AuthzSVNAccessFile "conf/svn-authz.txt"
  &lt;/Location
  </code></pre>
  
  <p>Then, I'd need to map the AD users. Any examples of that approach?</p>