Re: [Wish] Httpdir last call review of draft-ietf-wish-whip-09

Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com> Tue, 03 October 2023 10:21 UTC

Return-Path: <sergio.garcia.murillo@gmail.com>
X-Original-To: wish@ietfa.amsl.com
Delivered-To: wish@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D1F8AC16953E; Tue, 3 Oct 2023 03:21:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mwxG93k3RBlN; Tue, 3 Oct 2023 03:21:19 -0700 (PDT)
Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF996C15155A; Tue, 3 Oct 2023 03:21:14 -0700 (PDT)
Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9b281a2aa94so123667166b.2; Tue, 03 Oct 2023 03:21:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696328472; x=1696933272; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BeXn7ybjGXKMqNN/eDkggUWRTwNPv7f+OHyRVtI/QAg=; b=TKNJpG3YI6WT5nr8AgEAJ7Z5KSeR9hOWpLhy0M+JhSjNTC8+I4SNI/rcaUERcAgT6f ml6VcH14Omq58/58le8B4VRpn4NgMLiFKJY3FPn+wZ3/qrGDhN1rFhjUy9GIOkaOaIvB dx1YNL+J5RCI/KJb6zy9LtMl3TovBHPbnySRuXER/LHCevQF7Hru6cxcxleAoy26V22k bSgtMSveY6VpJgU2CNUrAT5Rh2Z1YseoYRoZrRD+JdyLn4lIlHNCYvRRfnDmRHYLJZyd pnCo94/Kvx9Qh32Va0MhC8ZzijNls5BbnZabBoO+c86LJMWbyDrPcyk/oGBlOqq+78Yb v44w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696328472; x=1696933272; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BeXn7ybjGXKMqNN/eDkggUWRTwNPv7f+OHyRVtI/QAg=; b=qdgWJ+tE4XIu/VRgGeuV7p/ENq+WwyoGnF2p7UOm6Afke3NM7Wr8bxfSKl81mmlk5z D5A0GylAM/kdzem7XYkNRBlOuky3Uh2W1H28BFIg2GWpqflw3TrE8xM+9ipBNScnaT64 CFIbV5/louoPeUnh+Oa3ncPiYDCxe3XuSam6AqRQXSZJNSsgQ5LByfFMRu0MFaBEshF0 h3CazvmCbAFOB/byLcQFJ8fRKzDPldLKXhUhXV8wQ+iZv31EYfkp+cVetYU5DAOvVcDi MknWaAA3hf9J7TbTfNveIjhmqZGH+Vkpe+VMOHow49W8uIttIuwYg/F1iY5f1aCAPVF7 K4BA==
X-Gm-Message-State: AOJu0Yym0XXQcVDmPB7jEMBQKW6Tuwro9nicc0lqaugmIkVOirpm7r6S ZgUkpO5B96dRL3IZ/TrB5QB8333yuc+OFvddE2c=
X-Google-Smtp-Source: AGHT+IH4fxy8c4/wezM2+emyiWtv8dx28e+e1nY9CxtOkHHjtyDr/pYOileDtZdBhljuu264LjqWGPsdJDPGY3WWuro=
X-Received: by 2002:a17:907:763c:b0:9ae:699d:8a2f with SMTP id jy28-20020a170907763c00b009ae699d8a2fmr10394562ejc.2.1696328471959; Tue, 03 Oct 2023 03:21:11 -0700 (PDT)
MIME-Version: 1.0
References: <169618970987.57709.10135041088067281613@ietfa.amsl.com>
In-Reply-To: <169618970987.57709.10135041088067281613@ietfa.amsl.com>
From: Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com>
Date: Tue, 03 Oct 2023 12:21:01 +0200
Message-ID: <CA+ag07Yr2yQvXWEYwRj5dsnfc2bcX=KQvpGUUx9HWO3c7bV-4g@mail.gmail.com>
To: Darrel Miller <darrel.miller@microsoft.com>
Cc: ietf-http-wg@w3.org, draft-ietf-wish-whip.all@ietf.org, last-call@ietf.org, wish@ietf.org
Content-Type: multipart/alternative; boundary="000000000000fe5dce0606cd3f97"
Archived-At: <https://mailarchive.ietf.org/arch/msg/wish/mUnk1jGBoimmTbeK9au7NHNBEMg>
Subject: Re: [Wish] Httpdir last call review of draft-ietf-wish-whip-09
X-BeenThere: wish@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: WebRTC Ingest Signaling over HTTPS <wish.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/wish>, <mailto:wish-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/wish/>
List-Post: <mailto:wish@ietf.org>
List-Help: <mailto:wish-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/wish>, <mailto:wish-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2023 10:21:23 -0000

Hi Darrel,

Thank you very much for your review and comments. I will try to answer some
of them inline, but probably will have to start a new thread with some of
them as I expect quite a bit of discussion before getting to an agreement.


On Sun, Oct 1, 2023 at 9:48 PM Darrel Miller via Datatracker <
noreply@ietf.org> wrote:

> Reviewer: Darrel Miller
> Review result: Almost Ready
>
> I reviewed this document as part of the HTTP Directorate's ongoing
> effort to review all IETF documents being processed by the IESG.  These
> comments were written primarily for the benefit of the HTTP Area
> Directors.  Document authors, document editors, and WG chairs should
> treat these comments just like any other IETF Last Call comments.
>
> Summary: Has Issues
>
> Major Concerns
>
> Section 2: Terminology
> Considering this is a protocol layered on top of HTTP it would be useful
> to be
> consistent with HTTP terminology.  "Endpoint" is not a term defined in
> HTTP,
> but "resource" is.  Calling two distinct protocol concepts "WHIP Endpoint"
> and
> "WHIP Resource" is confusing from an HTTP perspective as they are both HTTP
> resources. Based on my reading, and limited understanding of the domain,
> terms
> such as "WHIP Session Factory" and "WHIP Session" would be more
> appropriate for
> these resources.
>

While the "WHIP Endpoint" is acting as a WHIP session/resource factory, the
term Endpoint is quite established  in rest APIs and I would prefer to keep
it.

I understand the concern about the WHIP resource, and I wouldn't mind
changing it to WHIP session to avoid the naming collision with HTTP
resources.


> Section 4 : Protocol Operation
> The second paragraph describes how to create a session resource using HTTP
> POST. This is standard HTTP behaviour and should not be respecified here.
> For
> example, simply saying, "HTTP POST request is used with application/sdp
> content
> to create a WHIP  session resource" should be sufficient.
>
>
I have received comments in the opposite direction in the past about not
being described enough with how the protocol operates. Also some of these
texts came from early implementations doing crazy things for the HTTP POST

Given that there is no normative language in the paragraph would you be ok
to keep it but adding a reference to the proper specification of how to
perform an HTTP POST correctly?



> It is not clear to me if the response returned is a "status of the
> request" as
> per RFC9110 or a representation of the "WHIP Resource" pointed to by the
> Location header.  If it is the latter, then including a Content-Location
> header
> would be useful to clarify this.
>

I have not found the definition of the "status of the request" anywhere,
but the SDP answer is definitely not a representation of the WHIP
Resource/Session, so I would say it is the former.



>
> 4.1. ICE and NAT support
>
> > If the WHIP resource supports either Trickle ICE or ICE restarts, but not
> both, > it MUST return a "405 Not Implemented" response for the HTTP PATCH
> requests that are not supported.
>
> "405 Not Implemented" appears to be a mistake.  I presume this should say
> "405
> Not Allowed"  However, this does not seem like the appropriate status
> code.
> Per the text, PATCH is definitely supported. However, the specific request
> being made with PATCH is not allowed. This seems more like a 400 Bad
> Request or
> possibly a 409 conflict. The second case when PATCH is not supported for
> any
> purpose seems more suited to returning "405 Not Allowed".  501 Not
> Implemented
> is recommended for use when no resource on the origin server supports the
> method. That does not seem to be the case here.
>

Changing the 501 by a 405 makes sense.  In case of the server supports
PATCH for certain ICE operations, but not for others, sending a 400 bad
request doesn't seem appropriate:

> The 400 (Bad Request) status code indicates that the server cannot or
will not process the request due to something that is perceived to be a
client error (e.g., malformed request syntax, invalid request message
framing, or deceptive request routing).

Neither 409, as the client can't really solve the conflict (as there is no
conflict). Could it be possible to use 422 Unprocessable Content instead?


> The paragraph that describes using conditional requests, should state that
> PATCHing a WHIP Resource MUST use conditional requests using a strong eTag
> and
> not attempt to respecify how conditional requests work.


I am concerned that we won't have a compliant implementation doing etags
correctly if we don't describe the process in detail here.
Which parts of the paragraphs are you more concerned about, and is any of
the mandatory text going against the conditional request spec?


>   Also, the "WHIP
> Resource" should return a 428 to indicate a missing eTag header.


Will add it, thank you!


> The latter
> part of the paragraph seems to contradict the earlier part of the
> paragraph by
> stating that conditional requests are only sometimes required. Perhaps what
> this paragraph is trying to say is "if the WHIP Endpoint returns an eTag
> when
> creating the session, then a client MUST PATCH the session using that eTag
> in a
> conditional request header".
>

Yes, but also mandate that the whip server must use conditional requests if
it supports ice restarts.


>
> In general, using status codes 200 and 204 to communicate different
> application
> success semantics seems like a stretch of HTTP semantics. e.g. 200 means
> successful ICE restart but 204 means a successful or partially successful
> addition of candidates without a restart.  PATCH is designed to be used
> with
> "PATCH aware" media types and application/trickle-ice-sdpfrag does
> explicitly
> call out how it behaves with the PATCH method.  One alternative would be to
> create an "envelope type" PATCH aware media type that contains the
> application/trickle-ice-sdpfrag content but also has place to communicate
> the
> kind of application semantics that are currently being tunneled via HTTP
> status
> codes.  For example, what would happen if it became desirable to
> communicate to
> a client which candidates were not able to resolve a connection address?
> The
> current choice to use 204 means it is not possible to return information
> in the
> response body to communicate this failure.
>

Not sure if I understand this in full. But let me add some clarifications:
- There is no possible failure when adding remote candidates as it just
means that the ICE agent will start performing a connectivity check but
does not change the status of the ICE agent. It is perfectly fine for those
ice candidates checks to fail. Moreover, an initial check doesn't preclude
a failure later on.
- And ICE restart changes the state of the ICE agent, and a new
username/frag must be communicated back to the client

Due to that we use 200 ok for ice restarts (with body) and 204 for trickle
ice (without body).


>
> Section 4.2
>
> "406 Not Acceptable" error response should not be used to indicate bad
> request
> content. A 400 status code is more appropriate.
>

I would prefer to keep 400 for sdp parsing errors, could we use 422
Unprocessable Content instead? The SDP is valid, but the semantics aren't.


> Section 4.3
>
> > WHIP clients SHALL support HTTP redirection via the "307 Temporary
> Redirect"
>
> > In case of high load, the WHIP endpoints MAY return a "503 Service
> Unavailable" response indicating that the server is currently unable to
> handle
> the request due to a temporary overload or scheduled maintenance, which
> will
> likely be alleviated after some delay. The WHIP endpoint might send a
> Retry-After header field indicating the minimum time that the user agent
> ought
> to wait before making a follow-up request.
>
> This content seems appropriate for a best practices or implementers guide
> and
> not normative text.  What is being described is standard HTTP behaviour and
> does not need repeating. The danger of repeating subsets of HTTP language
> in
> normative text is that it raises questions such as "Can I return 301
> instead of
> 307?" "Should the client expect to get a 502 instead of 503?" This document
> should limit itself to including text that further constraints the use of
> HTTP.
>

Would it be fine to remove the normative language on the second part and
maybe just state that the "WHIP clients MUST support HTTP redirection" and
referencing the http specs for the proper error codes?


> Section 4.5
>
> This section said that WHIP clients MUST implement HTTP Auth using a bearer
> token, but prescribes no constraints on what kind of bearer token.
> Considering
> this open ended security definition, what is the benefit of preventing the
> use
> of other HTTP Auth schemes such as the ones registered here
> https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml ?
>

Interoperability. The implementators of the WHIP clients are not going to
be the users of them, and they should be able to interoperate with any WHIP
service., so I need to specify at least a common authentication method.
Nothing precludes WHIP clients to add more authentication methods if they
want.


> Nits:
>
> Section 2: Terminology
> It would be good to add definitions of ICE, SDP, DTLS to the terminology
> section.  SDP is defined in the introduction but ICE and DTLS isn't . The
> definition of WHIP Endpoint and WHIP Endpoint URL seems redundant. Same for
> WHIP Resource. All HTTP resources have URLs.  There isn't usually a need to
> describe the URL independently.
>

This was raised by other reviews too, I have a tentative change here:
https://github.com/wish-wg/webrtc-http-ingest-protocol/pull/130/files

Would this be better to you?


> Section 4.1: ICE and NAT Support
>
> A reference for ICE ufrag/pwd pair would be helpful.
> References to RFC 9110 section 3.1 should be to section 13.1
>
> Will add them


> Section 4.7
> I believe "and the URI for the HTTP resource" should be "and the URL for
> the
> HTTP resource".
>

Will change it.

Best regards
Sergio