Thursday, August 26, 2010
SVN authentication using SASL
Sunday, August 22, 2010
SVN and its authentication
/conf
. This directory contains three files named authz, passwd, snvserve.conf
.Configuration of these files can give permission but username and password will be plaintext.svnserve.conf
can be edited as follows.[general]
non-access = none
auth-access = write
password-db = passwd
authz-db = authz
relam = firstrepo
[sasl]
in this configuration file. This file is not configured for unencrypted connection. [users]
section of passwd
file , username and password is added. It is added as:abc = abc123
,[passwd]
section of the psswd file following users and their password are added as:[passwd]
buda = buda123
asur = asur123
charlie = charlie123
outer/outer1/inner1
outer/outer2/inner2
/inner1
and charlie can write /inner2 only.And all the other can't neither read nor write.For achieving this we can configure authz
file as follows:[authz]
[/]
buda = rw
asur = r
charlie = r
[repository:/outer/outer1/inner1]
asur = rw
[repository:/outer/outer2/inner2]
charlie = rw
SVN and its configuration
Subversion is a free/open source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows us to recover older versions of our data or examine the history of how our data changed. Thus this can be regarded as "time machine"
I have configured svn server for the people of an organization giving SASL authetication and per-directory authorization. Here are the steps and solution to possible problems. First, i am going to revise some of the important svn command for Linux(Debian).
First of all we need to install a package named subversion from package manger.
sudo apt-get install subversion
After successful installation of the software, we can easily create the repository.
svnadmin create /path/to/repository
creates the repository
Once repository is created, some of the files will be added in the location of the repository.Three sub-directories that will be available are /conf, /db, /hooks, /lock
. The use of these sub-directories will be explained later.
After creating the repository we need to import the data in the repository.For importing data,create the directory to which needs to be imported. The following command imports the data into the repository
cd /path/to/import/directory
svn import file://localhost/path/to/repository --message "some additional information"
The above command is for the local system. If you need to import for repository which his in network, then following command works
svn import svn://host-address/path/to/repository --message "some additional information"
Once the data are imported, it gets stored in the /svn directory. Now, we need to get the working directory.For getting the working directory we can enter the following command.
First of all we need to create the working directory where we want to keep the working copy.
mkdir /path/to/working/director
y
cd /path/to/working/directory
svn co file://localhost/path/to/repository
This is for the case when repository is in local system. And for the repository which is in network, the following is the command:
svn co svn://host-address/path/to/repository
Once the working copy we get, we can make changes on that copy and test it and if we really wants to make changes then we can commit it. Committing makes changes to the repository file too. We should not have a misunderstanding that it will make change into the original repository file. The changes will be made to the files which will later be released as new version.Committing can be done as using the following command sitting in the working directory.
svn commit