You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just upgraded my WebSVN to master and recognized that authentication checks behave differently than in the past. Though, my setup might be somewhat special so not sure how to handle this, but at least want to document it here. In the end, I simply have a list of repositories which should be published only and added those using the following in config.php:
The important thing to note is that I would like to call index.php WITHOUT any authentication, so that a listing of the configured projects is available always. After clicking onto one of those projects, the browser is requested to authenticate and afterwards the configured authz files are used to check permissions as well. This worked in the past because the authz files contained the following lines:
[/:/]
* = r
Those were treated specially in former implementations and meant something like if the repo should only be shown as part of some listing, allow that. This is pretty much what SVN documents in case of SVNParentPath and one file with multiple repos, only with the special meaning that one doesn't need to provide the concrete repo name. Not sure anymore if this special config was documented by SVN itself somewhere or only for WebSVN.
[calc:/branches/calc/bug-142]
harry = rw
sally = r
The important thing is that my lines perfectly fine worked in the past even with multiple repos having individual authz files and being listed by WebSVN. That doesn't work anymore, instead one needs to make WebSVN request some special path like in the following example of a changed index.php:
// Create listing of all configured projects (includes groups if they are used).
foreach ($projects as $project) {
if (!$project->hasReadAccess('/websvn/allow_listing'))
continue;
[/websvn/allow_listing]
* = r
This works even WITHOUT having corresponding directories WITHIN the SVN repo, because svnauthz only checks based on the config file, not actual repo content. The problem simply seems to be that WebSVN checks permissions for / in the repo, my authz files deny that access for valid reasons and the special workaround /:/ doesn't seem to be supported anymore.
$ /[...]/svnauthz accessof --repository 'DocBeam3' --path '/websvn/allow_listing' '/[...]/authz'
r
$ /[...]/svnauthz accessof --repository 'DocBeam3' --path '/' '/[...]/authz'
no
$ /[...]/svnauthz accessof --repository 'DocBeam3' --path '/foobar' '/[...]/authz'
no
Not sure how to handle such use cases, but making WebSVN request arbitrary directories for very special permissions doesn't sound too wrong to me. Might make more sense than to e.g. add a config deciding if to check permissions for project listings like done in index.php.
The text was updated successfully, but these errors were encountered:
I've just upgraded my WebSVN to master and recognized that authentication checks behave differently than in the past. Though, my setup might be somewhat special so not sure how to handle this, but at least want to document it here. In the end, I simply have a list of repositories which should be published only and added those using the following in
config.php
:The important thing to note is that I would like to call
index.php
WITHOUT any authentication, so that a listing of the configured projects is available always. After clicking onto one of those projects, the browser is requested to authenticate and afterwards the configuredauthz
files are used to check permissions as well. This worked in the past because theauthz
files contained the following lines:Those were treated specially in former implementations and meant something like if the repo should only be shown as part of some listing, allow that. This is pretty much what SVN documents in case of
SVNParentPath
and one file with multiple repos, only with the special meaning that one doesn't need to provide the concrete repo name. Not sure anymore if this special config was documented by SVN itself somewhere or only for WebSVN.The important thing is that my lines perfectly fine worked in the past even with multiple repos having individual
authz
files and being listed by WebSVN. That doesn't work anymore, instead one needs to make WebSVN request some special path like in the following example of a changedindex.php
:This works even WITHOUT having corresponding directories WITHIN the SVN repo, because
svnauthz
only checks based on the config file, not actual repo content. The problem simply seems to be that WebSVN checks permissions for/
in the repo, myauthz
files deny that access for valid reasons and the special workaround/:/
doesn't seem to be supported anymore.Not sure how to handle such use cases, but making WebSVN request arbitrary directories for very special permissions doesn't sound too wrong to me. Might make more sense than to e.g. add a config deciding if to check permissions for project listings like done in
index.php
.The text was updated successfully, but these errors were encountered: