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

Re: [PATCH] add mod_authz_svndb to subversion

From: Gregory Bartholomew <gregory.lee.bartholomew_at_gmail.com>
Date: 2007-02-14 01:44:00 CET

There is no good reason why it is implemented as a separate module
other than that it was convenient for me to develop it that way. I'm
extremely new to subversion's source code and I was learning it as I
went, grabbing bits and pieces of mod_authz_svn and the libraries that
it included as I went.

It probably wouldn't take much to re-add the code for parsing the svn
authorization file if you think that such is the way it ought to be.

I found that the authorization module was only concerned with
repository paths and had no significant dependencies on the rest of
the subversion project. So, it doesn't seem unreasonable to me to
have it as a separate module, compilable with the standard apxs tool
and interchangeable with whatever version of subversion the user might
have on their system. This was convenient for me in part because it
meant that I did not need to remove subversion from my OS's automatic
package management & upgrade system while I developed the code.

There was one necessary external reference that, if changed in
subversion, would require that a new version of this module be
compiled and that was the special verb names and their corresponding
number of components. I don't know how often or how likely these are
to change but they do present a maintenance problem/annoyance to this
module being separate from the rest of the subversion project. The
authorization module really does not need to know what the special
names are or do or even how many url components any particular verb
uses. It only needs to know where the path that it needs to authorize
begins. I made a comment to this effect in the "special.h" file which
contains this information copied from the current subversion project.
In the header file, I suggested a possible solution to the problem to
be to include the "length of the special uri" (in components) meta
data in the uri itself so that this module or any other program which
might be parsing the uri paths would not need such information. As an
example, I suggested that the component after the special uri prefix
be reserved to hold a single number which would be the number of
components to follow which were not part of the path. This would also
seem to allow for more flexibility with your verbs as they could be
dynamic in length, determined at run time. For backwards
compatibility, future versions of subversion would only need to check
whether the character after /!svn/ were a digit.

Again, I am very new to all of this and I don't expect my opinion to
be of any consequence. Whatever you think is best, I will attempt to
comply with.

Also, I noticed that there was a lot of talk about including ldap
queries in the authorization module. I'd note that it should be quite
simple to substitute such a query in place of the database query that
is currently in this svndb version. I doubt that any of the rest of
the logic of the code would have to change to add ldap capability to
the svndb module. I haven't worked with Apache's ldap api, but I'd be
willing to give it a shot if anyone thought this module actually had a
chance of making it into subversion.

Also, I assumed that this patch that I have submitted would go into
some sort of testing suite/phase.


On 2/12/07, Daniel Rall <dlr@collab.net> wrote:
> Greg, I haven't reviewed this patch in depth yet, but I did notice a
> lot of similarities between it and our existing authz module.
> I was wondering why you chose to implement it as a separate module?
> Also, I was wondering if you were planning on integrating it into
> Subversion's test suite.
> Thanks, Dan
> On Sat, 10 Feb 2007, Gregory Bartholomew wrote:
> > Just thought I'd bump this patch to the top since I havn't heard any
> > feedback and I'd like to point out that I think this module could handle the
> > isse 2712 posted previously to the issues group (if the user were willing to
> > use apache instead of svnserve).
> >
> > gb
> >
> > On 2/7/07, Gregory Bartholomew <gregory.lee.bartholomew@gmail.com> wrote:
> > >
> > >[[[
> > >ADD mod_authz_svndb to subversion
> > >[in subversion/mod_authz_svndb]
> > >
> > >* INSTALL
> > >* mod_authz_svndb.c
> > >* mod_authz_svndb.h
> > >* special.h
> > >* svndb.sh
> > >* svndb.sql
> > >
> > >]]]
> ...
> > >> On Tue, Feb 06, 2007 at 10:41:01PM -0600, Gregory Bartholomew wrote:
> > >> > Hi,
> > >> >
> > >> > For my own uses, I have modified mod_authz_svn to get its permissions
> > >> > from a database via apache 2's dbd api. I went all-out and
> > >> > implemented a very rich feature
> > >> > set and think that it would make a good addition to the subversion
> > >> > project. Below,
> > >> > I have pasted the modified INSTALL file with the feature discriptions
> > >for
> > >> > your
> > >> > review. I have never contributed to an open source project and
> > >> > request instructions
> > >> > on how and to whom to send the source for review.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 14 01:44:30 2007

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