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

Re: git, monorepos, and access control

From
Jeff King <peff@peff.net>
Date
Dec 6, 2018, 07:23 UTC
Message-ID
<20181206072300.GB29787@sigill.intra.peff.net>
In-Reply-To
<cdeb9dc9-ac25-23c8-f3b9-9a7987be7df0@amd.com>
On Wed, Dec 05, 2018 at 11:42:09PM +0000, Coiner, John wrote:
Show 12 quoted lines
> > For instance, Git is very eager to try to find delta-compression
> > opportunities between objects, even if they don't have any relationship
> > within the tree structure. So imagine I want to know the contents of
> > tree X. I push up a tree Y similar to X, then fetch it back, falsely
> > claiming to have X but not Y. If the server generates a delta, that may
> > reveal information about X (which you can then iterate to send Y', and
> > so on, treating the server as an oracle until you've guessed the content
> > of X).
> Another good point. I wouldn't have thought of either of these attacks. 
> You're scaring me (appropriately) about the risks of adding security to 
> a previously-unsecured interface. Let me push on the smudge/clean 
> approach and maybe that will bear fruit.

If you do look into that approach, check out how git-lfs works. In fact, you might even be able to build around lfs itself. It's already putting placeholder objects into the repository, and then faulting them in from external storage. All you would need to do is lock down access to that external storage, which is typically accessed via http.

(That all assumes you're OK with sharing the actual filenames with everybody, and just restricting access to the blob contents. There's no way to clean/smudge a whole subtree. For that you'd have to use submodules).

-Peff
Previous: Coiner, JohnNext: Jeff King
Message 7 of 17 in “git, monorepos, and access control”
  1. Coiner, JohnDec 5, 2018
  2. Ævar Arnfjörð BjarmasonDec 5, 2018
  3. Derrick StoleeDec 5, 2018
  4. Duy NguyenDec 5, 2018
  5. Ævar Arnfjörð BjarmasonDec 5, 2018
  6. Coiner, JohnDec 5, 2018
  7. Jeff KingDec 6, 2018
  8. Jeff KingDec 5, 2018
  9. brian m. carlsonDec 6, 2018
  10. Junio C HamanoDec 6, 2018
  11. Jeff KingDec 6, 2018
  12. Ævar Arnfjörð BjarmasonDec 6, 2018
  13. Jeff KingDec 6, 2018
  14. Johannes SchindelinDec 6, 2018
  15. Stefan BellerDec 6, 2018
  16. Coiner, JohnDec 6, 2018
  17. Ævar Arnfjörð BjarmasonDec 5, 2018

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.