Version Control with Subversion - httpd, the Apache HTTP server - Disabling Path-based Checks
Disabling Path-based Checks
The
mod_dav_svn
module goes through a
lot of work to make sure that data you've marked
“unreadable” doesn't get accidentally leaked.
This means that it needs to closely monitor all of the paths
and file-contents returned by commands like
svn
checkout
or
svn update
commands. If these commands encounter a path that isn't
readable according to some authorization policy, then the
path is typically omitted altogether. In the case of
history or rename tracing—e.g. running a command like
svn cat -r OLD foo.c
on a file that was
renamed long ago—the rename tracking will simply halt
if one of the object's former names is determined to be
read-restricted.
All of this path-checking can sometimes be quite
expensive, especially in the case of
svn
log
. When retrieving a list revisions, the server
looks at every changed path in each revision and checks it
for readability. If an unreadable path is discovered, then
it's omitted from the list of the revision's changed paths
(normally seen with the --verbose option),
and the whole log message is suppressed. Needless to say,
this can be time-consuming on revisions that affect a large
number of files. This is the cost of security: even if you
haven't configured a module like
mod_authz_svn
at all, the
mod_dav_svn
module is still asking Apache
httpd
to run authorization checks on
every path. The
mod_dav_svn
module has
no idea what authorization modules have been installed, so
all it can do is ask Apache to invoke whatever might be
present.
On the other hand, there's also an escape-hatch of
sorts, one which allows you to trade security features for
speed. If you're not enforcing any sort of per-directory
authorization (i.e. not using
mod_authz_svn
or similar module), then
you can disable all of this path-checking. In your
httpd.conf file, use the
SVNPathAuthz directive:
Example 6.4. Disabling path checks altogether
<Location /repos>
DAV svn
SVNParentPath /usr/local/svn
SVNPathAuthz off
</Location>
The SVNPathAuthz directive is “on” by
default. When set “off”, all path-based
authorization checking is disabled;
mod_dav_svn
stops invoking authorization
checks on every path it discovers.
[an error occurred while processing this directive]
|