Adminguide
Adminguide
© 2009 WANdisco
Revision History
REVISION DATE
1.0 October 2008
This material is confidential to WANdisco and may not be disclosed in whole or in part
to any third party nor used in any manner whatsoever other than for the purposes
expressly consented to by WANdisco in writing.
This material is also copyright protected and may not be reproduced, stored in a
retrieval system or transmitted in any form or by any means in whole or in part without
the express written consent of WANdisco.
© 2009 WANdisco
Contents
Contents, cont’d
4 Using the Admin Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1 Starting the Admin Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 The Security Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 The System Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4 The Proxy Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.5 The Reports Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5 About Users, Roles and Groups . . . . . . . . . . . . . . . . . . . . . . . 26
5.1 Managing Roles and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.1 Special Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.1.2 Creating New Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.1.3 Editing Existing Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.1.4 Deleting Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Managing Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.2.1 Creating New Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.2.1.1 Defining Group Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.2.2 Creating a Sub-Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.2.3 Deleting a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.2.4 Assigning Users to a Group . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.2.5 Deleting Users from a Group . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.6 Who Is In a Group? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.7 Importing Existing Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3 Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3.1 Creating or Removing Users . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3.2 Assigning Users to a Sub-Group . . . . . . . . . . . . . . . . . . . . . 36
5.3.3 Listing and Searching for Users . . . . . . . . . . . . . . . . . . . . . . . 37
5.3.4 Importing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3.4.1 Having Subversion Users Change Their Passwords . . . . 38
6 About Access Control Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.1 How WANdisco Enforces Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Toggling the ACL Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.3 Creating ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.4 Toggling the Use of Access Control Lists . . . . . . . . . . . . . . . . . . . . 42
Contents, cont’d
7 About Audit Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.1 Configuring Audit Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.2 Importing Audit Records to an SQL Database . . . . . . . . . . . . . . . . . 44
7.3 Running a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3.1 Report Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3.1.1 The User Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.3.1.2 The Transaction History Report . . . . . . . . . . . . . . . . . . . . 47
7.3.1.3 The Access Violation Report . . . . . . . . . . . . . . . . . . . . . . 48
7.3.1.4 The File Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8 Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.1 Preventing Subversion Users From Making Transactions . . . . . . . . 49
8.2 Changing the prefs.xml File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.3 Verifying That Access Control is Working . . . . . . . . . . . . . . . . . . . . . 50
8.4 Installing a .jar File Patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.5 Setting WANdisco to Start Up on System Boot . . . . . . . . . . . . . . . . 52
8.6 Setting WANdisco Up as a Windows Service . . . . . . . . . . . . . . . . . . 53
8.7 Changing SVN Port on Unix Flavor . . . . . . . . . . . . . . . . . . . . . . . . . 54
9 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
9.1 How Do I Get WANdisco Support? . . . . . . . . . . . . . . . . . . . . . . . . . . 55
9.2 Apache and SVNKit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
9.2.1 SVNKit and Connection Pooling . . . . . . . . . . . . . . . . . . . . . . 55
9.2.2 Tuning Values to Optimize Your Configuration . . . . . . . . . . . 55
9.3 Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
9.3.1 Missing License Key File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
9.3.2 Client could not read status line: Server Closed Connection . 57
10 Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . 58
10.1 Why Are So Many Java Processes Running? . . . . . . . . . . . . . . . . . 58
10.2 Can I Store Logs or Content on NFS? . . . . . . . . . . . . . . . . . . . . . . . 58
10.3 Why is Set Up Configuring IP Addresses as 0.0.0.0? . . . . . . . . . . . 58
10.4 WANdisco Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
10.5 Apache 2.2 with SVNDAV on Windows . . . . . . . . . . . . . . . . . . . . . . 59
10.6 Setting Up Apache for SVN-DAV . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Subversion Access Control Administration Guide, Rev. 1© 2008 WANdisco iii
Contents
Contents, cont’d
10.7 Encryption Around WANdisco Protocol . . . . . . . . . . . . . . . . . . . . . . 62
10.8 How Do I Restrict Direct Access to My Repository? . . . . . . . . . . . . . 62
10.9 About WANdisco Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Appendix A - Installing Java and Perl ..................................... A - 1
Welcome to the WANdisco world of security. WANdisco Access Control for Subversion allows
Subversion users to transparently connect to a Subversion repository through a network proxy
acting as a security agent. Subversion users connect to WANdisco on the standard Subversion
port 80. WANdisco Access Control in turn connects to the underlying Subversion server through
port 81. Subversion users never directly access the repository. WANdisco Access Control
enables you to implement comprehensive security features, including:
Introduction 6/17/09 1
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
WANdisco provides the Admin Console, a web-based user interface, to administer and monitor
the replication group.
Admin serves as a privilege, a role, and a group. It is meant for a System Administrator who has
no restrictions. Do not create ACLs for an Admin user.
Introduction 6/17/09 2
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The group level defines a user’s access to the resources. With this structure, you can have multi-
ple projects with complex resource definitions, allowing users to perform tasks associated with
their roles’ permissions on those resources.
For example, you create two users: Mary, who has the developer role, and Bob, who has the QA
role. Next, you create a group named project1 and specify which Subversion directories the
group has access to (you define the resources). So Mary is allowed to perform write operations
and Bob is allowed to perform read and copy operations on those directories.
NOTE:
Any user you add to Access Control must already exist in the authentication database
used by the Subversion server. WANdisco offers an import tool to do some external SQL
verifying of user lists, but it is up to the Access Control administrator to control the validity
of the users.
For some customers, roles and groups provide enough control. However, you can further refine
the granularity of control for the roles, groups and resources by creating Access Control Lists
(ACLs), also called rules.
For example, in the group project1, if you don’t want Mary to have access to one sub-directory in
the resources you have defined, you must create an ACL to prohibit her write privilege to that
sub-directory.
You can create as many ACLs as you need, however you should have a comprehensive plan to
avoid creating conflicting ACLs.
1.1.3 Reports
Access Control offers two reports, Users and Groups. You may want to perform more in depth
audits of the ACLs. This requires importing Access Control information into an SQL database.
WANdisco offers an import tool that automatically creates the table schema in that database. The
import tool uses standard SQL syntax, and makes use of the system function FROM_UNIXTIME.
Please ensure your database version supports it. MySQL and Microsoft SQLServer both support
the FROM_UNIXTIME function.
Introduction 6/17/09 3
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The general sequence for implementing Access Control is listed below. It is a fairly simple pro-
cess. Setting up any ACLs can be the most complicated.
With the Perl regular expression syntax, if you need to use the '.' (dot) character literally, you
need to escape it with a backslash, otherwise '.' (dot) matches any character. To learn more
about regular expressions, read this tutorial.
For example, to allow any user with an IP address that begins with 192.168, enter the value:
192\.168.*. Note that the period character must be prefixed by a backslash. With regular
expressions, the period character is used to represent a character that can have any value.
Introduction 6/17/09 4
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
1.2 Terms
You should familiarize yourself with these terms.
TERM DEFINITION
Introduction 6/17/09 5
© 2009 WANdisco
2 Recommended Deployment Practices
Please read and follow these requisites to ensure a successful installation and use of Access
Control.
If you don't meet the above pre-requisites, you may want to contact your Subversion administra-
tor or request that WANdisco perform a professional install for you.
Subversion and Access Control running on the same server (so that WAN-
disco can control user password files)
a running pre-configured server with
a command line zip/unzip utility
Java (see Appendix A - Installing Java and Perl)
Perl (see Appendix A - Installing Java and Perl)
browser with network access
e-mail from WANdisco containing the tar file link and attached production
licence key file
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
During installation, you identify the Subversion password file’s location, and WANdisco incorpo-
rates it into Access Control. You can also choose to bulk import your Subversion users into WAN-
disco, however this resets user passwords to their email addresses.
If you do elect to have WANdisco control the Subversion password files, all users must be
entered into WANdisco. Note that for DAV, WANdisco does not handle user authentication, it just
acts as a proxy between users and Subversion.
2.4.1 Firewalls
You must determine if WANdisco sits inside a firewall or outside of one. If WANdisco sits inside a
firewall, it is untouched by the firewall and you need take no action.
However, if WANdisco sits outside a firewall, you must configure the firewall so that the port num-
bers you specify during installation are not blocked or filtered.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
System Setup All sites must share the same operating system
Subversion Server Version 1.3 and above. If you are using Subversion 1.5.4, use version 1.3.0 of
Apache Portable Runtime.
System Memory Ensure RAM and swapping containers are at least three or four times
the largest Subversion file you have.
Recommended: 1 GB RAM; 2 GB swapping container
File Descriptor limit Ensure hard and soft limits are set to 64000 or higher. Check with the
ulimit or limit command.
Journaling File System Replicator logs should be on a journaling file system, for example, ext3
on Linux or VXFS from Veritas. Notes: NTFS is not a journaling file sys-
tem: ext4 is a journaling file system, however WANdisco does not sup-
port its use because of its deferred writes.
Maximum User Process At least three times the number of Subversion users.
Limit
Java Install JDK 1.5.0. Note: There should not be any spaces or control
characters in the path where Java is installed. For example, c:\Program
Files\java does not work with WANdisco as a JAVA install directory.
See Appendix A - Installing Java and Perl.
Perl Install version 5.6.1 or later. See Appendix A - Installing Java and Perl.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Network Setup
Reserved Ports (i.e. 6444, Subversion Access Control needs a dedicated port for DConENet (rep-
another for sychronizing) lication protocol) as well as HTTP protocol (for the Admin Console).
WANdisco also recomends having a port available in case you have to
copy (rsync) the repository from one site to another. If your network has
a firewall, notify the firewall of the port numbers.
Firewall and virus scanner Notify the firewall and any virus scanners of the Subversion Access
Control port numbers.
Persistent Connection Keep Ensure VPN doesn't reset persistent connections for WANdisco, or else
Alive ensure there are no RST bugs
DNS Setup Best to use IP address for WANdisco related hostnames, or else
ensure DNS availability
WANdisco Setup
Reader/Writer Network IO Tune based on Subversion client connection rate, file transfer rate
Thread Pool
Maximum connections per Tune if active Subversion user population is large (greater than 100)
IO thread
Disk space for recovery jour- Provision large disk for logs/tmp, at least number of commits within a
nal two to four hour window
Reader/Writer Network IO Tune based on client connection rate, file transfer rate
Thread Pool
Admin Email Address To generate email notifications from Access Control. Requires /usr/
sbin/sendmail.
Notify all users that they must flush their client cache.
Apache version All sites have the same version, 2.2.3 and above.
Apache modules version All sites have the same version of mod_dav and mod_svn_dav
Require valid user for write Ensure that all WebDAV methods require authentication for SVN-DAV
methods protocol
Using port 80 for WANdisco Std Port 80 avoids confusion, change default Apache port if using 80
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Apache server port Non-standard Apache server port to avoid conflict with replicator port?
Step 1 Change Apache's connection keep-alive settings to allow long lived HTTP
connections. Add this to the Apache configuration file conf/httpd.conf
or included conf/extra/httpd-defaults.conf. For instance,
$ vi conf/httpd.conf
...
# Various default settings
Include conf/extra/httpd-default.conf
...
$ vi conf/extra/httpd-default.conf
...
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300000
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection).
#
KeepAlive On
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
#
MaxKeepAliveRequests 0
#
# KeepAliveTimeout: Number of seconds to wait for the next request from
the
# same client on the same connection.
#
KeepAliveTimeout 500000
...
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 2 Ensure the SVN DAV settings in Apache's configuration files are exactly
the same at all sites. The top level location URI prefix should be the same.
We recommend copying the current conf file and, then changing the
host:port settings. For instance, here is a conf file snippet with Apache vir-
tual hosts (Note: you do not have to use Apache virtual hosts, this is only
an illustration):
# Site A
$ cat conf/extra/httpd-svn-dav.conf
...
NameVirtualHost site-a:8181
<VirtualHost site-a:8181>
<Location /dir0>
DAV svn
SVNPath /home/site-a/svnroot
AuthType Basic
AuthName wandisco
AuthUserFile /home/site-a/apache2/dist/conf/htpasswd
Require valid-user
</Location>
</VirtualHost>
...
# Site B
$ cat conf/extra/httpd-svn-dav.conf
...
NameVirtualHost site-b:9191
<VirtualHost site-b:9191>
<Location /dir0>
DAV svn
SVNPath /home/site-b/svnroot
AuthType Basic
AuthName wandisco
AuthUserFile /home/site-b/apache2/dist/conf/htpasswd
Require valid-user
</Location>
</VirtualHost>
...
Step 3 The Apache user-names and passwords should match at all sites. Subver-
sion Access Control’s license manager requires a valid username inside
the HTTP authorization header to be passed for all DAV commands. This
typically means ensuring a Require valid-user line is specified in the
Apache SVN DAV configuration section.
© 2009 WANdisco
3 Installation
Step 3 Copy the licence evaluation key file to the config folder in the svn-secu-
rity folder.
Step 5 Type
perl setup
Step 6 Copy the URL returned in the last step and paste it into a browser. The
WANdisco Welcome page appears.
Installation 6/17/09 12
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 8 Read the User Licence Agreement. You must agree to the terms to con-
tinue.
Step 9 The Current Configuration page appears. After reading it, click Next.
Step 11 The illustration shows how WANdisco becomes the default Subversion
port, and you will assign a different port for the Subversion server. Click
Next.
Installation 6/17/09 13
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 12 In the Display Name field, enter a name for the Access Control proxy.
Step 13 In the Proxy Port field, enter a port number. WANdisco recommends using
80 as the port number if you are using Apache/HTTP.
Step 14 In the Admin Console port field, the port number 6444 is reserved for
WANdisco.
Installation 6/17/09 14
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 18 In the Subversion Host field, enter a name. If you answered Yes, WAN-
disco and Subversion are on the same server, you can use localhost as
the name.
If you answered no, you must provide the IP of the Subversion host.
Step 20 In the Subversion Port number, enter in a different number than you speci-
fied in Step 13. For WebDAV, WANdisco recommends 8080.
Step 22 If you have SVN and WANdisco on the same server, and you want WAN-
disco to manage the SVN password file, browse to the location of the SVN
password file.
3.1.3 Checklist
Installation 6/17/09 15
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 24 Read over each item, and check each checkbox. You must be logged in to
the WANdisco support site for the links to work.
Step 26 Click Restart with these settings. The installer configures and restarts
your machine.
Step 27 Log in with the username and password you specified in step 16.
You are now ready to set up Access Control with users, roles and groups.
Installation 6/17/09 16
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The installer creates a directory called svn-security that has these directories inside.
DIRECTORY CONTENTS
audit Contains
lib Contains the jar files and DLLs that are required to run the product.
logs Contains the pid file, log files and other temporary files. Access Control's
log file is named SVNProxyServer-prefs.log.0.
systemdb Contains the system database with its transaction journal. Warning:
Deleting or modifying files from systemdb will likely corrupt your installa-
tion.
This procedure involves taking Subversion offline. Please follow your company proce-
dures about notifying Subversion users of down time.
Step 1 After notifying Subversion users of the downtime, stop Access Control. On
the Proxy page, select Stop Proxy.
Step 2 On the System page, select Export Settings. This is the ACLs, and user
and group information.
Step 3 Stop WANdisco Access Control. On the Proxy page, select Shut Down
Node.
Installation 6/17/09 17
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
config
systemdb
membership
security
passwd
md5sum
Step 11 Copy the licence evaluation key file to the config folder in the svn-secu-
rity folder.
Step 12 Run this command on the original install site. The install program automat-
ically populates all previous configuration information.
svn-security/bin/setup
Installation 6/17/09 18
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 15 Import WANdisco data. On the System page, select Import Settings.
Import the file you exported in step 2.
Step 16 Ensure Access Control is active. Go to the Proxy page and verify that the
value for the listening field is yes.
Installation 6/17/09 19
© 2009 WANdisco
4 Using the Admin Console
The Admin Console is a simple interface that allows you to configure Access Control.
This chapter describes how to use the two Access Control pages and lists the commands on
each. For information on how to set up users, roles, groups and ACLs, see the next two chapters,
About Users, Roles and Groups and About Access Control Lists.
Access Control’s Admin Console has four pages, identified by their tabs: the Security, System,
Proxy and Reports pages.
WANdisco version
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Password fields appear for users only if you chose to have WANdisco control the Subver-
sion password file during installation. For DAV, WANdisco does not handle the user
authentication.
Role Administration
Create Role Create new roles and assign them privileges. Subversion per-
missions are: list, read, prewrite, write, delete, copy, admin. For
a complete discussion of roles and permissions, see Chapter 5,
About Users, Roles and Groups.
List Roles Display all roles: default and any you create. Privileges are also
displayed. To delete a role, check any role’s checkbox and click
Delete Selected.
User Administration
Create User Create any Subversion user.
Username Enter in the Subversion user’s username.
Password Enter the user’s password.
Confirm Password Confirm the password.
First Name Enter the user’s first name.
Last Name Enter the user’s last name.
Email Enter the users email address.
Default Role Give the user a default role.
Group Assignment If desired, assign the user to an existing group.
List Users This command displays all users.
Import Users You can import an existing list of users. The import file must be
a comma delimited text file, of the format username,last-
name,firstname,email[,group1[,group2,...groupN]].
Change Admin Password You can change the WANdisco Admin password with this com-
mand.
Group Administration
Create Group
Name Required field. You must name the group.
Description Enter in a description for the group.
Client IP Pattern Optional. You can allow certain IP patterns. Use regular
expressions. If you do use this option, no other client IPs are
allowed without specific ACLs.
Rule
File / Dir Pattern Browse to the file or directory pattern for this group, and specify
either Allow or Deny. Use regular expressions.
add allow identify any files and directories that this group has access to
add deny identify any files and directories that this group does not have
access to
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Create Group Select this command once you have defined a group.
List Group This command shows all the groups. You can list all users in
each group.
Assign Users This command allows you to assign users to groups. If a user is
already in a group, his or her name does not appear in the list
of available users.
Remove Users Use this command to remove users from a group.
Import Groups You can import a list of existing groups. The import file must be
a comma delimited text file, of the format groupname,parent-
name[,description]. If there is no parent name, specify
null.
ACL Administration This menu item can be toggled. See 6.2, Toggling the ACL Dis-
play.
Create ACL Create an ACL with this command. Create more than one at a
time, use List ACLs. For a complete discussion on ACLs, see
Chapter 6, About Access Control Lists.
User / Group Specify the user or group for this ACL.
Rule Specify allow or deny.
Privilege Identify a privilege for this ACL.
Operate On Specify if this ACL operates on a single user or the group.
IP Pattern Optional. You can identify an IP pattern for this ACL. If you do
identify an IP pattern, all other IPs are excluded, unless you
create an allow ACL for a specific IP address.
File / Dir Pattern Identify the file or directory pattern for this ACL.
Create ACL Select this command to create the ACL.
List ACLs This command lists all existing ACLs. You can create, edit or
delete ACLs with this command. Use this command when cre-
ating multiple ACLs.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Status
Proxy Status
Node Name This displays the node name.
SVN Client Port This displays the SVN Client Port.
SVN Server This displays the SVN Server name.
listening This signifies whether WANdisco is listening to Subversion cli-
ent transactions.
WANdisco Install This is the WANdisco installation directory.
Web DAV Version This gives the web DAV version specified on installation.
SVN Password File This gives the path to the password file specified on installa-
tion.
GUID This is WANdisco’s identification for the server WANdisco runs
on.
Log Viewer Provides access to the same logs discussed in Log Viewer on
the System page.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Node
Start Proxy This command starts Access Control.
Stop Proxy This command stops Access Control.
SVN Settings These fields are blank until WANdisco needs to know further
information about your Subversion implementation. A WAN-
disco message informs you when to fill in the fields.
Shut Down Node This command shuts down the Access Control server. To
restart Access Control, at the command line, go to
svn-security/bin/ and type svnsecurityagent.
Reporting
Configure URI Refer to Chapter 7, About Audit Reports.
User Group Report Generate these reports, and view them with Log Viewer in the
System and Proxy tabs.
Audit Reports Refer to Chapter 7, About Audit Reports.
© 2009 WANdisco
5 About Users, Roles and Groups
This chapter provides information on setting up users, roles and groups for Access Control. Most
customers find that managing users’ roles and groups offer enough access control. However, you
can further refine Access Control with specific Access Control Lists, discussed in Chapter 6,
About Access Control Lists.
Access Control initially does not allow any user access to any resource. By default, all users are
denied. This is essential for security: it closes the window of vulnerability that would allow every-
one full access between the time WANdisco is first installed and the time it takes an administrator
to create access rules. In order to grant access, the administrator has to explicitly create roles,
groups (which define resources) and users.
You should be familiar with the Admin Console, described in Chapter 4, Using the Admin Con-
sole.
Resources assigned to subgroups are given to users who are members of parent groups
because the users are automatically members of the subgroup. So, membership goes down the
tree and inheritance, as a result, goes up.
list
read
prewrite
write
delete
copy
admin
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The following table offers a mapping of actual Subversion commands to the minimum permission
needed to execute them.
Access Control comes with a few default roles with existing permissions. You can modify these
roles as you wish. You can also create new roles. The permissions are inherited, meaning if a
role has the write privilege, it also has the list and read permissions as well.
The roles work with groups, which you defined as files or directories. So the roles are applied
within the groups (the defined files or directories).
Audit list
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The List Roles command, under Role Administration, shows all roles: the default roles and any
you have created. The permissions for the roles are also listed.
NOTE:
Admin serves as a permission, a role and a group. The Admin privilege has no con-
straints on it whatsoever. An admin has full permission to everything in the repository.
It is designed to be used for a System Administrator.
If you assign a user the Admin role, or give a user Admin privileges, or put a user in the
Admin group, that user has full access to everything in the repository. Do not make any
ACLs for anyone with Admin role, privilege, or group. If you need to exclude a user from
certain files, assign that user another role without any use of the Admin privilege, role or
group.
Special consideration should apply for list and read access rules. Unlike write operations, the
read and list operations can traverse directory hierarchy. Therefore it makes sense to always
allow/deny read and list privileges on all files under a directory. This can be done by specifying a
wild-card pattern, for example: allow read from /svnroot/trunk/module1|/svnroot/
trunk/module1/.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
In the Security tab, select Create Role. Enter a name for the role and select the Subversion per-
missions you would like this role to have. Any user you assign to this role has the permissions
you specify for this role.
Select List Roles: the defined roles display. Select the name of the role you wish to edit. The Edit
Role page displays, listing all possible privileges. The role’s existing privileges are checked.
Make any changes, and click Update Role. Any user assigned to that role, both for current and
future assignments, has these same privileges.
Select List Roles. Use the checkboxes to mark the roles for deletion. Select Delete Selected.
The role is deleted throughout Access Control, even if users are assigned to that role.
WARNING:
Think carefully when deleting roles. If you delete a role, make sure no user is assigned to
that role before you delete it.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
You can create and delete groups, associate files, directories and modules to a group, add to and
remove users from a group, and perform bulk imports of existing groups. You can also restrict
access to a group by client IP address.
Groups are hierarchical, with a parent-child association between a group and a sub-group.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
To add a new group, select Create Group. The Group Properties page appears.
The name can contain any character, including white space, except the underscore character.
The group name is the primary key into the group database, therefore it cannot be changed once
it is created. Enter relevant text in the description field. Access Control automatically tracks the
creation and modification time on the groups, which you can see in groups-reports.txt in Log
Viewer.
You can optionally create this group for a specific client IP pattern. If you do enter an IP pattern in
the Client IP Pattern field, no other client IPs are allowed unless you create specific ACLs for
those other client IP addresses. You must use regular expressions.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
The Rule section allows you to define the files and directories for this group. Select add allow or
add deny, and browse to the file or directory. You can identify a file or directory, and use the radio
buttons to check either Recursively or Single directory only.
Add as many entires as necessary for this group, ensuring that all allows and denies for all files
and directories are accounted for.
Step 3 Click Edit for the sub-group. The Group Properties page appears.
Step 4 In the Group Assignment section, check the radio button of the sub-
group’s parent.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
When you delete a group, the association between the group and any users who belonged to
that group is broken. The associations between any sub-groups and users are also deleted.
If you want to keep a sub-group, first select a new parent for that sub-group, and then delete the
old parent group. The sub-group then does not get deleted.
Select a group on the left. The list of users on the right updates to reflect potential new members
for the group you selected. Users already in the group are excluded from the Users list.
If a user belongs to a parent group, they automatically belong to any sub-groups underneath it,
even though the list does not reflect that. However, a user can belong to a sub-group and not
belong to the parent group.
Select the users to add to the group. To add several users at once, hold down the Control key
while you click on your selections.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Select a group on the left. The list of users on the right updates to reflect that group’s users.
Select the users to remove from the group. To remove many users at once, hold down the Con-
trol key while you click on your selections. Click Remove Users.
If a user belongs to a parent group, they automatically belong to any sub-groups underneath it;
however, the screen does not reflect this. If a user is removed from a parent group, they are also
removed from any sub-groups.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
To view a list of which users belong to which groups, click List Groups.
All the groups are displayed. Click List Users. All the users in that group are displayed.
To view users who are explicitly members of this sub-group and those members inherited from
any parent groups, check the Show Inherited checkbox. Use the Group drop-down list to view
the users belonging to another group.
The userids are linked to the User Properties page, in case you need to edit a user. You can also
edit and delete groups from this page.
You may have groups already set up outside Access Control. If so, you can import them using the
Import Groups command, in a comma separated text file, of the format groupname,parent-
name<,description>.
Type in the pathname to the file, and click Import. The new groups are added to the existing
groups. Define the resources for this group or subgroup, and assign users.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
On installation, if you selected to have WANdisco control the Subversion password file, any user
you enter can use Subversion.
If WANdisco is not managing the Subversion password file, and is entered in WANdisco but has
not been registered in Subversion, and he or she tries to access Subversion, they would see an
Access Denied error message in their client.
You can check if WANdisco is managing the password file by looking at the SVN Password file
value on the Proxy tab. If a path is listed, WANdisco is managing the password file. Otherwise,
you see a not managed by WANdisco message.
If you selected the wrong choice during installation, you can still have WANdisco manage the
password file. In prefs.xml, change false to true, and specify the absolute pathname to pass-
word file. See the procedure 8.2, Changing the prefs.xml File.
<SVNProxy>
...
<svnautoupdate>true</svnautoupdate>
<svnpasswdfile><C:\svn-repository\dav-auth</svnpasswdfile>
...
</SVNProxy>
To add a new user, click on Create User in the Security tab and specify a (Subversion) user-
name. You can optionally specify an email address for the user. A default role is required to
define the user's privileges. You can assign the user to groups here, or through the Group Admin-
istration commands.
To remove users, click List Users. Select the users you want to delete with the checkbox on the
left and click Delete Selected.
You can assign a user to any number of groups with the Assign Users command. Note by
selecting a group, the user is automatically assigned to the group and all its sub-groups. To un-
assign, check the checkbox and click Save Details.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
To get a list of all the registered users, click on the List Users command. The User List page
shows all users by default. The page size is set to show 25 users per page, but you can change
that by selecting View Per Page on top of the user list. Arrows at the right corner allow you to
page to the next or previous page. Use the Search box: start typing a user’s first or last name,
and an incremental search starts. Return to the full list by clearing the Search box.
All the columns in the user list are enabled for sorting. Clicking on the column header lets you
sort in ascending or descending order. The sortable columns include: Userid, last name, first
name, email, and role.
To restrict the list by group, select a group name from the Group drop-down list. To see users in
the selected group, as well as all the ancestor groups, check the Show Inherited checkbox.
You can click on the user id hyper link to edit the user. You can also delete as many users as you
like. Delete all users by checking the checkbox in the table header, and then click the Delete
Selected button.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
You can import an existing list of users with the Import Users command. The import file must be
a comma delimited text file, of the format username,lastname,first-
name,email[,group1[,group2,...groupN]].
If WANdisco is controlling the Subversion password file, user passwords are changed to their
email addresses. WANdisco recommends notifying users to change their Subversion password,
as described in the next section.
Users can change Subversion passwords in WANdisco without logging in to WANdisco. Have the
users go to
http://localhost:6444/
The Admin Console appears. Have the users click on Change User Password.
The Change Password box appears. Users can enter their Subversion username, and their pass-
word (which is now their email address). Have them enter a new password and confirm it, then
click Change Password. The users have successfully changed their passwords.
© 2009 WANdisco
6 About Access Control Lists
Most people find that managing users’ roles and groups offer enough access control. However,
Access Control allows you to have very specific control of users through the use of Access Con-
trol Lists (ACLs).
First, the ACL engine checks if a user is registered or licensed in the WANdisco user database. If
the user is not registered or licensed, the user is denied access.
In order for a rule to be matched, the ACL engine verifies that a user's name or the group(s) a
user belongs to, IP address and file/directory matches the patterns specified in the ACLs.
WANdisco allows you to atomatically edit multiple rules. When you submit changes to ACLs,
WANdisco guarantees either all the rules are updated or none at all.
When setting up a rule on a specific directory, note that the directory name is treated as a regular
expression pattern. For example, if you want to allow write access to all the files under a directory
/svnroot/trunk/docs, you need to specify one of the following patterns:
/svnroot/trunk/docs|/svnroot/trunk/docs/.*
or
/svnroot/trunk/docs.*
© 2008 WANdisco
About Access Control Lists
The first pattern allows write into the directory (to create new files or directories) as well as all
files under the .../docs/ subdirectory. The second pattern allows access to all files and subdi-
recties that match /svnroot/trunk/docs, including, /svnroot/trunk/docs, /svnroot/
trunk/docsmaker, /svnroot/trunk/docs2, etc.
Special considerations should apply for list and read access rules. Unlike write operations, the
read and list operations can traverse directory hierarchy. Therefore it makes sense to always
allow or deny read and list privileges on all files under a directory. This can be done by specifying
a wild-card pattern, for example:
To use the copy privilege, specify it on the source directory. It allows a user to copy from a given
directory. Make sure you enable the write privilege on the parent directory of the intended desti-
nation. Granting write privilege does not imply the user has delete or copy privilege. This allows
the administrator to control who can create tags or branches and who can delete version con-
trolled files. For example, to allow copy from /trunk to /tags/rel1, you create two access
rules:
Go to the System page, and click System Config. Select the Yes or No radio button for Show
ACLs?
© 2009 WANdisco
About Access Control Lists
When toggled on, you see any ACLs created by roles and groups listed on the Group Properties
page, shown in the next illustration.
© 2009 WANdisco
About Access Control Lists
Toggling the ACL display also displays the available ACL Administration commands in the Secu-
rity tab.
<Security>
<AccessControl>
<Enable>true</Enable>
<Replicate>true</Replicate>
<ClientTimeout>15s</ClientTimeout>
</AccessControl>
</Security>
By default, Access Control has access control enabled. To turn it off, add the lines to prefs.xml
and set Enable to false.
© 2009 WANdisco
7 About Audit Reports
Access Control logs any Subversion user access (allowed or denied) in an audit trail file. To
ensure no audit records are lost, schedule a job (using cron, for example) to import the audit
records into an SQL database periodically. Inserting the audit records in an SQL database also
allows you to make complex SQL queries against the audit database.
The audit-trail.0 file is located in the svn-security/audit directory. The file has a complete
history of all Subversion actions, listed in the following format:
# Column syntax -
# 0 seq | 1 time | 2 txid | 3 cmd | 4 user | 5 ipaddress | 6 access |
# 7 dir | 8 file | 9 rev
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
<Audit>
<MaxFileSize>10485760</MaxFileSize>
<MaxFileCount>10</MaxFileCount>
<Disable>false</Disable> <!-- this is the default -->
</Audit>
By default, Access Control automatically rotates the files up to 10 times when they get to 10
megabytes. You can change these defaults in the prefs.xml file. The MaxFileSize element
specifies a size in bytes, and the MaxFileCount element specifies how many files to rotate
before recycling the files.
To create audit files in a different directory, create a symbolic link (svn-security/audit) to another
directory.
NOTE:
You do not want to loose any audit history. Make sure that any interval you schedule to
import the files into a database is short enough (not longer) so that all files in the MaxFi-
leCount element are captured (and not overwritten).
The import tool requires Perl::DBI module to be installed. Please run svn-security/bin/
checkdbi to verify that the module is installed, and the correct database driver is available on
your system.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
NOTE:
Before using import, you must create a database (default name is wd_audit_db) on the
database server.
The import tool automatically creates the table schema in that database, the first time it runs. The
import tool uses standard SQL syntax, and makes use of a system function FROM_UNIXTIME.
Please ensure your database version supports it. MySQL and Microsoft SQLServer both support
this function.
Step 3 Add the following to your apache httpd.conf file. Make sure to replace
/home/wandisco/reports with your installation directory. You may also
want to rename the /reports/ alias (e.g. /wandisco_reports).
apachectl restart
or
apache2ctl restart
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Step 6 Point your browser to the alias directory to verify the installation. In the
above example the URL would be: http://server/reports.
Step 2 Enter the criteria for the report. For example, select a user from the drop-
down, specify an access level or a Subversion command to filter the
results. Note: use % for wildcards.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
© 2009 WANdisco
8 Procedures
This procedure involves taking Subversion offline. Please follow your company proce-
dures about notifying Subversion users of down time.
Step 1 After notifying your users of the downtime, navigate to the Proxy tab.
Step 3 Verify Access Control is shut down. On the Proxy tab, the value for the
listening field should be no.
Step 4 Stop Access Control. Go to the Proxy tab, and select Shut Down Node.
svn-security/bin/svnsecurityagent
© 2009 WANdisco
Procedures
© 2009 WANdisco
Procedures
NOTE:
Step 3 Move the existing jar file to a back up directory. (All jar files in the /lib
directories are in the WANdisco CLASSPATH.)
Step 4 Stop Access Control. See 8.1, Preventing Subversion Users From Making
Transactions.
Step 7 Confirm the upgrade by checking the lower right corner of Admin Console
for the newer version, and check the log file under svn-security/logs
for the start header with the new version.
© 2009 WANdisco
Procedures
#!/sbin/runscript
#
# Gentoo Linux dist compatible rc script for
# starting/stoppping svnsecurity
#
# Copyright WANdisco
#
REP_HOME="/home/admin0/svn-security"
REP_OPTS="-wdog -email [email protected]"
export JAVA_HOME="/export/share/apps/jdks/1.5.0"
USER="admin0"
pidfile="my.pid"
depend() {
need net
}
checkconfig() {
if [ ! -f $REP_HOME/bin/svnsecurity ]; then
eerror "No ${REP_HOME}/bin/svnsecurity present"
return 1
fi
prog=$"svnsecurity"
}
start() {
checkconfig || return 1
ebegin "Starting $prog:"
ulimit -S -c 0 >/dev/null 2>&1
ulimit -n 65000 >/dev/null 2>&1
RETVAL=0
start-stop-daemon --start --quiet -u ${USER} --chuid ${USER} --exec
${REP_HOME}/bin/svnsecurity -- ${REP_OPTS}
RETVAL=$?
© 2009 WANdisco
Procedures
stop() {
checkconfig || return 1
ebegin "Shutting down $prog:"
su ${USER} -c \"${REP_HOME}/bin/shutdown\" >/dev/null 2>&1
start-stop-daemon --stop --quiet -u ${USER} --pidfile ${REP_HOME}/logs/
${pidfile}
RETVAL=$?
if [ "$RETVAL" -gt 0 ]; then
eend $RETVAL "Failed to shutdown svnsecurity"
return $RETVAL
fi
eend $RETVAL
}
Substitute the path for Perl in your environment, and give a different path to the Subversion secu-
rity perl script, depending on where that was installed. You may want to also set type= share.
The MicroSoft knowledge base article (http://support.microsoft.com/kb/251192) indicates that
that is the default, but the sc.exe help for create indicates that type= own is the default. Note
that there is a space between the equals sign, =, and the parameter’s value.
The Services Control Panel indicates that the service has not started, because our Perl script is
currently not exiting because the watchdog is running to restart WANdisco. This is actually fine,
because the Perl script really takes over.
© 2009 WANdisco
Procedures
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 8080
With this configuration, Apache server listens on port 8080 instead of default port 80.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
9 Troubleshooting
WANdisco recommends using JavaHL with Eclipse IDE, which does not use connection pooling,
and thereby eliminates any problems.
SVNKit uses connection pooling. For a given client, SVNKit opens two connections and keeps
them open for later use. On a system with a heavy load and numerous clients, this can cause
performance degradation. An open connection consumes an Apache worker thread, and with
many clients and connection pooling, Apache may run out of worker threads. Apache provides
various tuning parameters to optimize connection pooling but still release the unused connec-
tions. The tunable parameters are Timeout, KeepAliveTimeout, MaxKeepAliveRequests, and
KeepAlive. Please refer to the Apache configuration documentation for further details at http://
httpd.apache.org/docs/2.2/mod/core.html.
Apache has two timeout configurations: Timeout and KeepAliveTimeout. In general, the Timeout
value should be higher than the value for KeepAliveTimeout.
With KeepAlive set to true, command line SVN clients are very diligent in closing connections.
However, SVNKit keeps connections open. As Apache documentation states, if KeepAlive is set
to true, the client should use an existing connection, and close it when done. Giving a somewhat
conflicting command, SVNKit opens a connection and keeps it open. On issuance of a subse-
quent command, SVNKit may open a new connection, regardless of how many established con-
nections are still open.
Troubleshooting 6/17/09 55
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
To force a connection closure upon command completion, set the KeepAliveTimeout to a smaller
value than the value for Timeout.
Generally, a KeepAliveTimeout value of 15 seconds works for WANdisco products. If your appli-
cation ends up dropping and then establishing the connection because of this low value, you may
have to increase the KeepAliveTimeout value. (For example, you may notice a larger number of
pending transactions on the Admin Console’s Dashboard page.) Under a normal load, a client
follows a request within 15 seconds, but under a heavy load or no load, the number of seconds
could vary widely, depending on your specific configuration.
The server sends the Timeout value to the client as a part of the response header, and the client
uses this value to reset or resend the command if the server does not reply within that time. With
a low value for Timeout (for example, 120 seconds), if the server for some reason does not com-
plete the action and does not reply back, the client sends the command again on a different,
newly established connection. If this happens with WANdisco, WANdisco ends up replicating an
unnecessary transaction, and may not parse correctly with an invalid response.
WANdisco also requires some extra time for transaction coordination. In a singleton quorum, with
a client connecting to the distinguished node, the transaction overhead is about 300 mille sec-
onds. To be on the safe side, WANdisco recommends you set the KeepAliveTimeout value much
higher than 300 mille seconds. With KeepAlive set to true, and an appropriate value for KeepAl-
iveTimeout, any Apache worker threads and lingering connections should be taken care of.
NOTE:
WANdisco does not recommend setting KeepAlive to false. If you set KeepAlive to false,
a client's transactions have an enormous overhead of establishing and destroying the
connection. This overhead exists regardless of WANdisco.
Troubleshooting 6/17/09 56
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
9.3.2 Client could not read status line: Server Closed Connection
Apache Error: Client could not read status line: Connection was closed by
server
The solution may be toggling an element. In the Apache configuration files, set Keepalive to On.
If this does not remedy the situation, add the ConnectionReset element and set to true in the
SVNProxy element of the prefs.xml. Please refer to 9.2, Apache and SVNKit.
Troubleshooting 6/17/09 57
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
BUGS
On NFS filesystems, you can not assume that if the operation failed the
file was not renamed. If the server does the rename operation and then
crashes, the retransmitted RPC which will be processed when the server is
up again causes a failure. The application is expected to deal with this.
See link(2) for a similar problem.
Code management systems such as Subversion make heavy use of the rename operation to
modify the underlying databases. Independent of WANdisco, it is a risky practice to store Subver-
sion database content on NFS. The code management community at large recommends not
using NFS for storing repositories.
Some WANdisco products are bundled with a built-in transactional journal and an object data-
base. These are by default stored in the cvs-security/systemdb and cvs-security/config
directories. These directories should not be mounted on an NFS drive. The replicator itself may
be installed on an NFS drive but the systemdb and config directories should be on direct storage
(non-NFS options like RAID, SCSI, SAN, etc). Replicator's transactional integrity can be compro-
mised if writes to an NFS server are lost due to a potential NFS client cache crash after the NFS
server has indicated IO completion.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
There is wider bandwidth to TCP clients. Now TCP clients can connect to
any NIC, because WANdisco is listening on multiple NICs.
The disadvantage to using the wild-card IP is that it gives coarser access control at the IP
address level, as all address are being listened to at the specified port.
You can always switch from the wildcard IP address to a fixed, static IP address or a DNS host-
name, though for the most part, WANdisco recommends you stick with wild-card addressing.
The Apache user-names and passwords should match at all sites. The WANdisco Subversion
replicator's license manager requires a valid user-name inside the HTTP authorization header to
be passed for all DAV commands, except OPTIONS and PROPFIND. In other words, anonymous
access to Apache is not allowed to enforce license requirements, unless you have an unlimited
or an evaluation license. With an unlimited or evaluation license, you are not required to register
the user. This typically means ensuring a Require valid-user line is specified in the Apache SVN
DAV configuration files in the /etc/httpd/conf/httpd.conf and /etc/httpd/conf/conf.d/*
directories. When using Basic Authentication, it is the end user or administrator's responsibility to
keep Apache authentication databases in sync across all sites.
Step 2 Install svn-win32-1.4.4 for Apache 2.2. Make sure it's Subversion for
Apache 2.2.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
<Location /myDavLocation>
DAV svn
SVNPath C:\repo
SVNAutoversioning on
AuthType Basic
AuthName "SVN Repo"
AuthUserFile C:\repo\dav-auth
Require valid-user
</Location>
Step 9 Check that the users have been added to the C:\repo\dav-auth file. To
add new users or change passwords, use apache/bin/htpasswd.exe.
This section outlines the steps to set up Apache for such configuration and also for setting up
SVN-DAV for HTTPS access. The reader is assumed to be familiar with the Apache set up and
basic WANdisco replicator set up. The assumption is that Apache is running on UNIX, though the
same steps apply for the Windows platform. These points are assumed:
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Run the <svn-security>/bin/setup utility and specify the following ports for each replicator:
# Define apache port and pass anything that matches location /svnrepos to
WANdisco SVN Replicator
NameVirtualHost *:80
<VirtualHost *:80>
ProxyPass /svnrepos http://127.0.0.1:8080/svnrepos
ProxyPass /!svn http://127.0.0.1:8080/svnrepos/!svn
ProxyPassReverse /svnrepos http://127.0.0.1:8080/svnrepos
ProxyPassReverse /!svn http://127.0.0.1:8080/svnrepos/!svn
RequestHeader edit Destination ^https: http: early
</VirtualHost>
Listen 443
<VirtualHost *:443>
ProxyPass /svnrepos http://127.0.0.1:8080/svnrepos
ProxyPass /!svn http://127.0.0.1:8080/svnrepos/!svn
ProxyPassReverse /svnrepos http://127.0.0.1:8080/svnrepos
ProxyPassReverse /!svn http://127.0.0.1:8080/svnrepos/!svn
RequestHeader edit Destination ^https: http: early
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt
</VirtualHost>
Listen 8181
NameVirtualHost *:8181
<VirtualHost *:8181>
KeepAlive On
<Location /svnrepos>
AllowOverride None
Order allow,deny
Allow from 127.0.0.1
DAV svn
SVNParentPath /tmp/dav
AuthType Basic
AuthName wandisco
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
AuthUserFile /etc/httpd/conf/htpasswd
Require valid-user
WANdisco Subversion Access Control distribution does not actually perform any encryption or
decryption of the DAV traffic. We rely on Apache to decrypt the SSL traffic, and then use a proxy-
pass definition within the Apache configuration to redirect the unencrypted request to the WAN-
disco replicator.
The WANdisco replicators do not directly encrypt communication between sites. Instead, many
customers may use something like a persistent VPN connection for the replicator-to-replicator
traffic over an encrypted connection, but our code actually does no encryption.
Lastly, the WANdisco replicator simply sits as a proxy on the Subversion server itself (the host
running Apache and ModDAV), so there is no client component that we provide that would be
sending any traffic to the Subversion server.
This assumes that WANdisco and Apache server are running on the same machine.
From the example shown in 10.5, Apache 2.2 with SVNDAV on Windows:
<Location /svnrepos>
AllowOverride None
Order allow,deny
Allow from 127.0.0.1
DAV svn
SVNParentPath /tmp/dav
AuthType Basic
AuthName wandisco
AuthUserFile /etc/httpd/conf/htpasswd
Require valid-user
</Location>
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
WANdisco places the log files in svn-replicator/logs. The current file is always SVNProxy-
Server-prefs.log.0, and the files are rotated out and eventually garbage collected. For rota-
tion schedule, see the svn-replicator/config/log.properties file.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
You should have already installed Java and Perl at all the sites in your replication group for your
trial evaluation. However, any new site you add to the replication group needs Java and Perl
installed as well.
Installing Java
Step 1 Install JDK 1.5 and define the JAVA_HOME environment variable to point to
the directory where the JDK is installed. You can download JDK 1.5 from
the URL below.
http://java.sun.com/javase/downloads/index_jdk5.jsp
Step 2 Add $JAVA_HOME/bin to the path and ensure that no other java (JDK or
JRE) is on the path.
$ which java
/usr/bin/java
$export JAVA_HOME="/usr"
or
$which java
/export/share/apps/jdk/1.5.0/bin/java
$export JAVA_HOME="/export/share/apps/jdk/1.5.0"
Step 3 Ensure the full JDK is installed, not just the JRE. This can be confirmed by
running java -server-version. If it generates a not found error, repeat
Steps 1 and 2.
If you find package management problems or conflicts with the JDK ver-
sion you are downloading (for example, rpm download for Linux), you may
want to use the self-extracting download file instead of the rpm (on Linux)
package. The self-extracting download easily installs in any directory with-
out any dependency checks.
© 2009 WANdisco
Subversion Access Control Administration Guide, Rev. 1
Installing Perl
Step 1 On UNIX or Cygwin, install perl version 5.6 or greater and ensure that the
perl executable is on the system path.
Step 2 On Windows, install ActivePerl version 5.8 or greater and ensure that the
perl executable is on the system path. You can download the MSI installer
for ActivePerl from the URL below.
http://activestate.com/Products/Download/Down-
load.plex?id=ActivePerl.
© 2009 WANdisco