[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Odd behavior

From: Stephen Butler <sbutler_at_elego.de>
Date: Sat, 19 Mar 2011 22:52:12 +0000

On Mar 19, 2011, at 22:14 , Rodrigo Montenegro wrote:

> I have the following repository configuration file for apache:
>
> <Location /svn/repos/>
> AuthType Basic
> AuthName "Subversion"
> AuthUserFile /srv/svn/svnauth
>
> DAV svn
> SVNParentPath /srv/svn/repos
> SVNListParentPath On
>
> require valid-user
> </Location>
>
> <Location /svn/repos/repo1>
> require valid-user
> </Location>
>
> <Location /svn/repos/repo1/trunk/secret>
> <LimitExcept GET PROPFIND OPTIONS REPORT>
> require user secretowner
> </LimitExcept>
> <Limit GET PROPFIND OPTIONS REPORT>
> require user secretowner
> </Limit>
> </Location>
>
> It seems right to me but the odd behavior is that when some valid-user but secretowner checkouts trunk the folder secret keeps coming as well its content.
> What is wrong?

Only the first of your overlapping <Location> directives has any effect.
The other two may as well be deleted.

For Subversion, the Apache configuration controls access to an entire
repository as a unit.

To hide part of a repository from some users, there is path-based
authorization. It uses a different mechanism. See the SVN book for
details:

  http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz.perdir
  http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html

Note that you can't hide the existence of a forbidden directory, so it's
not very secret even when the path-based authorization is working. If
you have real secrets you should avoid storing them with your source
code.

Regards,
Steve

--
Stephen Butler | Senior Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2011-03-19 23:52:50 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.