How do I setup SVN repository security?
October 28th, 2013 by
Scott McNab
By default, all SVN repositories are globally accessible. However, by using the ProjectHut Control Panel you can configure permissions so only authenticated users can access your repository.
First, if you have not already done so, you need to add one or more authenticated users and/or groups so you can assign access rights to them:
How to create Users and Groups:
- In the ProjectHut control panel (the
admin/
area) click on the “Users” link.
- Click on “Create a new user” and complete the form to create a user and assign a password. Repeat this for each user that you wish to give access to your system.
- Optionally you can click on the “Groups” link define one or more groups of users that can share access permissions (e.g. you might choose to have a ‘developers’ group with full read-write permissions, and also a ‘testers’ group that has only read-only permissions).
How to assign Subversion repository permissions:
- In the ProjectHut control panel (the
admin/
area) click on “Subversion Repositories”.
- Click on the “permissions” action for the repository you wish to configure.
- To disable access for all unauthenticated users, click on the “edit” action next to the “anonymous” rule on the root ‘/’ path.
- Change the access to “denied” and click the update rule.
- To enable access to your repository for a user or group click on the “add” action next to the root ‘/’ path to define a new rule.
- Select the user or group in question and choose what level of access you wish to give (either “read/write” “read only” or “disabled).
- Click on “Add Rule” to assign the permission.
If you then attempt to access your subversion repository via a web-browser or a subversion client you will be prompted for a username and password in order to obtain access.
HINT:
By using this configuration screen you can also assign different permissions to different directory paths within your repository – just use the “Create new rules for path:” box to define a set of rules for a new path.