Re: [Unbearable] Dealing with header injection through reverse proxies

Piotr Sikora <piotrsikora@google.com> Tue, 18 July 2017 09:23 UTC

Return-Path: <piotrsikora@google.com>
X-Original-To: unbearable@ietfa.amsl.com
Delivered-To: unbearable@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A2B4131945 for <unbearable@ietfa.amsl.com>; Tue, 18 Jul 2017 02:23:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 I0IGFP3bXXMf for <unbearable@ietfa.amsl.com>; Tue, 18 Jul 2017 02:23:41 -0700 (PDT)
Received: from mail-ua0-x22f.google.com (mail-ua0-x22f.google.com [IPv6:2607:f8b0:400c:c08::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 418D6131A67 for <unbearable@ietf.org>; Tue, 18 Jul 2017 02:23:41 -0700 (PDT)
Received: by mail-ua0-x22f.google.com with SMTP id y47so1137828uag.0 for <unbearable@ietf.org>; Tue, 18 Jul 2017 02:23:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FGL7N6oYtCPhiVOp9aFcVoFgD1pkDDHgjpTstfpAzUg=; b=Re16EI3fGlDhZCp4e0UC4Jk1O1zQR4owJDjZvlgy0zSRui4gdh9yGIBvDKAChsonpA UoG4HS47D9qWkVvTYMG7kvlzM70O5HyieWBTJ/2mBSGgJbtxAgRUXBMRuJ7z3tRVdxgv BSG3cQqSt4/3NNPb7RW8sH+nJS/w7NmNPj0nQb3gUrk1+l0CKdEr2GdNYmaoPdW8yXQh hYA7Hr+G6WEjq0+4qywTYFSzxJwZ4Pg/PxPPAscf3qccc/ULaKFE/5wJjqRW4P0oJWlV piJvczjEMz9WXuBFKANCnugABPDhJdZIusuvBqno8DTg98ssv/iw2X/pZ4/pauh3dtQc /KBQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FGL7N6oYtCPhiVOp9aFcVoFgD1pkDDHgjpTstfpAzUg=; b=kicktd/choQ9GZ2WYea/ql04+1ySXVRbVjvybC+/l4G8jkW0geQh0eF4tnfQbgVvCf aJP1eELtUfRWKoSmI352DLvrAU/d/eypLvLUgtUwXi06dmNZPqiGhZoyAvHuIeSrlSfd aocFF41RHaFZx+0TfOOe5zbNuFXVEUNebaBcDvFmGnPk8ZZ+nJNrbpuR5r6NelxUrjqW LZSk+5PyCKPIrd3A2tjHtN3a2mYpHmLsxyyU8OD/8UbQL3tvI5n0cEWg3hwLH7NRYftx qTlmJM+RVV6VYKtI+GWdxsQ1bgq8i0JCH99wchXcuyPdtKfpaPMqEzcwqlabWyErujIE gdzw==
X-Gm-Message-State: AIVw1131aCzaOE8TnYN5RjZiGqD/RNGDPUhefu8FoKmbY51Ywv+PXCTi Ackq/7MW93jryHXXGxUEt/ipUeHgQZPQ
X-Received: by 10.159.49.19 with SMTP id m19mr384257uab.46.1500369820107; Tue, 18 Jul 2017 02:23:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.176.67 with HTTP; Tue, 18 Jul 2017 02:23:39 -0700 (PDT)
In-Reply-To: <CA+k3eCTRNebzWO-vf30sp6MZU=yL_rR62-PG8gwn2zW0VZAiaA@mail.gmail.com>
References: <CABcZeBNK4zHCR4V8cRAJBxC0AiVpep8HWoX8Ntnr9ZTZGq8S+A@mail.gmail.com> <CA+k3eCTRNebzWO-vf30sp6MZU=yL_rR62-PG8gwn2zW0VZAiaA@mail.gmail.com>
From: Piotr Sikora <piotrsikora@google.com>
Date: Tue, 18 Jul 2017 11:23:39 +0200
Message-ID: <CAF-CG++cRmry8eZ8H7n3XVf5VDR4pjiQw4UiXeGVr8ugeT+O_g@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>
Cc: Eric Rescorla <ekr@rtfm.com>, IETF Tokbind WG <unbearable@ietf.org>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/unbearable/kL6jPEAv_QIcVYx9Hu6RTe5VtCg>
Subject: Re: [Unbearable] Dealing with header injection through reverse proxies
X-BeenThere: unbearable@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "\"This list is for discussion of proposals for doing better than bearer tokens \(e.g. HTTP cookies, OAuth tokens etc.\) for web applications. The specific goal is chartering a WG focused on preventing security token export and replay attacks.\"" <unbearable.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/unbearable>, <mailto:unbearable-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/unbearable/>
List-Post: <mailto:unbearable@ietf.org>
List-Help: <mailto:unbearable-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/unbearable>, <mailto:unbearable-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Jul 2017 09:23:43 -0000

Hey Brian,

> I perhaps didn't articulate it well in the meeting yesterday but I'd like to
> reiterate that, in my opinion and I don't think I'm alone, it would be very
> inappropriate for -tokbind-ttrp to define a one-off mechanism for the origin
> server to detect client injection of the headers. The potential problem of
> client header injection is not at all unique to the functionality of that
> draft so the draft shouldn't define a unique solution. It would be useful if
> there were a common standardized mechanism for doing detecting/preventing
> client header injection that the -tokbind-ttrp draft could refer to (the
> generic solution that Ekr mentions in his [1] seems preferable precisely
> because it is generally applicable). In the absence of a generic solution
> existing currently, stripping/sanitizing the headers is the de facto means
> of dealing with the situation in practice today, is sufficient when properly
> implemented, and is normatively required by the text in -tokbind-ttrp. It's
> true that, if the reverse proxy is defective/misconfigured, it doesn't fail
> safe but in the context of -tokbind-ttrp that failure mode is far from
> catastrophic. Such a failure loses the protections afforded by token
> binding, which is not ideal, but it is the current state of just about
> everything on the web today so it's not *that* bad.

I agree. I don't believe that TOKBIND-TTRP draft should be blocked on this.

Best regards,
Piotr Sikora