Saturday, September 20, 2008

Subversion Apache Windows Authentication and Custom Authentication

Man I cannot tell how much flexibility Subversion with Apache has to offer.One thing we wanted to do is authenticate user against Active Directory if the user has a login otherwise use a encrypted file.

Here is how the configaration of the apache httpd.conf file looks like to acheive the above.

################

DAV svn
SVNPath E:\SvnRepos
AuthName "Enter username and password"

#Authorization File that has user groups and permissions
AuthzSVNAccessFile "C:\Program Files\Apache Group\Apache2\conf\svn-auth.conf"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain mydomain
SSPIOfferBasic on
SSPIOmitDomain On


# Htpasswd Logins.
AuthType Basic
AuthAuthoritative Off

#passwd file that is generated from htpasswd tool
AuthUserFile "C:\Program Files\Apache Group\Apache2\conf\passwd"
require valid-user

Everything above is self explanatory and the above statements should be in the Location block.

No comments:

Post a Comment