Re: [OAUTH-WG] client certs and TLS Terminating Reverse Proxies (was Re: I-D Action: draft-ietf-oauth-jwt-introspection-response-08.txt)

Neil Madden <> Wed, 30 October 2019 13:57 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5816D1200DE for <>; Wed, 30 Oct 2019 06:57:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id WEBQ_pYKhnkU for <>; Wed, 30 Oct 2019 06:56:58 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 461A0120112 for <>; Wed, 30 Oct 2019 06:56:58 -0700 (PDT)
Received: by with SMTP id e6so581749wrw.1 for <>; Wed, 30 Oct 2019 06:56:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b5jJphLtmg2ct2t5Y7i47pSCbt8a7aysVosXPEk0B/I=; b=XrDq/00VAWvcHvosHzUuNfjs3Z5y/EjBtWkbr6nhJCG9IB1LYOfOvNdvBnYCqxRFAh moGbZbzM26pVC4aTHJpJNJzpTQPA3PSfyTdtF39rMs6Hzf6d4VjA1vc2k8oaOUZYeUXs 3vdNB+BsBDUA9sqvctAr6Jio7f5+4aUA+8inA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b5jJphLtmg2ct2t5Y7i47pSCbt8a7aysVosXPEk0B/I=; b=BW/wC9B/cBrU5IVDWwpBCgmdZYvYPKZLsxN2Sa2AXTX5x/bCCsogZ3YRRRuBwLN6xT w+IImMQoZLjo24NhQkXNNNKNgqE73xxXyG0WhpPH33hjfND3hSA55JNd4xI17gw5/m74 TP6f9uGqAZACTUOialOGz/IaBnmdbscorhHEUKtHoJRqhvrY7k8k39oLXx7NP5Ql908t Gw0mRDBPYfdvdGkc9roA2QnE5sugrAzfhEZ18ECF3dKuWzXkWHeL5FEx/IHoDkUsMbst dOlHHdc06t9f7aFoGk0aLB81cvC3+zuhd1Gw9Xc/3Kwj8AzaWrnkB2jLP11u5jB26eIj mgOg==
X-Gm-Message-State: APjAAAU5XEBTb/EiNmNHz4MiOComuk6VzxjL7qPLyIJIZSCmzHfRIBW1 Y/sHFO5iUE7pqQVyug8GrvAQTQ==
X-Google-Smtp-Source: APXvYqzyU3ZBLt/Wm5iOYKnhJjm05pVFnQroiyVm8cM6Iq1qvdwLVNbbkRLeDxIajUS1rGmSu9tTDw==
X-Received: by 2002:adf:fbc4:: with SMTP id d4mr6941683wrs.265.1572443816587; Wed, 30 Oct 2019 06:56:56 -0700 (PDT)
Received: from [] ( []) by with ESMTPSA id u10sm161808wmj.0.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 06:56:55 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Neil Madden <>
In-Reply-To: <>
Date: Wed, 30 Oct 2019 13:56:54 +0000
Cc: Brian Campbell <>, oauth <>
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <>
To: Justin Richer <>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <>
Subject: Re: [OAUTH-WG] client certs and TLS Terminating Reverse Proxies (was Re: I-D Action: draft-ietf-oauth-jwt-introspection-response-08.txt)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 30 Oct 2019 13:57:00 -0000

On 30 Oct 2019, at 13:24, Justin Richer <> wrote:
> All of these problems can be solved, and I think solved better, by securing the connection between the proxy and the back-end. That way the back end will be able look not only for a specific header, but verify that the header came from the proxy itself. An obscure header name is one way to do that, but it has a lot of issues with it, especially since it’s likely to be selected once during set-up and never changed throughout the lifetime of the deployment. I think there are likely much better solutions here, and they’d address this issue without things getting weird.

The issue has nothing to do with the security of the connection between the proxy and the backend. It is to do with data origin authentication of the headers themselves. All of the headers arrive at the backend over the same connection, but only some of them were created by the proxy. There are undoubtedly better alternatives - e.g. using a shared secret to compute a HMAC over security sensitive headers and include that as an additional header or field. But an unguessable header name is *simple* and effective and works right now with widely implemented functionality. 

There's no need for the header name to ever change - the secret is not exposed to untrusted parties and is a defense-in-depth rather than a primary defense. I also don't know why you consider this a "weird" solution - it's a simple pragmatic solution to a fairly widespread class of security vulnerabilities. It also has the benefit that it forces the backend to "validate" the secret, because it won't find the header if it gets it wrong, whereas it is much easier to forget to validate a HMAC tag. I'll take simple and weird over missing and broken any day.

> And one of the best things about a standard is that you’re still free to completely ignore it if you want to, so people can and will keep following whatever proprietary patterns they want to. But at least a standard mechanism would give us a way to say to newcomers and veterans alike “No really, here’s a way that we all agree works and has these properties”. 

I'm not arguing against a standard, just against a standard that makes it harder to mitigate known security vulnerabilities.

-- Neil