[netconf] Re: HTTPBIS feedback on draft-ietf-netconf-http-client-server-23

Robert Varga <nite@hq.sk> Wed, 27 November 2024 04:45 UTC

Return-Path: <nite@hq.sk>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A5725C151984; Tue, 26 Nov 2024 20:45:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.103
X-Spam-Level:
X-Spam-Status: No, score=-2.103 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, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hq.sk
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 A0Qv2zvTZFX3; Tue, 26 Nov 2024 20:45:16 -0800 (PST)
Received: from mail.hq.sk (hq.sk [81.89.59.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 133A0C151539; Tue, 26 Nov 2024 20:45:13 -0800 (PST)
Received: from [192.168.1.242] (chello085216192201.chello.sk [85.216.192.201]) by mail.hq.sk (Postfix) with ESMTPSA id 3DBE824986F; Wed, 27 Nov 2024 05:45:10 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hq.sk; s=mail; t=1732682710; bh=pnAeHRE2yn0Xay23Hyf99utqR8qLQfr9m09mi4MilFs=; h=Date:Subject:To:References:From:In-Reply-To; b=cXjv7EPRXXNrBS8oUMozy7CPomuMZWPEnFrkCFroMfGwZ3/dyDqKLzAX09VxZmrO1 WpTCZEhF8PG6pG45DkZpHRHMQTJr/3eXsW3ILtb+2rEqQnp01CtAl8mMG+9Lak641M x7PbQcZXvgMZrq7CSyOE3PiqoYD/sFS5pu32Ht0Y=
Message-ID: <fe78863b-3b82-4cce-9f6f-d36765c5dcaf@hq.sk>
Date: Wed, 27 Nov 2024 05:45:09 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Francesca Palombini <francesca.palombini=40ericsson.com@dmarc.ietf.org>, "netconf@ietf.org" <netconf@ietf.org>, "draft-ietf-netconf-http-client-server@ietf.org" <draft-ietf-netconf-http-client-server@ietf.org>
References: <PAXPR07MB7838B73BEE06947F50B596E0985E2@PAXPR07MB7838.eurprd07.prod.outlook.com>
Content-Language: en-US
From: Robert Varga <nite@hq.sk>
Autocrypt: addr=nite@hq.sk; keydata= xjMEY4xzBRYJKwYBBAHaRw8BAQdAWm3NU5U2kKQbiNJUawCMfVXdj2Y/XarwdxyLi6uw/ODN GVJvYmVydCBWYXJnYSA8bml0ZUBocS5zaz7ClgQTFgoAPhYhBLO+1B0LGn9Q0u+Cv2leSGR/ lt3ZBQJjjHMFAhsDBQkDwmcABQsJCAcDBRUKCQgLBRYCAwEAAh4FAheAAAoJEGleSGR/lt3Z 6eUBAMKyTKiklTHR7zvUAJnFXpjEz0pwvfurraD6RImMF+/fAQDsXhxDgHd1wuqh3H5Q6YWW Z25FSqVT8woWVmHda0gfB844BGOMcwUSCisGAQQBl1UBBQEBB0ACA+0r1aIMjAOahYlM4y1a V+1xmaOUedPDmVrKfuLUWgMBCAfCfgQYFgoAJhYhBLO+1B0LGn9Q0u+Cv2leSGR/lt3ZBQJj jHMFAhsMBQkDwmcAAAoJEGleSGR/lt3ZzoAA/AkT8dRuTeUjHdW/IW/uHOsfHp/oYrW9RpuP c8PAsSTsAQCtR08+kVl3dDROey/pvwsInwjkrbvb6noNtUEkHyDsCA==
In-Reply-To: <PAXPR07MB7838B73BEE06947F50B596E0985E2@PAXPR07MB7838.eurprd07.prod.outlook.com>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="------------yhZ7a6OJ0VruRf0WJYM5ESx1"
Message-ID-Hash: 6NIPBH7N2WNDQJLRFXR74ZYETCAVK2CY
X-Message-ID-Hash: 6NIPBH7N2WNDQJLRFXR74ZYETCAVK2CY
X-MailFrom: nite@hq.sk
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-netconf.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [netconf] Re: HTTPBIS feedback on draft-ietf-netconf-http-client-server-23
List-Id: NETCONF WG list <netconf.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/jHQkAFO7CRkiRQ67po8bMlfXI88>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Owner: <mailto:netconf-owner@ietf.org>
List-Post: <mailto:netconf@ietf.org>
List-Subscribe: <mailto:netconf-join@ietf.org>
List-Unsubscribe: <mailto:netconf-leave@ietf.org>

On 09/11/2024 1.14 pm, Francesca Palombini wrote:
> Hello Netconf wg, authors,

Hello everyone,

> I requested wg feedback about your draft-ietf-netconf-http-client-server 
> on which I am holding a DISCUSS (following HTTPDIR review).
> 
> I know it was unfortunate that HTTPBIS was scheduled against Netconf, 
> but wanted to point you to the recording of the discussion: https:// 
> youtu.be/46JRo7U6DXc?si=whxnGLURhYjAslSZ&t=159 <https:// 
> youtu.be/46JRo7U6DXc?si=whxnGLURhYjAslSZ&t=159> and the minutes: 
> https://notes.ietf.org/notes-ietf-121-httpbis#AD-Requested-Feedback 
> <https://notes.ietf.org/notes-ietf-121-httpbis#AD-Requested-Feedback>
> 
> The authors also had a productive discussion with HTTPBIS participants 
> after that meeting, and I hope with the additional feedback we are going 
> to be able to get the changes necessary to get it unstuck.

As a non-author implementer I have the following feedback on the points 
raised in the HTTPBIS discussion.


1. On Donald Miller's concern about explicit selection of HTTP version 
and reviewing popular client libraries.

I do agree in general, when we view the problem at a high-level, in 
particular in Java. Yes, there are Java libraries and frameworks which 
hide the HTTP particulars and that is one way of implementing RESTCONF.

I disagree on the point of using high-level libraries. In my 
implementation, we have used the Java-standard stack of Jetty, Jersey 
and JAX-RS to implement a RESTCONF server. There are two drivers behind 
that decision:
- we are using Netty to implement various other protocols, like NETCONF, 
BGP, PCEP, OpenFlow and JSON-RPC, i.e. our codebase routinely integrates 
at a very low level, in order to provide symmetric server and client 
implementations
- our RESTCONF implementation is an outlier in this regard, costing us 
in terms of dependencies and internal code to support them

While it is true that high-level frameworks do not provide these sorts 
of configuration options, when we get to low-level frameworks like 
Netty, these options are very much exposed to developers, to to point of 
having to explictly deal with object models and HTTP upgrade lifecycle, 
as evidenced in [0] et al.

Agreed on the point this being the policy on client side: my code will 
be implementing this policy. My library requires me to do so and 
therefore no, it is not that difficult to implement, as I have to write 
out the HTTP protocol upgrade codepaths anyway.

If there are libraries which hide these detail, users of those would be 
integrating at a much higher level and would not be implementing this 
draft. That is not my case.

No, it is not solely for the purposes of optimization. It is also for 
in-field interoperability: if I my software stack is required talk to a 
RESTCONF server implementation which is known to have busted HTTP/2 or 
HTTP/3 stack, I have to expose the knobs to use HTTP/1.1 only at admin 
discretion. This applies to all the various "it's buggy" cases, etc.


2. David's (sorry I did not catch the last name) concert on "how HTTP works"

This is not about all the (excellent) work HTTPBIS has done over the 
years. This is about how an HTTP library may be configured to handle 
HTTP session establishment.

As noted above, choosing the low-level route is a bit painful in that we 
need to implement quite a few bits one can get for free from a 
higher-level library. Nevertheless the choice is an implementation one, 
I do have an implementation which has very good reasons to choose that 
route, and in the context of my implementation this work fills an 
obvious gap[1].


3. Reflecting the Francesca's (?) comment about requiring this

Agree, for the most part my implementation will follow seamless 
upgrades. That having been said, my implementation may not be able to 
provide HTTP/3 (currently due to dependencies being experimental) or be 
build-time configured to support HTTP/1.1.

For that I need this model, or its equivalent, where I can express what 
the implementation *can offer* and what it *is configured to offer*. The 
"can offer" part is subject to both what code has been written and to 
what has been linked into the application image.


4. Daniel's point on "server not supporting H3"

Yes, agreed. This draft solves the "client not supporting H3" counter 
example in that argument, as is the case with my implementation right 
now (because I have not written my part of the code and my potential 
upstream libraries are not as ready as I would like them to be).


5. Daniel's point on "connection pooling vs HTTP/2+"

Yes, this is a valid point, but it is an implementation decision outside 
of the scope of this draft.

I know my library won't be implementing connection pools to deal with 
RFC8650's option to have multiple HTTP "logical connections". At least 
for the foreseeable future, my implementation's stance on that is going 
to be: you (user of my library) either use HTTP/2+, in which case I'll 
handle concurrency for you, or you get any number of pipelined HTTP/1 
connections fro me and you deal with connection pools and all the 
implied complexity.

Beyond foreseeable future, though: any connection pooling functionality 
would be working on pure HTTP/1.1, so it is strictly a library add-on, 
which is how we would go about implementing it.

I do have a companion issue to go with those threadpools as well: my 
current NETCONF client implementation assumes :interleave, whereas I 
should be establishing two separate connections to handle the case when 
the NETCONF server does not support :interleave.

I will tackle both as time permits and users require, just like any 
nascent implementation would :)


6. Daniel's point on client developer's being equipped to make

I am implementing the imaginary "HTTP client library" here. I am very 
much prepared and equipped to deal with protocol upgrades. *My clients* 
do not have to deal with them because I provide the functionality *and 
default configuration* so they get reasonable behavior out of the box.


7. Mike's (sorry, did not catch the last name again) point re: usefulness

As I noted in a separate thread[2], the usefulness is two-fold here:
- symmetry with the "HTTP server" side of things
- symmetry of "RESTCONF-over-HTTP*" with "NETCONF-over-{SSH,TLS}
My implementation happens to *really* like splitting out the "transport 
layer" part of what constitutes an HTTP conversation.


8. Mike's "I can see it for servers, but" point

Yes, and NETCONF WG has a mixin to that, called "call home". In those 
scenarios, the TCP connection is initialized in the opposite direction 
HTTPBIS assumes:
- a RESTCONF server, which is an HTTP server underneath, would perform a 
connect(2) operation
- a RESTCONF client, which is an HTTP client underneath, would perform a 
listen(2) operation
This is a synchrony inversion of what one would normally consider an 
"HTTP Server" and "HTTP Client" when pure RFC9110 were involved, but we 
do have a valid use case for it (see RFC8071).

As an implementor, I just have to have a symmetric view of both a server 
and a client. Not having a standard here just means I will roll my own 
equivalent.

9. Mike's "what is the use case for a generic HTTP client here?" point

There is none. Yes, you are exactly on the money with "HTTP client 
portion of a larger feature". That is exactly what it maps to in scope 
of my implementation: a configurable and reusable building block.

We are not looking for "Generic HTTP client", but rather for 
"configuration for HTTP client as implied by another protocol". In this 
case the implying protocol would be RESTCONF, which I personally have 
come to view as "NETCONF-over-HTTP".

As I have noted in the other thread: the goal is not a generic client, 
but an *embedded* HTTP client within the confines of a higher-level 
protocol. In this particular case RFC8040 defines how 
path/query/fragment needs to be mapped as a fixed-function device and 
this drown defines the schema/authority/http version parts of that 
conversion.

Let met reiterate this point more clearly:

ietf-http-client, however badly it is currently named, does not define 
anything which would be considered mandatory to implement. It just 
provides reusable bits and pieces that an implementation may choose to use.

I do not have a (serious) implementation (right now) to show it, but I 
know my implementation will need the equivalent bits and pieces in the 
future.

If there is an IETF standard, I will do my level best to implement it 
faithfully. If there is not, or the standard does not address my needs, 
I will roll my own.

As with anything YANG, this is not a big deal at all when an individual 
implementation is concerned, as anybody can roll whatever they want, and 
I am absolutely fine with that being the case forever.

Where it is not as fine, though, is the dream of a consistent of 
configuration model of internet-connected devices.

10. The chair's comment about "HTTP semantics being version free as 
possible"

As someone, who has been aware of HTTP since when HTTP/1 was the 
prevalent thing clients used, but has only delved into the intricate 
details of its workings now, and only because of my implementation, I 
must say RFC911* do a wonderful job of separating concerns. Thank you 
and the entire HTTPBIS community for this work.

As a non-author, but sharing some of the authors' biases: we do not seek 
to circumvent this effort, nor develop it further without consultation. 
The way I see it, this effort is useful for standardizing the (bare 
minimum) configuration an embedded HTTP client implementation may require.


11. On Lars' (sorry, again the last name eludes me) point of version 
flexibility

Absolutely agree.

This is about the bare-minimum nerd-knobs everybody expects their HTTP 
client library exposed, with sanest possible of defaults. Not all 
implementations will have the luxury of being able to provide these -- 
those will not be using these models. I think most users of existing 
HTTP libraries will find their library allows tweaking these knobs, and 
those will have the option to adopt his model if and when they need to.

The model should provide "use-latest-HTTP-whenever-possible" as a manner 
of defaults, but account for possible implementation deficiencies -- 
i.e. it should be perfectly fine to use this model with an 
implementation which does not support anything by 
HTTP/3-with-mutual-authenthical. It should be equally usable by an 
implementation which supports nothing but HTTP/1.1-without-authentication.

That is what NETCONF WG needs to proceed this draft so that in becomes 
the foundation on which draft-ietf-netconf-restconf-client-server is built.

All other concerns, like "generic HTTP client", whatever that may mean, 
are part of a follow-up discussion, at least where my implementation is 
concerned.


12. On Lars' point of "decade back and forth compatibility"

It is not the case that HTTP is unique w.r.t. protocol negotiation. The 
codebase I represent here has BGP, PCEP and NETCONF (and other non-IETF 
protocols) implemented. Most of these protocols have some amount on 
negotiation built into them, which affects the overall semantics and my 
implementation deals with that just fine.

What makes HTTP stand out in this conversation is that it, unlike TLS or 
SSH, provides RFC6241 Figure 1 "Messages Layer" and "Operations Layer" 
abstractions.

As I pointed out in the other thread[2], this distinction warrants 
careful consideration and special care from both NETCONF and HTTPBIS 
WGs, so that NETCONF WG objectives are met without encroaching on 
HTTPBIS. This has not been the case so far where TCP, SSH, or TLS is 
converned -- simply because those protocols are not used by NETCONF WG 
beyond their "it is a bytestream" functionality and there was a 1:1 
mapping between their respective communities and NETCONF WG would want.

My stance on this is that the document being discussed should only 
address the "scheme" and "authority" parts of an HTTP URL, plus some 
minimal protocol preference for negotiation purposes -- nothing less, 
nothing more.

If there is any appetite for anything approaching what would be called 
"a generic HTTP client configuration", my view is that that effort is 
separate and should be driven squarely by HTTPBIS. The effort currently 
under discussion, driven by NETCONF, should provide a solid foundation 
on which such an endeavor can build on.


Caveat emptor: my implementation does not provide a serious 
HTTP/RESTCONF client implementation. On the other hand, it does provide 
a complete server implementation and the experience indicates 
client-side requirements in no uncertain terms: there needs to be a 
model symmetric to what the server side is doing. I estimate I will have 
a RESTCONF client in around 12 months' time.

Regards,
Robert

[0] 
https://github.com/netty/netty/blob/4.1/example/src/main/java/io/netty/example/http2/helloworld/server/Http2ServerInitializer.java#L70-L76
[1] 
https://github.com/opendaylight/netconf/blob/master/transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/HTTPClient.java#L33-L36
[2] 
https://mailarchive.ietf.org/arch/msg/netconf/3RomX-rjTmDpHWmbsYHJmTUal80/