How to Configure LDAP Authentication for Subversion on CentOS 5.5

Share this Article :

In this post, i will show you on how to configure your existing subversion with LDAP authentication. This guideline assume that you are already configure the Apache and subversion with htpasswd user. 389 LDAP has been installed but not yet configure in your subversion configuration file.

Prerequisite :
a)How to Install Apache Httpd Web Server on Linux
b)How to Install Subversion 1.6.16 on CentOS 5.5 Server
c)How to Install 389 Directory Server on CentOS/RHEL

Also Read :   How to Install and Configure Samba SWAT on CentOS 5.5

Steps:
1. Locate and open subversion.conf using vi editor

    [[email protected] ~]# vi /etc/httpd/conf.d/subversion.conf
    

2. Modify the existing subversion.conf to below:

    # Needed to do Subversion Apache server.
    LoadModule dav_svn_module     modules/mod_dav_svn.so
    
    # Only needed if you decide to do "per-directory" access control.
    LoadModule authz_svn_module   modules/mod_authz_svn.so
    
    #
    # Example location directive.
    #
    
    <Location /svn/repos>
            DAV svn
            SVNParentPath /svn/repos
            AuthBasicProvider ldap
            AuthType Basic
            AuthzLDAPAuthoritative on
            AuthName "My Subversion server"
            AuthLDAPURL "ldap://ldap.intranet.local:389/DC=intranet,DC=local?uid?sub?(objectClass=*)" NONE
            AuthzSVNAccessFile /svn/permissions/svnaccess
            Require valid-user
    </Location>
    

3. Save configuration file and restart the apache server.

    [[email protected] ~]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    


One Response

  1. Ashish Shinde

Leave a Reply