This article covers how to setup domain authentication for Subversion with Apache using mod_auth_sspi , I am running Apache 2.2 and Subversion 1.5. First of all you need to get SSPI module from its new home at sourceforge , module can be directly downloaded from here. Once you have downloaded the module extract using some zip utility there will be a bin folder inside the extracted folder and inside bin folder there will a file named mod_auth_sspi.so take this file and drop it in Apache’s modules folder.
Once you are done with above steps we now need to modify Apache’s httpd.conf to include the domain authentication for our Subversion repository make changes to httpd.conf as shown below, first we need to ensure that we have required modules loaded
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
To mod_dav_svn to work you need to uncomment the line which loads mod_dav module Apache look for it and uncomment if its commented.
Now the real magic configuration starts which will enable us to authenticate Subversion users against AD domains make changes in httpd.conf as shown below
dav svn
SVNPath “d:/svnrepos/myrepo”
# Domain Authentication settings
AuthName “Subversion domain”
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain MYDOMAINNAME
SSPIOfferBasic on
SSPIOmitDomain On
Require valid-user
# Subversion’s authorization file
AuthzSVNAccessFile “d:/svnrepos/authz”
</Location>
Once done with above changes save the file and restart Apache and try accessing the URL http://<yourservername>/svn/myrepo you will be prompted for authentication saying “Subversion Domain” enter your domain name without domain as we have SSPIOmitDomain On and based on Subversion authorization file i.e authz in our scenario you will be able to see repository or you will get forbidden error.
We are done with setting up domain authentication, in-case you face any problem with above settings feel free to write to me.
LoadModule sspi_auth_module modules/mod_auth_sspi.so LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so

