Re: Alt-Svc + Proxy Pac

Patrick McManus <mcmanus@ducksong.com> Fri, 03 April 2015 21:07 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 543C21A1BB3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 Apr 2015 14:07:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.289
X-Spam-Level:
X-Spam-Status: No, score=-6.289 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 NxDAFtEDFuWo for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 Apr 2015 14:07:45 -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 8274E1A1B8E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 3 Apr 2015 14:07:45 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Ye8lf-00088h-L2 for ietf-http-wg-dist@listhub.w3.org; Fri, 03 Apr 2015 21:04:43 +0000
Resent-Date: Fri, 03 Apr 2015 21:04:43 +0000
Resent-Message-Id: <E1Ye8lf-00088h-L2@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <mcmanus@ducksong.com>) id 1Ye8lc-00087w-2h for ietf-http-wg@listhub.w3.org; Fri, 03 Apr 2015 21:04:40 +0000
Received: from li629-102.members.linode.com ([192.155.95.102] helo=linode64.ducksong.com) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <mcmanus@ducksong.com>) id 1Ye8lb-00017e-1j for ietf-http-wg@w3.org; Fri, 03 Apr 2015 21:04:39 +0000
Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by linode64.ducksong.com (Postfix) with ESMTPSA id F0EC33A07F for <ietf-http-wg@w3.org>; Fri, 3 Apr 2015 17:04:16 -0400 (EDT)
Received: by qgeb100 with SMTP id b100so58879510qge.3 for <ietf-http-wg@w3.org>; Fri, 03 Apr 2015 14:04:16 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.229.122.199 with SMTP id m7mr4912318qcr.22.1428095056558; Fri, 03 Apr 2015 14:04:16 -0700 (PDT)
Received: by 10.140.94.7 with HTTP; Fri, 3 Apr 2015 14:04:16 -0700 (PDT)
In-Reply-To: <CAJ_4DfTBn=QZy=219FDsT-+bHyK-9qfcUfgdxAJFZwN=-JUpNQ@mail.gmail.com>
References: <CAJ_4DfS5J0k-G_fY46R=8jJDbppC8EfvAmLCaeccPFudOfFM0g@mail.gmail.com> <CABkgnnWXR7H1oZWLLT7ZhoOtPZjVVDnYaqTYACBkoVQ2scrKJA@mail.gmail.com> <CAJ_4DfTBn=QZy=219FDsT-+bHyK-9qfcUfgdxAJFZwN=-JUpNQ@mail.gmail.com>
Date: Fri, 03 Apr 2015 17:04:16 -0400
Message-ID: <CAOdDvNq9cp_bAYy_F_1nA0cHNKfxWVEi5uqmDoZiGoyxjtnvZA@mail.gmail.com>
From: Patrick McManus <mcmanus@ducksong.com>
To: Ryan Hamilton <rch@google.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a113399048d43010512d84a7d"
Received-SPF: none client-ip=192.155.95.102; envelope-from=mcmanus@ducksong.com; helo=linode64.ducksong.com
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: AWL=-2.116, HTML_MESSAGE=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1Ye8lb-00017e-1j 271e1cf9cd4a794ca671b621a6bac727
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Alt-Svc + Proxy Pac
Archived-At: <http://www.w3.org/mid/CAOdDvNq9cp_bAYy_F_1nA0cHNKfxWVEi5uqmDoZiGoyxjtnvZA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29245
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>

On Fri, Apr 3, 2015 at 4:50 PM, Ryan Hamilton <rch@google.com> wrote:

> Consider the following scenario. There are two servers,
> internal.example.com and external.example.com. Inside the enterprise
> access to resources outside the firewall must go through a proxy, whereas
> resource inside the firewall can go direct. That would lead to a .pac file
> like:
>
> function FindProxyForURL(url, host) {​
>
> ​  if (host == "internal.example.com") {
>     return "DIRECT";
>   }
>   return "PROXY proxy.example.com";
> }​
>
>
> If Alt-Svc for internal says, "Alt-Svc: h2="external.exmple.com:443",
> then ​the proxy will say, "Sure, go direct to http://internal.example.com/"
> but then the browser will connect to external.example.com:443 and will
> avoid the proxy and the request will hang. This seems a bit unfortunate,
> but it's not clear that the alternative is much better, so I'm happy to do
> this, if that's the consensus of the group.
>


The browser is supposed to validate the alternate service (among other
things by checking that it has a cert valid for the origin) before using it
and fall back if it is unavailable. So it seems that
external.example.com:443 could not be validated in your example and if
perhaps that validation were stale, it should get automagically cleaned up.

I would be very cautious about ever changing url based on alt-svc.. alt-svc
does not change origins or urls. If it did, it would get very hard to
reason about. but supplying the alt information explicitly seems a lot more
interesting. Somebody should really write up a I-D for a modern PAC (that
could be me, but realistically a lot of other things would have to come off
the todo list first.)