Thursday, July 21, 2011

SVN path based authorization with LDAP authuntication

We can use LDAP for authentication and "AuthzSVNAccessFile" directive with config file for authorizing.

Configuration as follows



#----------------Apache Config ------------------------#

< Location /repo >
DAV svn
SSLRequireSSL
SVNPath /path/to/repo/
SVNListParentPath On
SVNAutoversioning On
SVNReposName "User Repo"
SVNPathAuthz off
AuthBasicProvider ldap
AuthBasicAuthoritative on
AuthzLDAPAuthoritative off
AuthType Basic
AuthName "User Login"
AuthLDAPBindDN ""
AuthLDAPBindPassword password
AuthLDAPURL ""
AuthzSVNAccessFile /etc/apache2/svnaccess.conf
Satisfy All
Require valid-user

< /Location >


#--------------------svnaccess.conf file -----------------------

[group]
admin = user1, user2

[repo:/]
* = rw

[repo:/path/to/directory]
* = r

No comments:

Post a Comment