From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Secure central repositories by UNIX socket authentication
Date: Sun, 27 Jan 2008 19:54:54 -0500 [thread overview]
Message-ID: <20080128005454.GA24004@spearce.org> (raw)
In-Reply-To: <alpine.LSU.1.00.0801271841230.23907@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Sun, 27 Jan 2008, Shawn O. Pearce wrote:
> >
> > Sure, $USER is set. For "jdoe". But due to the "chmod 700 foo.git"
> > above jdoe isn't actually allowed access to the repository directory. So
> > it doesn't matter what $USER is set to, jdoe cannot get to the files of
> > the repository.
>
> Ah, that's what I missed. I thought you already used git-shell, and did
> not really read the chmod part.
No, I'm not using git-shell. I'm actually currently using a setuid
git-receive-pack, which we've both agreed is horribly ugly. I want
to get away from that mess.
> > 2) Use the SSH key feature to have remote users login as
> > the repository owner, but use the authorized_keys file
> > to force them to only execute git-shell.
> > This is uh, ugly, especially with 50+ users.
>
> Slight variation: do not permit other users access to your machine, except
> via git-shell. Then you don't need chmod 0700.
This isn't an option. At least 10% of the users need a real shell
on this system, but cannot be trusted to not directly edit the
repository. I'm also not able to get them different user accounts
(one for git-shell, one for normal shell) because giving the same
human two different user accounts on the same UNIX system will
cause the world to explode. At least according to some management
people who get paid 3x what I get paid.
Of course, note those same people have also said that a SAMBA server
cannot run on a system unless it is a SAMBA server. Catch-22.
You cannot run SAMBA unless you are already running SAMBA. :-\
> > 4) Add full user authentication to git-daemon and then do #3.
> > The user authentication can provide data down into the update
> > hook, such as by setting the $GIT_REMOTE_USER environment
> > variable. That's basically this change, except I'm using bog
> > standard SSH to perform the authentication for me.
>
> AFAIR the plan was to keep git-daemon as simple and stupid as possible; in
> particular _not_ to add any authentication.
Yup. I think its smart. Defer authentication off to the standard OS
tools, so we don't have to deal with it in git itself.
Yet I'm offering a patch for comment that adds some level of
authentication to git-daemon. At least it still just relies on
UNIX uids and doesn't actually try to link to PAM. :-)
--
Shawn.
next prev parent reply other threads:[~2008-01-28 0:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-27 10:39 [RFC] Secure central repositories by UNIX socket authentication Shawn O. Pearce
2008-01-27 14:04 ` Johannes Schindelin
2008-01-27 17:32 ` Shawn O. Pearce
2008-01-27 18:51 ` Johannes Schindelin
2008-01-28 0:54 ` Shawn O. Pearce [this message]
2008-01-28 8:14 ` Dmitry Potapov
2008-01-27 22:56 ` Junio C Hamano
2008-01-28 0:16 ` git-daemon is insecure? (was: [RFC] Secure central repositories) Shawn O. Pearce
2008-01-28 3:00 ` git-daemon is insecure? Junio C Hamano
2008-01-28 3:20 ` Shawn O. Pearce
2008-01-28 0:47 ` [RFC] Secure central repositories by UNIX socket authentication Shawn O. Pearce
2008-01-28 7:25 ` Junio C Hamano
2008-01-28 7:51 ` Shawn O. Pearce
2008-01-28 14:23 ` Asheesh Laroia
2008-01-29 3:11 ` Shawn O. Pearce
2008-01-28 7:56 ` Shawn O. Pearce
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=20080128005454.GA24004@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--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).