Closed
Bug 454510
Opened 17 years ago
Closed 16 years ago
Provide way to check if a user has SVN permissions
Categories
(mozilla.org Graveyard :: Server Operations, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: clouserw, Assigned: aravind)
Details
When a user has an LDAP account but doesn't have SVN permissions to a directory it's harder to handle via a web app because we have to store their changes, tell them they don't have permission (as opposed to another SVN error) and ask them to take the time to fix it - when all they wanted to do was commit something.
It would be a better user experience if the user could log in to the web app, attempt to edit something and be told before hand that they don't have permission and they'll need it before they can commit.
To do this webdev needs a way of seeing who has permissions to what directories. Perhaps this can be an LDAP attribute?
Comment 1•17 years ago
|
||
svn does this with a flat file in the top-level config directory, and it's based on a combination of groups and pathnames and so forth. If you can come up with a way to parse that file we can probably rsync it somewhere you can get at on a regular basis or something. (or if you get something that can parse it that can be queried, we can probably put it on the server and let you hit it there to query it)
Comment 2•17 years ago
|
||
Sorry, meant to paste this in here, too:
http://svnbook.red-bean.com/en/1.4/svn.serverconfig.pathbasedauthz.html
(docs for said file format)
Comment 3•17 years ago
|
||
Dave - is this public information? If someone has access to a directory or not? I could probably whip up some sort of web service page really quickly that would let you do, say:
check_svn_access.php?path=/foo/bar&user=foo@bar.org
And it would return either 'rw', 'ro', or 'undefined'. (Of course, that makes me wonder, do we have directories in SVN that are private? Or is everything by default readable? I believe that's the case...)
Assignee: server-ops → mark
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 4•17 years ago
|
||
Dave? :)
Comment 5•17 years ago
|
||
I'm not sure there's anything confidential about who can see what, though it might help a cracker figure out which account he needs to hack to get privs I suppose. That's probably more of an aravind question since he set all that up.
Comment 6•17 years ago
|
||
Wil:
Is comment #3 as a solution acceptable to you?
Reporter | ||
Comment 7•17 years ago
|
||
> Is comment #3 as a solution acceptable to you?
I think it sounds great
Comment 8•17 years ago
|
||
Wil:
Okay, this is all setup. All I need now is a list of paths you're going to be checking so I can whitelist them in the script. (We're not going to expose all paths, only the ones that you care about, to try to maintain some security on the access list.)
So yeah, just a list to the svn paths you care about, and I'll have this for you ready to use tomorrow...
Reporter | ||
Comment 9•17 years ago
|
||
Umm, all the paths that localizers have access to in the config file? I think there is a localizers group with access to several paths, right? Some example paths that would be in there would be:
/vc/projects/mozilla.com/trunk/*
/addons/trunk/site/app/locale/*
/projects/mozilla-europe.org/trunk/*
In fact, that might be all the paths. Since there is a whitelist can you differentiate the return values for these conditions:
- path doesn't exist in whitelist
- user has permission
- user does not have permission
- something else went wrong; page xb95 asap <3
Thanks!
Comment 10•17 years ago
|
||
Three paths added, and responses from the script should indicate in a pretty straightforward fashion what the user can and can't do.
I'll document and move it to a more permanent home tomorrow (or try, kick me if I fail) and we'll keep this ball rolling.
Comment 11•16 years ago
|
||
We're going to be moving this to the svn/hg frontend servers. I'm working with Aravind to ensure proper setup and security of the script.
Updated•16 years ago
|
Assignee: mark → aravind
Assignee | ||
Comment 12•16 years ago
|
||
I can't find this check_svn_access.php script. Does anyone know where Mark was developing it?
Reporter | ||
Comment 13•16 years ago
|
||
it's at people.mozilla.org:/var/www/cgi-bin/svn-acl/
Assignee | ||
Comment 14•16 years ago
|
||
I would like to move our svn root from svn.m.o to svn.m.o/svn. Should have done this a long time back. If we don't, we'd have to put in all kinds of work-around to get around that. This doesn't prevent me from giving you the check at a different url, but this is a good thing to do anyway.
The first impact you will notice is svn operations will fail with this message.
svn: Repository moved temporarily to 'http://svn.mozilla.org/svn/projects/mozilla.com/branches/cms_testing'; please relocate
Is this acceptable. I will look into what it takes to fix viewvc so we keep all the history intact through the move.
If you guys think this move will be way too disruptive, I can simply provide this check at a different url like svnperms.m.o/check.cgi or something like that. In general though, moving the root from / to /svn is the right thing to do moving forward.
Comment 15•16 years ago
|
||
(In reply to comment #14)
> If you guys think this move will be way too disruptive, I can simply provide
> this check at a different url like svnperms.m.o/check.cgi or something like
> that.
I definitely think this would be a huge disruption. I don't think it's worth it at all.
> In general though, moving the root from / to /svn is the right thing to
> do moving forward.
Why do you think that? Are subdomains really such problems? Why not <something>.svn.mozilla.org like ViewVC has?
Assignee | ||
Comment 16•16 years ago
|
||
The main problem with leaving our svn root at / is that it makes it virtually impossible to add any kind of url filtering or re-direction. This is probably also the reason that the svn docs recommend hosting the repos at something other than /.
For just this script, we can do a subdomain (its not all that different from doing a completely new domain).
Reporter | ||
Comment 17•16 years ago
|
||
(In reply to comment #15)
> (In reply to comment #14)
> > If you guys think this move will be way too disruptive, I can simply provide
> > this check at a different url like svnperms.m.o/check.cgi or something like
> > that.
>
> I definitely think this would be a huge disruption. I don't think it's worth it
> at all.
Agreed, I'd vote for a subdomain over moving the root.
Assignee | ||
Comment 18•16 years ago
|
||
Please use http://vcperms.mozilla.org/cgi-bin/svn_perms.cgi with the arguments Mark listed earlier.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•