git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Add way to make Git credentials accessible from clean/smudge filter

From
Jeff King <peff@peff.net>
Date
Nov 11, 2016, 20:27 UTC
Message-ID
<20161111202710.7zpalypsnorqeclq@sigill.intra.peff.net>
In-Reply-To
<1478894572.12153.1.camel@kaarsemaker.net>
On Fri, Nov 11, 2016 at 09:02:52PM +0100, Dennis Kaarsemaker wrote:
Show 25 quoted lines
> > > Are you sure about that? If I do:
> > > 
> > >  echo url=https://example.com/repo.git |
> > >  git credential fill
> > > 
> > > I get prompted for a username and password.
> > 
> > 
> > Hm.. either I don't understand you or I expressed myself unclear. 
> > 
> > Let's say a user runs:
> > 
> > $ git clone https://myrepo.git
> > 
> > If no credential helper is setup, then Git asks the user for credentials.
> > Afterwards Git starts downloading stuff. At some point Git will run my
> > smudge filter on some files and in my case the smudge filter needs the
> > Git credentials. AFAIK, the smudge filter has no way to get the credentials 
> > from Git at this point - not even by invoking "git credential". 
> > Is this correct?
> 
> I think that's correct, but the same argument goes both ways: unless I
> use a credential helper, or explicitely give a filter application my
> credentials, I don't want a helper to be able to get to those
> credentials. I'd consider that a security bug.

Yeah, agreed. They are logically two separate operations, so I think it is a feature that they do not implicitly share credentials.

I think the only place where we implicitly share credentials is when serving an HTTP fetch or push requires multiple HTTP requests. And there it seems pretty sane to do so.

-Peff
Previous: Dennis KaarsemakerNext: Lars Schneider
Message 8 of 9 in “[RFC] Add way to make Git credentials accessible from clean/smudge filter”
  1. Lars SchneiderNov 10, 2016
  2. Matthieu MoyNov 10, 2016
  3. Jeff KingNov 10, 2016
  4. Lars SchneiderNov 11, 2016
  5. Jeff KingNov 11, 2016
  6. Lars SchneiderNov 11, 2016
  7. Dennis KaarsemakerNov 11, 2016
  8. Jeff KingNov 11, 2016
  9. Lars SchneiderNov 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.