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

Re: [RFC PATCH] t5551: delete auth-for-pack-but-not-refs test

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Mar 22, 2019, 17:20 UTC
Message-ID
<20190322172023.238242-1-jonathantanmy@google.com>
In-Reply-To
<xmqq36nfsl8t.fsf@gitster-ct.c.googlers.com>
Show 16 quoted lines
> Jonathan Tan <jonathantanmy@google.com> writes:
> 
> > Because this configuration is not supported by all protocol versions,
> > and because this configuration seems to be of limited usefulness (only
> > useful for people who use manual credential entry and on servers that
> > are OK with exposing refs but not objects, and even in this case, helps
> > only in a no-op fetch), delete the test that verifies that this
> > configuration works.
> 
> A possible and different conclusion that naturally follow your first
> "because" could be "fix protocol versions whose support of this
> configuration is broken", and your second "because" is with "seems
> to be", that makes it quite weak.
> 
> Quite honestly, I hate to see a proposed log message that downplays
> its potential negative effects without sufficient justification.
That is true, and that's fair.
Show 15 quoted lines
> Isn't this feature primarily for those who want to poll from an
> automated job (and naturally you want to assign as little privilege
> as possible to such an automated job) with ls-remote and only run an
> authenticated fetch, perhaps manually, with or without cred helper,
> when the automated polling job finds there is something worthwhile
> to fetch?  What this test is checking seems to be a quite effective
> way to achieve that useful workflow, at least to me, and offhand I
> do not think of other ways to easily achieve the same.
> 
> The "ls-remote" communication may not even touch any outside network
> but may be happening all within a single organization, in which case
> "are OK with exposing refs" is making a security mountain out of a
> molehill.  If it were a truly problematic hole that makes it a
> security issue, wouldn't we deleting this test and at the same time
> plugging the hole for earlier protocol versions?
Thanks - that's a reasonable use case.
Show 9 quoted lines
> Having said all that, I do not care too deeply.  Would a much better
> longer-term solution for those who want to poll and fetch only when
> there is something new be to allow clients to subscribe to a feed
> that hangs while there is nothing new, and lets the upstream side
> continuously feed incremental updates to the receiving client, as
> its refs are updated, or something?  As long as such a thing is in
> our vision (it is OK if nobody is currently working on it) to become
> replacement, I do not think it is a huge loss to lose the ability for
> unauthenticated ls-remote with authenticated fetch.

I just remembered that one way we can support the existing use case is to inline the ls-refs call that we make as an Extra Parameter [1]. This would restore the ability to obtain refs through only the info/refs path.

Perhaps this is the component in our vision that we need - I'll write another patch that merely forces GIT_TEST_PROTOCOL_VERSION=0 and has a NEEDSWORK comment that explains this.

[1] https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt
Previous: Junio C HamanoNext: Jonathan Tan
Message 8 of 12 in “t5551: delete auth-for-pack-but-not-refs test”
  1. t5551: delete auth-for-pack-but-not-refs testJonathan Tan, Mar 21, 2019
  2. Jeff KingMar 21, 2019
  3. Jeff KingMar 21, 2019
  4. Jonathan TanMar 21, 2019
  5. Jeff KingMar 21, 2019
  6. Jonathan TanMar 21, 2019
  7. Junio C HamanoMar 22, 2019
  8. Jonathan TanMar 22, 2019
  9. t5551: mark half-auth no-op fetch test as v0-onlyJonathan Tan, Mar 22, 2019
  10. Jeff KingMar 23, 2019
  11. Jonathan NiederApr 6, 2019
  12. Jonathan TanApr 8, 2019

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.