<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ohjeah! &#187; apache</title>
	<atom:link href="http://www.ohjeah.net/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ohjeah.net</link>
	<description>The writings of JRO...</description>
	<lastBuildDate>Thu, 09 Jun 2011 19:07:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux Apache + Subversion + Active Directory Authentication</title>
		<link>http://www.ohjeah.net/2008/10/03/linux-apache-subversion-active-directory-authentication/</link>
		<comments>http://www.ohjeah.net/2008/10/03/linux-apache-subversion-active-directory-authentication/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 20:21:34 +0000</pubDate>
		<dc:creator>jro</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.ohjeah.net/?p=66</guid>
		<description><![CDATA[I found Subversion (svn) over HTTP to be very easy to deploy on top of our existing setup, and only took about 15 minutes.  It simplifies user management by allowing us to manage users through Active Directory, and makes it easier on staff by using URLs for access.  Here is a quick demonstration on a [...]]]></description>
			<content:encoded><![CDATA[<p>I found Subversion (svn) over HTTP to be very easy to deploy on top of our existing setup, and only took about 15 minutes.  It simplifies user management by allowing us to manage users through Active Directory, and makes it easier on staff by using URLs for access.  Here is a quick demonstration on a Fedora 9 box, assuming you have already performed a basic or default apache install.<span id="more-66"></span></p>
<p><strong>Requirements: </strong></p>
<p>Install the necessary svn packages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># yum install subversion mod_dav_svn</span></pre></div></div>

<p><strong>Configure AD:</strong></p>
<p>Create a user to bind to, this user needs no special permissions.  I used <strong>svnuser</strong> in this demonstration.</p>
<p>Create a security group, users will need to be a member of this group in order to access our repositories.  I used <strong>SVN_Access</strong> in this demonstration.</p>
<p><strong>Create Repositories:</strong></p>
<p>Create the following directories in your http root if you have not done so (/var/www on most systems):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># mkdir /var/www/svn</span>
<span style="color: #666666; font-style: italic;"># mkdir /var/www/svn/repos</span></pre></div></div>

<p>This will be the location for all of our repositories.  Now to create a repository (test in this example):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># svnadmin create /var/www/svn/repos/test</span></pre></div></div>

<p>Grant apache access to the repository:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># chown -R apache.apache /var/www/svn/repos/test</span></pre></div></div>

<p><strong>Configure Apache:</strong></p>
<p>Create an httpd/apache include file for our subversion configuration, this may have already been created for you.  Depending on your distro, you may need to integrate this directly in to your httpd.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># touch /etc/httpd/conf.d/subversion.conf</span></pre></div></div>

<p>Example subversion.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule dav_svn_module     modules<span style="color: #000000; font-weight: bold;">/</span>mod_dav_svn.so
LoadModule authz_svn_module   modules<span style="color: #000000; font-weight: bold;">/</span>mod_authz_svn.so
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Example configuration to enable HTTP access for a directory</span>
<span style="color: #666666; font-style: italic;"># containing Subversion repositories, &quot;/var/www/svn&quot;.  Each repository</span>
<span style="color: #666666; font-style: italic;"># must be readable and writable by the 'apache' user.  Note that if</span>
<span style="color: #666666; font-style: italic;"># SELinux is enabled, the repositories must be labelled with a context</span>
<span style="color: #666666; font-style: italic;"># which httpd can write to; this will happen by default for</span>
<span style="color: #666666; font-style: italic;"># directories created in /var/www.  Use &quot;restorecon -R /var/www/svn&quot;</span>
<span style="color: #666666; font-style: italic;"># to label the repositories if upgrading from a previous release.</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
   DAV <span style="color: #c20cb9; font-weight: bold;">svn</span>
   SVNParentPath <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos
   SVNListParentPath on
&nbsp;
      order allow,deny
      allow from all
      Options Indexes
      AuthzLDAPAuthoritative On
&nbsp;
      AuthName <span style="color: #ff0000;">&quot;My Repository&quot;</span>
      AuthType Basic
      AuthBasicProvider ldap
&nbsp;
      AuthLDAPBindDN svnuser<span style="color: #000000; font-weight: bold;">@</span>domain.com
      AuthLDAPBindPassword Test123
&nbsp;
      AuthLDAPURL <span style="color: #ff0000;">&quot;ldap://dc.domain.com:3268/dc=domain,dc=com?sAMAccountName?sub?(objectCategory=person)&quot;</span>
      Require ldap-group <span style="color: #007800;">CN</span>=SVN_Access,<span style="color: #007800;">OU</span>=Groups,<span style="color: #007800;">DC</span>=domain,<span style="color: #007800;">DC</span>=com
&nbsp;
      REQUIRE valid-user</pre></div></div>

<p>You should now be able to access your test repository at <a href="http://website/repos/test">http://website/repos/test</a> <img src='http://www.ohjeah.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ohjeah.net/2008/10/03/linux-apache-subversion-active-directory-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

