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

Re: git, monorepos, and access control

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 6, 2018, 00:23 UTC
Message-ID
<20181206002342.GD890086@genre.crustytoothpaste.net>
In-Reply-To
<20181205210104.GC19936@sigill.intra.peff.net>
On Wed, Dec 05, 2018 at 04:01:05PM -0500, Jeff King wrote:
Show 13 quoted lines
> You could work around that by teaching the server to refuse to use "X"
> in any way when the client does not have the right permissions. But:
> 
>   - that's just one example; there are probably a number of such leaks
> 
>   - you're fighting an uphill battle against the way Git is implemented;
>     there's no single point to enforce this kind of segmentation
> 
> The model that fits more naturally with how Git is implemented would be
> to use submodules. There you leak the hash of the commit from the
> private submodule, but that's probably obscure enough (and if you're
> really worried, you can add a random nonce to the commit messages in the
> submodule to make their hashes unguessable).

I tend to agree that submodules are the way to go here over a monorepo. Not only do you have much better access control opportunities, in general, smaller repositories are going to perform better and be easier to work with than monorepos. While VFS for Git is a great technology, using a set of smaller repositories is going to outperform it every time, both on developer machines, and on your source code hosting platform.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Jeff KingNext: Junio C Hamano
Message 9 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.