git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Andre Masella <andre@masella.no-ip.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: Repository Security
Date: Tue, 23 Jan 2007 15:00:33 +0000	[thread overview]
Message-ID: <200701231500.34560.andyparkins@gmail.com> (raw)
In-Reply-To: <200701230823.17938.andre@masella.no-ip.org>

On Tuesday 2007 January 23 13:23, Andre Masella wrote:

> Okay, say one regular developer wants share his changes with another
> developer. He either has to mail patches, create an SSH account, or set up
> one of git-daemon or WebDAV. And most of those require knowing the
> workstation name which is inconvienient. I would rather have each user able
> to push to a branch with their name on it on a central server.

So: developer1 is allowed to make changes to central's branch br/developer1, 
say.  How is the central server going to be sure that it is developer1 
connecting?  Probably a username and password.  In which case you have a user 
account - which is what you would have with ssh.  The difference would be 
that with ssh you would have full access to all the authentication and 
authorisation mechanisms of a standard UNIX system; LDAP, NIS, timed-logins, 
etc.  If git were to implement authorisation itself then it would need all 
these modules writing again.

I don't know if this would work with git, but once you had real users, you 
could simply do
 $ mkdir refs/heads/dev1
 $ chown dev1.developers refs/heads/dev1
 $ chmod 755 refs/heads/dev1
 $ chmod u+s refs/heads/dev1
And then only dev1 would be able to write references in refs/heads/dev1.

(The above is untested in git; but with a bit more work I'm sure it could be 
made to operate)

git has a marvellous property that it won't change objects in the object 
database - it will only add new objects.  That makes it more difficult to do 
actual harm over the git-protocol.  For my few users, who already had 
accounts, and are part of a group, I simply made a group-writeable SGID 
directory for git repositories, created the repositories, set the config and 
left them to it.  With reflogs turned on, there is no damage they can do that 
can't be undone.


Andy

-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com

  parent reply	other threads:[~2007-01-23 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-22 19:33 Repository Security Andre Masella
2007-01-22 20:53 ` Shawn O. Pearce
2007-01-23 13:23   ` Andre Masella
2007-01-22 23:46 ` Martin Langhoff
2007-01-23  9:41 ` Johannes Schindelin
2007-01-23 13:23   ` Andre Masella
2007-01-23 14:29     ` Johannes Schindelin
2007-01-23 15:00     ` Andy Parkins [this message]
2007-01-23 11:06 ` Jakub Narebski
2007-01-23 13:23   ` Andre Masella
2007-01-23 21:38     ` Johannes Schindelin
2007-01-24  9:31     ` Andreas Ericsson
2007-01-23 16:18   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701231500.34560.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=andre@masella.no-ip.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).