Re: MITM and proxy messages [was: Call for Adoption: draft-song-dns-wireformat-http]

Kari hurtta <hurtta-ietf@elmme-mailer.org> Sun, 07 August 2016 20:16 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 91B1112D196 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 7 Aug 2016 13:16:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.168
X-Spam-Level:
X-Spam-Status: No, score=-8.168 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.247, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qKx-2rxEOnSk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 7 Aug 2016 13:16:42 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AE75212B037 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 7 Aug 2016 13:16:42 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bWUR9-0007Mr-NU for ietf-http-wg-dist@listhub.w3.org; Sun, 07 Aug 2016 20:12:43 +0000
Resent-Date: Sun, 07 Aug 2016 20:12:43 +0000
Resent-Message-Id: <E1bWUR9-0007Mr-NU@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <khurtta@welho.com>) id 1bWUR3-0007MA-FP for ietf-http-wg@listhub.w3.org; Sun, 07 Aug 2016 20:12:37 +0000
Received: from welho-filter3.welho.com ([83.102.41.25]) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <khurtta@welho.com>) id 1bWUQz-0007z7-Lk for ietf-http-wg@w3.org; Sun, 07 Aug 2016 20:12:36 +0000
Received: from localhost (localhost [127.0.0.1]) by welho-filter3.welho.com (Postfix) with ESMTP id 2B8131031B; Sun, 7 Aug 2016 21:58:06 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter3.welho.com [::ffff:83.102.41.25]) (amavisd-new, port 10024) with ESMTP id Rec2ZSaZSh3G; Sun, 7 Aug 2016 21:58:05 +0300 (EEST)
Received: from hurtta09lk.keh.iki.fi (89-27-35-245.bb.dnainternet.fi [89.27.35.245]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPS id 44C162316; Sun, 7 Aug 2016 21:58:05 +0300 (EEST)
In-Reply-To: <20160807174535.ahcpwzgrxjlysl7z@LK-Perkele-V2.elisa-laajakaista.fi>
References: <20160807174535.ahcpwzgrxjlysl7z@LK-Perkele-V2.elisa-laajakaista.fi>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Date: Sun, 07 Aug 2016 21:58:05 +0300
Sender: hurtta@hurtta09lk.keh.iki.fi
From: Kari hurtta <hurtta-ietf@elmme-mailer.org>
CC: "Walter H." <Walter.H@mathemainzel.info>, Kari hurtta <hurtta-ietf@elmme-mailer.org>, HTTP working group mailing list <ietf-http-wg@w3.org>
X-Mailer: ELM [version ME+ 2.5 PLalpha41]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
Message-Id: <20160807185806.2B8131031B@welho-filter3.welho.com>
Received-SPF: none client-ip=83.102.41.25; envelope-from=khurtta@welho.com; helo=welho-filter3.welho.com
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, RP_MATCHES_RCVD=-0.432, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1bWUQz-0007z7-Lk b9a6acc5bf7f1242f9646ba68dc7a95c
X-Original-To: ietf-http-wg@w3.org
Subject: Re: MITM and proxy messages [was: Call for Adoption: draft-song-dns-wireformat-http]
Archived-At: <http://www.w3.org/mid/20160807185806.2B8131031B@welho-filter3.welho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32213
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0393.html

| And for http://, yes, the page will be displayed in browsers,
| but authority of response will be misinterpretted, creating other
| problems. In non-browsers, this can really create a mess.

application/proxy-explanation+json does not necessary work for
http://

https://mnot.github.io/I-D/proxy-explanation/#rfc.section.4

| They can be mitigated in a few ways:
| 
| ∙    Not displaying the moreinfo member in situations 
|      when this is possible (i.e., on any response other 
|      than that to a CONNECT on an encrypted connection).
| 
| ∙    Not supporting the 
|      application/proxy-connection+json media type when the 
|      method is not CONNECT and the connection is not 
|      encrypted.
| 
| ∙    Cautioning the user that the content might not be 
|      trustworthy.

I has some suggestions with that

https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0303.html
https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0306.html


But because Connection: seems not be implemented, this does not really
work.

/ Kari Hurtta


-------------------------------------------------------------------------
Date: Wed, 2 Mar 2016 07:08:46 +0200 (EET)
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>

Thomas Mangin <thomas.mangin@exa-networks.co.uk>: (Tue Mar  1 17:32:22 2016)
>>> Otherwise when browser is configured to use proxy and
>>> URL is http, browser do not use CONNECT but original
>>> http -method (GET and so on). Given url just is
>>> absolute.
> 
> Client implementations are able to use CONNECT when requesting HTTP 
> through a proxy but the major implementations choose not to do so.
> Changing this behaviour is probably inadvisable as current proxies will 
> most likely simply drop the connection when getting a CONNECT message 
> for HTTP page.
> 
> And while the feature is most useful for CONNECT with HTTPS, and while 
> it is likely that some proxies will continue to prefer ‘branded’ 
> HTML pages, allowing the use of this answer on non CONNECT request may 
> also hold value as promoting homogeneity to the user experience between 
> HTTP and HTTPS.
> 
> Thomas

https://mnot.github.io/I-D/proxy-explanation/

| This approach does not preclude an origin server presenting itself as a 
| the proxy, in cases where the client supports the 
| media type on requests other than CONNECT.

If homogeneity of the user experience is desired (as I suggested)
and there is need for avoid origin server presenting itself
as a proxy (for example when request method was GET), there
is possibility to use nonce.

This is perhaps overengineering here:

Register new header field for that nonce.

Browser may include that on request when it is using proxy:

New-header-field: nonce-value
Connection: new-header-field

Connection header field prevents origin server seeing
this (if proxy follows HTTP/1.1 -- I do not know how 
this play with HTTP/2, but HTTP/2 is likely to be used 
only  with encrypted connections / with CONNECT method. )

Given nonce-value can be included to application/proxy-explanation+json
as own member.

( Header field name should be something short like
  'proxy-nonce', I think. )

| Clients SHOULD indicate that they support this media type by including it 
| in the field-value of the Accept request header 
| field [RFC7231] of all supported requests.

To reduce fingerprinting and request size, browser probably use just */* as 
Accept -header value. 

( I notice that also this new nonce header field ('proxy-nonce' for example) 
  may work as indicator that application/proxy-explanation+json is supported 
  by browser. )

/ Kari Hurtta