git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC PATCH] t5551: delete auth-for-pack-but-not-refs test
@ 2019-03-21 17:47 Jonathan Tan
  2019-03-21 19:55 ` Jeff King
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jonathan Tan @ 2019-03-21 17:47 UTC (permalink / raw)
  To: git; +Cc: Jonathan Tan, peff

When using protocol v0, upload-pack over HTTP permits a "half-auth"
configuration in which, at the web server layer, the info/refs path is
not protected by authentication but the git-upload-pack path is, so that
a user can perform fetches that do not download any objects without
authentication, but still needs authentication to download objects.

2e736fd5e9 ("remote-curl: retry failed requests for auth even with
gzip", 2012-10-31) added a test for this, stating that this leaks
information about the repository but makes it occasionally more
convenient for users that use manual credential entry.

Protocol v2 does not support this, because both ref and pack are
obtained from the git-upload-pack path.

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.

This issue was discovered by the GIT_TEST_PROTOCOL_VERSION patches.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
This is on master. (It is reasonable to apply it even in the absence of
GIT_TEST_PROTOCOL_VERSION.)

Marking this as RFC, because my opinion is that the usefulness of this
feature is limited (as you can see in the commit message), but others
may have a use case that I haven't thought about.

The alternative is to add GIT_TEST_PROTOCOL_VERSION=0 to this test (and
rebase it to a branch that has GIT_TEST_PROTOCOL_VERSION).
---
 t/t5551-http-fetch-smart.sh | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index ba83e567e5..3be9c0063b 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -149,12 +149,6 @@ test_expect_success 'clone from auth-only-for-objects repository' '
 	test_cmp expect actual
 '
 
-test_expect_success 'no-op half-auth fetch does not require a password' '
-	set_askpass wrong &&
-	git --git-dir=half-auth fetch &&
-	expect_askpass none
-'
-
 test_expect_success 'redirects send auth to new location' '
 	set_askpass user@host pass@host &&
 	git -c credential.useHttpPath=true \
-- 
2.21.0.155.ge902e9bcae.dirty


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-04-08 17:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 17:47 [RFC PATCH] t5551: delete auth-for-pack-but-not-refs test Jonathan Tan
2019-03-21 19:55 ` Jeff King
2019-03-21 20:02   ` Jeff King
2019-03-21 20:24     ` Jonathan Tan
2019-03-21 21:48       ` Jeff King
2019-03-21 22:36         ` Jonathan Tan
2019-03-22  2:20 ` Junio C Hamano
2019-03-22 17:20   ` Jonathan Tan
2019-03-22 19:01 ` [PATCH v2] t5551: mark half-auth no-op fetch test as v0-only Jonathan Tan
2019-03-23  7:05   ` Jeff King
2019-04-06 11:31   ` Jonathan Nieder
2019-04-08 17:01     ` Jonathan Tan

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).