Subject: Re: [hybi] Secdir review of draft-ietf-hybi-permessage-compression-22

From: Robert Sparks <[email-masked]>
Date: Mon, 06 Jul 2015 11:02:58 -0500

(adding the hybi list)

It seems to me that this effectively adding an actor (the intermediary) 
, and defining (not as explicitly as I think it needs to be) protocol 
mechanics for that actor in ways that the base specification did not 
anticipate.

I'm not comfortable that the consequences of these new mechanics 
(specifically - that the intermediary can directly participate in the 
extension negotiations, and change the results) are well understood. The 
additions to the text you propose will certainly help point out that 
there might be some, and the message that the endpoint won't have 
insight into how its messages are handled beyond the intermediary needs 
to be prominent.

But I wonder if the mechanics of an intermediary _changing the protocol 
signalling_ is something the working group should explicitly work on 
writing down?

RjS

On 6/30/15 3:42 AM, Takeshi Yoshino wrote:
> Thank you for review, Robert.
>
> On Thu, Jun 25, 2015 at 6:18 AM, Robert Sparks <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>     I have reviewed this document as part of the security directorate's
>     ongoing effort to review all IETF documents being processed by the
>     IESG.  These comments were written primarily for the benefit of the
>     security area directors.  Document editors and WG chairs should treat
>     these comments just like any other last call comments.
>
>     Summary: Ready with issues
>
>     (fwiw, I also reviewed up through version -24).
>
>     Section 7 (Intermediaries) should be more explicit that it's talking about an intermediary doing compression on one side and not (or doing different compression) on the other.
>     (If that's not what it's trying to set up, please clarify).
>
> OK. So, I'd like to change the text as follows:
>
> When an intermediary proxies ... Per-message Compression of messages 
> received from one peer, and then forward the messages to the other 
> peer, if the intermediary ...
>
>     It's not clear from reading RFC6455 that the idea of intermediaries changing the contents of the websocket extension negotiation mechanism was considered - have I missed the text in that RFC that discusses that?
>     Are there other extensions that suggest similar behavior? It's not immediately clear that the protocol mechanics do the right thing when the different negotiations on each side of the proxy fail differently.
>
> It's not well discussed in RFC6455. Right. AFAIK, there's no such 
> extension defined, yet.
>
> I understand that this text (intermediary section in the I-D) works 
> just not to disallow change of compression but there's nothing in 
> RFC6455 that guarantees that such transformation doesn't cause any 
> issue with other infrastructure of the WebSocket protocol.
>
> I believe that unless any extension that interferes with the other 
> negotiated extensions (e.g. counting the number of negotiated 
> extensions, relying on PMCE, etc.), the core WebSocket protocol 
> (things defined in RFC6455) should work. If such an extension is 
> introduced, it would be just considered to be incompatible with PMCEs, 
> or that extension should describe how to coordinate with change on 
> PMCE in the intermediaries section of its RFC.
>
> I think this is more reasonable than prohibiting change on Per-message 
> Compression by intermediaries.
>
>     This also seems to put an endpoint in a position where it has no say on what an intermediary does with the traffic on the other side of it. Is that worth discussing in the document?
>
> Ah, right. Maybe some text like:
>
> "It's not guaranteed that the PMCE which an endpoint has negotiated in 
> the opening handshake is preserved in the whole path to the peer 
> endpoint."
>
>     It would be good to point to, or provide, a discussion of how the extension negotiation mechanism in WebSockets is meant to be protected.
>
>
> As a general discussion to cover other extensions (if they want. by 
> referring to this to-be-RFC) like the section defining terms to 
> complement RFC6455 [1]?
>
> [1] 
> https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-24#section-3

---

From: Takeshi Yoshino <[email-masked]>
Date: Tue, 14 Jul 2015 17:32:18 +0900

>  (adding the hybi list)

Hi Robert,

Sorry for delay.

>
> It seems to me that this effectively adding an actor (the intermediary) ,
> and defining (not as explicitly as I think it needs to be) protocol
Done more archaeology...

This text originates from the intermediaries section introduced on update
between
draft-tyoshino-hybi-websocket-perframe-deflate-06 and
draft-ietf-hybi-websocket-perframe-compression-00

I couldn't find the original proposal which led to this text from my mail
box. I thought someone made one on HyBi, but only found my comment on
publish of -00.

As far as I remember, we initially didn't intend to add any requirement,
expectation, etc. to the main (RFC 6455) spec by this spec. The text now
looks like an additional requirements to complement the main spec just
unexpectedly (unexpectedly at least for me). I added this text just to note
a fact that when one wants to change compression, handshake should be also
altered appropriately, otherwise, it doesn't work. Maybe the following
texts in RFC 6455 have a similar role.

   o  As control frames cannot be fragmented, an intermediary MUST NOT ...

   o  An intermediary MUST NOT change the fragmentation of a message if ...

   o  An intermediary MUST NOT change the fragmentation of any message ...

> extension negotiations, and change the results) are well understood.
>

Did you mean "not well understood"?

> The additions to the text you propose will certainly help point out that
> there might be some, and the message that the endpoint won't have insight
> into how its messages are handled beyond the intermediary needs to be
> prominent.
>

Yeah. But now I'm wondering if it's in the scope of protocol
standardization or not. Seems the text should be changed to look like a
warning (don't do this or your stack won't work) as discussed above.

> signalling_ is something the working group should explicitly work on
I've been viewing the PMCE from the view point of a browser developer. Like
fragmentation, permessage-deflate is also just a transport-level thing
which is invisible/transparent to the final user of the communication (e.g.
JavaScript using the WebSocket API). My comments are based on this idea.
But with your comment, I just noticed that it's not trivial.

Actually, the extensions under use is exposed to the user of the protocol
via _Extensions in Use_. We should have been aware of that.

>  On Thu, Jun 25, 2015 at 6:18 AM, Robert Sparks <[email-masked]>
> wrote:
>
> received from one peer, and then forward the messages to the other peer, if
> the intermediary ...
>
>
>  I understand that this text (intermediary section in the I-D) works just
> not to disallow change of compression but there's nothing in RFC6455 that
> guarantees that such transformation doesn't cause any issue with other
> infrastructure of the WebSocket protocol.
>
> negotiated extensions (e.g. counting the number of negotiated extensions,
> relying on PMCE, etc.), the core WebSocket protocol (things defined in
> RFC6455) should work. If such an extension is introduced, it would be just
> considered to be incompatible with PMCEs, or that extension should describe
> how to coordinate with change on PMCE in the intermediaries section of its
> RFC.
>
> the opening handshake is preserved in the whole path to the peer endpoint."
>
>
> referring to this to-be-RFC) like the section defining terms to complement
> RFC6455 [1]?
>
>  [1]

---

From: Takeshi Yoshino <[email-masked]>
Date: Wed, 22 Jul 2015 20:51:15 +0900

HyBi people,

Please respond to this thread if you want to keep the section as-is (or
with some improvement. texts welcome).

I plan to revise it by replacing with a warning (saying "don't change the
compression unless you don't know it") unless anyone objects to it.

Takeshi

On Tue, Jul 14, 2015 at 5:32 PM, Takeshi Yoshino <[email-masked]>
wrote:

> I've been viewing the PMCE from the view point of a browser developer.
> Like fragmentation, permessage-deflate is also just a transport-level thing
>> just not to disallow change of compression but there's nothing in RFC6455
>> that guarantees that such transformation doesn't cause any issue with other

---

From: Barry Leiba <[email-masked]>
Date: Wed, 29 Jul 2015 14:09:13 +0200

(Trimming CC list...)

> HyBi people,
>
> Please respond to this thread if you want to keep the section as-is (or with
> some improvement. texts welcome).
>

Takeshi, the energy level of the HyBi group is so low at this point
that I think you should work out suitable text with Robert and
Stephen, post it as a revised I-D, and then call for reviews -- with
silence taken as agreement at this point.

Can you do that quickly, and have it resolved before, say, 12 August?

Barry

---

From: Takeshi Yoshino <[email-masked]>
Date: Wed, 29 Jul 2015 23:47:56 +0900

> Can you do that quickly, and have it resolved before, say, 12 August?

Got it, Barry. I'll do so.

---

From: "Alexander Philippou" <[email-masked]>
Date: Wed, 29 Jul 2015 19:22:32 +0300

+1

Alexander

> -----Original Message-----
> From: hybi [mailto:[email-masked]] On Behalf Of Barry Leiba
> Sent: Wednesday 29 July 2015 15:09
> To: Takeshi Yoshino <[email-masked]>
> Cc: [email-masked]; Stephen Farrell <[email-masked]>; Robert Sparks
> <[email-masked]>
> Subject: Re: [hybi] [secdir] Secdir review of draft-ietf-hybi-permessage-
> compression-22
> 
> (Trimming CC list...)
> 
> > HyBi people,
> >
> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi

---

From: Takeshi Yoshino <[email-masked]>
Date: Thu, 30 Jul 2015 01:49:24 +0900

Hi Joakim,

On Thu, Jul 30, 2015 at 12:24 AM, Joakim Erdfelt <[email-masked]> wrote:

> Speaking on behalf of Eclipse Jetty ...
>
> We do not yet have a working permessage-deflate, we have determined that
> the existing spec (as currently written) is hostile towards the built-in
> (native) deflate apis in Java (based on evidence collected during autobahn
> testsuite for permessage-deflate)
>

Is the issue what you've described in
https://www.ietf.org/mail-archive/web/hybi/current/msg10179.html ?

>
> To fix this, our current solution would be to implement this as a custom,
> 100% java, deflate algorithm (which is *very* undesirable)
>
> We don't say much about the permessage-deflate, because we cannot
> participate with others that have it implemented.
> We briefly experimented with JNI layer to zlib directly, but our own
> experiments showed that not using this layer we got better performance.
> Interest from our community on permessage-deflate is very low as well.
>
>
> Joakim Erdfelt / [email-masked]
>
> On Wed, Jul 29, 2015 at 7:47 AM, Takeshi Yoshino <[email-masked]>
> wrote:
>