# Needed to do Subversion Apache server.
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so

# Only needed if you decide to do "per-directory" access control.
LoadModule authz_svn_module       modules/mod_authz_svn.so

# Needed to provide PAM-based authentication for Subversion.
LoadModule authnz_external_module modules/mod_authnz_external.so
LoadModule authz_unixgroup_module modules/mod_authz_unixgroup.so
DefineExternalAuth pwauth pipe /usr/sbin/pwauth

<Location /repos>
    DAV svn
    #either SVNPath or SVNParentPath should be present  
    SVNPath /var/www/svn/repos
    AuthName "SVN Repos"
    AuthType Basic
    #AuthBasicProvider external
    AuthBasicProvider ldap
    #AuthExternal pwauth

    #check once by commenting AuthzUnixGroup
    #AuthzUnixGroup on

    #AuthzSVNAccessFile /var/www/svn/users-access-file
    #AuthzSVNAccessFile /var/www/svn/svn-users-access-file

  #AuthLDAPURL ldaps://ldap_l.cisco.com:10648/ou=users,dc=sprint,dc=com?hasSubordinates,objectClass?one?(objectClass=*)
  #AuthLDAPURL ldaps://ldap_l.cisco.com:10648/ou=users,dc=sprint,dc=com?hasSubordinates,objectClass?one?(objectClass=*)?uid
  #AuthLDAPURL ldaps://ldap_l.cisco.com:10648/ou=users,dc=sprint,dc=com?uid

  #below url caused "[ldap_search_ext_s() for user failed][Bad search filter]" error 
  #AuthLDAPURL ldap://ldap_l.cisco.com:10384/ou=users,dc=sprint,dc=com?hasSubordinates,objectClass?one?uid NONE

  #below url caused "[User not found][No such object]" error 
  AuthLDAPURL ldap://ldap_l.cisco.com:10384/ou=users,dc=sprint,dc=com?hasSubordinates,objectClass?one?(objectClass=*) NONE

  AuthzLDAPAuthoritative off

  #check by commenting AuthLDAPBindDN entry 
  AuthLDAPBindDN uid=admin,ou=system

  #check once for some incorrect password as well
  AuthLDAPBindPassword secret
  #AuthLDAPGroupAttribute uid
  #AuthLDAPGroupAttributeIsDN off

  Require valid-user
  
  #Require ldap-group ou=users,dc=sprint,dc=com
  #Require ldap-attribute gidNumber=491
  #Satisfy any  

    # short circuit path-based authorization for Subversion
    #SVNPathAuthz short_circuit
    #SVNPathAuthz off   

    #<LimitExcept GET PROPFIND OPTIONS REPORT>
        #Require valid-user
    #</LimitExcept>

        #<RequireAll>
            #Require valid-user
            <Limit HEAD GET OPTIONS PROPFIND REPORT>
                #<RequireAny>
                    # Read access
                    Require ldap-group ou=users,dc=sprint,dc=com
                #</RequireAny>
            </Limit>
            <LimitExcept HEAD GET OPTIONS PROPFIND REPORT>
                #<RequireAny>
                    # Write access
                    Require ldap-group ou=users,dc=sprint,dc=com
                #</RequireAny>                   
            </LimitExcept>
        #</RequireAll>
</Location>

<Location /repos-proxy-sync>
    DAV svn
    SVNPath /var/www/svn/repos
    Order deny,allow
    Deny from all
    Allow from ::1 127.0.0.1 pcrfclient01 installer arbiter01
</Location>