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 <> Thu, 31 October 2019 20:16 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AFEAF120255 for <>; Thu, 31 Oct 2019 13:16:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 8q1kE5e-ktIs for <>; Thu, 31 Oct 2019 13:16:43 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CCF6112022C for <>; Thu, 31 Oct 2019 13:16:42 -0700 (PDT)
Received: by with SMTP id p21so7314536wmg.2 for <>; Thu, 31 Oct 2019 13:16:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=Mxxe9b7GXhVZ5GL8mKfpLoIDLyfUoub34jS1HQ6utis=; b=DpCIgA0p5ZRtoA18nH7CG2eyjvET2EPNR7lYupocuSq403ka5CaybzkZXd7875F83y A35zn2i07xVbLDwEGio3Owu+jlIzceIQ3GPJl36HYkg3F06TmMTPEdmTokmW1dMaqPTA Ef7YqeMAsAmkQskRsbZ06YpRUvePtawQ8ok4g=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=Mxxe9b7GXhVZ5GL8mKfpLoIDLyfUoub34jS1HQ6utis=; b=Yyesjb8e3mFfdPz9pcAjyRgy3SYnmvnHYN/xEvpaI9UUbNz6I3XwcdQIa/m5bKCpiu fUQUMTz7f4aM+xc9ED8WkKN2ljAFqcmGGix7lhc9E2IIw9dwuEpreRNyd9DUHDiWqkeJ bcIc5n0UT4XA24g4nP4zi1sVsaTC9+SofWZthpZS76BJ47ES+cUAcTKyPcW169HnTEYw KWlHsIP94s2nBr/WEp00GPK8Mi54QFgKHSXoZiu21z8ItiOD0oM3vtlz+USxzVkpy6Nl 3PseCpMT1X9PlAdhbeXkpUJpY7fYBcv6S2fBERNpjJLD82Uxedia4fITj3020yD4AFnp zwRA==
X-Gm-Message-State: APjAAAUy0p+xZNvn9nuqHMOLMf5EcdYpQsm7hKi++x7XSX2EZi/xUTC2 qHSb3454eyOoIr1i52/hZ/JI+g==
X-Google-Smtp-Source: APXvYqyF1cfbHVlrGrn87F9e8qf5Ux6TzfoIGKd2ukguAbGIPpn8Nysbc6c86enC3ZQsAEaNxxSjxQ==
X-Received: by 2002:a1c:544e:: with SMTP id p14mr6696996wmi.17.1572553001123; Thu, 31 Oct 2019 13:16:41 -0700 (PDT)
Received: from ?IPv6:2a01:4c8:f:b76f:8df3:da5f:6b92:be99? ([2a01:4c8:f:b76f:8df3:da5f:6b92:be99]) by with ESMTPSA id x7sm7941620wrg.63.2019. (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Oct 2019 13:16:40 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-2AEC8239-D615-4BC0-B7E5-97B29305D9DA"
Content-Transfer-Encoding: 7bit
From: Neil Madden <>
Mime-Version: 1.0 (1.0)
Date: Thu, 31 Oct 2019 20:16:39 +0000
Message-Id: <>
References: <>
Cc: "" <>
In-Reply-To: <>
To: "Richard Backman, Annabelle" <>
X-Mailer: iPhone Mail (17A878)
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: Thu, 31 Oct 2019 20:16:47 -0000

On 31 Oct 2019, at 18:55, Richard Backman, Annabelle <> wrote:
> Relying on a fixed, random header name for security, even as a “defense in depth” measure, is dangerous. In order for this mechanism to be effective, the header name must be random (in the cryptographic sense) and must be kept secret. It needs to be withheld from request logs or error logs, either on the reverse proxy or on the service. It cannot be committed to code repositories.

Just like any other bearer token. I mean this is the *OAuth* WG, right? Where we regularly recommend people send bearer tokens in headers? I don’t really understand how that can be considered secure to send over the internet to a cloud service, but suddenly becomes insecure when done inside the firewall within a datacenter between a reverse proxy and an app server. 

I mean, are people honestly suggesting that randomizing header names introduces *new* vulnerabilities that aren’t present when you use a well-known name? “Dangerous” even! 

> Including it as a signed header in request signing algorithms that require an explicit list of signed headers (such as AWS Signature Version 4, draft-cavage-http-signatures, draft-ietf-oauth-signed-http-request) turns that signature metadata into a secret, meaning that it cannot be logged, etc. If signatures are sent to a central authority for processing, that authority must also know not to log the list of signed headers. I could go on, but I hope this is enough to express that there are SO MANY ways that header names can and will be revealed, and they aren’t always obvious.
> What we are talking about is a message authenticity problem. The best practices for providing message authenticity involve applied crypto, e.g., an HMAC or digital signature over the header contents. If an implementation does that, then the random header name is unnecessary. This approach is immune to the sort of misconfiguration scenarios that have been discussed in this thread, as they would result in the reverse proxy failing to provide a properly signed header to the service.

I agree that HMAC signatures are generally better, but which reverse proxies support signing headers?

Actually HMAC signatures do have one significant downside compared to using a random header name - if you forget to validate the signature *nothing fails*. If you mess up the name of a random header then your app doesn’t see any credentials and fails noisily. 

— Neil