From: Jonathan Nieder <jrnieder@gmail•com>
To: Jonathan Tan <jonathantanmy@google•com>
Cc: git@vger•kernel.org, peff@peff•net, gitster@pobox•com
Subject: Re: [PATCH v2] t5551: mark half-auth no-op fetch test as v0-only
Date: Sat, 6 Apr 2019 04:31:13 -0700 [thread overview]
Message-ID: <20190406113113.GA219876@google.com> (raw)
In-Reply-To: <20190322190139.151189-1-jonathantanmy@google.com>
Hi,
Jonathan Tan wrote:
> 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.
>
> But protocol v2 does not support this, because both ref and pack are
> obtained from the git-upload-pack path.
>
> Mark the test verifying this behavior as protocol v0-only, with a
> description of what needs to be done to make v2 support this.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google•com>
Thanks for the analysis. Makes sense.
> --- a/t/t5551-http-fetch-smart.sh
> +++ b/t/t5551-http-fetch-smart.sh
> @@ -164,7 +164,17 @@ test_expect_success 'clone from auth-only-for-objects repository' '
>
> test_expect_success 'no-op half-auth fetch does not require a password' '
> set_askpass wrong &&
> - git --git-dir=half-auth fetch &&
> +
> + # NEEDSWORK: When using HTTP(S), protocol v0 supports a "half-auth"
> + # configuration with authentication required only when downloading
> + # objects and not refs, by having the HTTP server only require
> + # authentication for the "git-upload-pack" path and not "info/refs".
> + # This is not possible with protocol v2, since both objects and refs
> + # are obtained from the "git-upload-pack" path. A solution to this is
> + # to teach the server and client to be able to inline ls-refs requests
> + # as an Extra Parameter (see pack-protocol.txt), so that "info/refs"
> + # can serve refs, just like it does in protocol v0.
> + GIT_TEST_PROTOCOL_VERSION=0 git --git-dir=half-auth fetch &&
> expect_askpass none
I suspect it's fine if protocol v2 never supports this. Can we change
the NEEDSWORK comment to say that the protocol v2 spec should document
the lack of support for half-auth?
With or without such a change,
Reviewed-by: Jonathan Nieder <jrnieder@gmail•com>
Thanks.
next prev parent reply other threads:[~2019-04-06 11:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-04-08 17:01 ` Jonathan Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190406113113.GA219876@google.com \
--to=jrnieder@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=jonathantanmy@google$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox