SVN Security tips

We came across a situation where we needed to have our code on remote server for debugging purposes and then building it. We did not wanted to keep source as well as the svn credentials we enter to check out on the server, which is by default cached by subversion client.

Did some search on the documentation and tried to summarize here, how to avoid credentials (username & password) caching and how to remove subversion credential (username & password) from the cache.

1. How to remove the authentication cache(subversion username and password) information from machine?

Go to ~/.subversion/auth/svn.simple on the linux machine (server). you would get files like 71151d3c2992c42066fd0838caf0fe8d in this directory. If your auth information is cached, you will get the your credentials stored in one of these files as clear text ;-)

Remove these files from the directory to clear the authentication cache,

2. Do not allow svn to cache your auth information. — Using command line

After the svn command use –no-auth-cache to tell svn not to cache your authentication credentials. e.g.

# svn checkout http://your_server.com/project_name/trunk –no-auth-cache

It will ask you the credentials but will not cache it.

3. Do not allow svn to cache your auth information. — Using configuration file

Go to ~/.subversion/, open config file and search for [auth] , You will get all the instructions below that.

In short you need to uncomment two lines in the file.

store-passwords = no
store-auth-creds = no

Hope this will help in managing security better.

Most Commented Posts

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)