Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

per-user svn repos

Status
Not open for further replies.

vortmax

Technical User
Aug 1, 2006
46
US
I'm attempting to setup private user svn repos using apache dav_svn. I would like to have users access the generic url "private.svn.xxx.xxx" at which point they would be prompted with a login. Once they log in, it would use their username dynamically in the SVNParentPath (setting it to /home/<username>/.repo). I would also like to not have to add a new config for each new user... If I add a new user to the system, I would like them to automatically gain access to their repo. I'm already authenticating using external auth and pwauth, so the users unix accounts are already linked.

Here is my config for the common repo that is working

Code:
<VirtualHost *:80>
        ServerName  common.svn.xxx.xxx
        ServerAdmin xxxx@xxx.xxx
        DocumentRoot /var/[URL unfurl="true"]www/SVN[/URL]

        AddExternalAuth pwauth  /usr/sbin/pwauth
        SetExternalAuthMethod pwauth pipe

<Location /repos>
  DAV svn
  SVNParentPath /var/[URL unfurl="true"]www/common_repos/[/URL]
  SVNListParentPath on
  SVNIndexXSLT "/repos-web/view/repos.xsl"
  AuthType Basic
  Require valid-user
  AuthName "Subversion Repositories"
  AuthBasicProvider external
  AuthExternal pwauth
</Location>
</VirtualHost>

Is this even possible?
 
I can think of two ways to approach this problem. One you could try to use rewrite rules and send each user to the designated page. There is probably a variable that would have the login information that you could use for this purpose, but off hand I don't know what it would be.

The other way would be to make the parent, generic page, PHP based and then use the server side scripting (PHP) to redirect them to the correct URL. This, I think would be easier.

You could then couple this feature with restrictions in .htaccess to limit the user as you desire. For example, you could issue each user a browser certificate and that certificate would be valid only for the pages chosen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top