You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Mattes <si...@sodge.org> on 2007/08/11 17:38:22 UTC
Incomplete checkout with authz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everybody,
I have a question regarding path-based authorization. I'm using svn over
https with the following dav_svn.authz file (reduced to relevant parts,
also see the Apache2 config at the bottom):
[menouthis:/]
sirprize = rw
* = r
[menouthis:/unstable/secret]
sirprize = rw
* =
When checking out anonymously, the "secret" folder does not get checked
out, as expected. But when I tried checking out like that:
svn co --username sirprize https://sodge.org/svn/menouthis/ menouthis
it did not work as well.
I also noticed that the log messages and timestamps of commits to the
secret directory are not shown anymore in "svn log", even when svn knows
my password.
Just in case I did not express myself clearly enough: My goal is to have
a publicly accessable (readable) repository with some content that must
not be seen for anonymous users. For authorized users, the repository
should be fully accessable as if there were no restrictions.
Any hints or ideas what I am doing wrong? I searched on the net and in
the SVN book, but found no answer to my specific problem.
Thanks for your time!
Best regards from Germany,
Michael
My relevant Apache2 Config:
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "sodge.org Subversion Server"
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/dav_svn.authz
</Location>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGvfQFIxZ6GJZI+ocRAruDAJ48OcLzbeLP1ZLL8BoMLhe3JgpbXACg0Dl+
q9bNU2h+7HuPtGPa3j+IZKI=
=a7ws
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Incomplete checkout with authz
Posted by Michael Mattes <si...@sodge.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
thanks for the reply!
Christoph Ludwig wrote:
> The important bit here is "the path being accessed". I am not 100% sure, but,
> IIUC, this refers only to the path you pass as argument to checkout. The
> subversion modules do not check all subfolders if any of them requires
> authentication. Since https://sodge.org/svn/menouthis/ can be read by
> anonymous users, the server never asks for user credentials.
That would indeed explain the behaviour. I suppose it was implemented
like that because of access speed.
To solve (or better: work around) the problem in my case, I will forbid
truely anonymous access and add a user named "svn", ith an empty
password. The following Apache directive will give instructions:
AuthName "Welcome to the sodge.org Subversion Server. Username: svn, no
password."
If anyone knows a better solution, I'd be glad to hear it.
> I agree that the book could discuss the consequences of this behaviour more
> explicitly and provide examples.
Anyone with the rights to commit to the svn book is free to modify and
add this text to the book at an appropriate place, no credit necessary:
Beware that mixing path-based authorization with anonymous access can
lead to a situation where access-restricted files and subfolders in an
anonymously accessible folder cannot be checked out normally.
To circumvent this, one can deactivate truely anonymous access and
instead create a user without password, which could be called
"anonymous" or "svn". This will force the Subversion server to check for
folders requiring authorization.
Regards,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGwKTBIxZ6GJZI+ocRAj/hAKChd0CmCxq8CLFVBhRlv0KeicaSggCgrQiF
yuatm2bimv1ZYmNSr+6I8w0=
=BtMZ
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Incomplete checkout with authz
Posted by Christoph Ludwig <lu...@fh-worms.de>.
Hi,
On Sat, Aug 11, 2007 at 07:38:22PM +0200, Michael Mattes wrote:
> I have a question regarding path-based authorization. I'm using svn over
> https with the following dav_svn.authz file (reduced to relevant parts,
> also see the Apache2 config at the bottom):
>
> [menouthis:/]
> sirprize = rw
> * = r
> [menouthis:/unstable/secret]
> sirprize = rw
> * =
>
> When checking out anonymously, the "secret" folder does not get checked
> out, as expected. But when I tried checking out like that:
> svn co --username sirprize https://sodge.org/svn/menouthis/ menouthis
> it did not work as well.
> I also noticed that the log messages and timestamps of commits to the
> secret directory are not shown anymore in "svn log", even when svn knows
> my password.
the SVN book has the following text in
<URL:http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html>:
"If you've configured your server block to allow a mixture of anonymous and
authenticated access, all users start out accessing anonymously. The server
looks for a * value defined for the path being accessed; if it
can't find one, then it demands real authentication from the client."
The important bit here is "the path being accessed". I am not 100% sure, but,
IIUC, this refers only to the path you pass as argument to checkout. The
subversion modules do not check all subfolders if any of them requires
authentication. Since https://sodge.org/svn/menouthis/ can be read by
anonymous users, the server never asks for user credentials.
I agree that the book could discuss the consequences of this behaviour more
explicitly and provide examples.
Regards
Christoph
--
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org