Re: [Secdispatch] I-D on dealing with the 3xx XOR 401 problem

Benjamin Kaduk <kaduk@mit.edu> Tue, 31 March 2020 02:09 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 58B5D3A17F5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 30 Mar 2020 19:09:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.751
X-Spam-Level:
X-Spam-Status: No, score=-0.751 tagged_above=-999 required=5 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 9M0ufVpwiuHT for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 30 Mar 2020 19:09:23 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CB3633A089D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 30 Mar 2020 19:09:23 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jJ6Ij-0001pu-Bc for ietf-http-wg-dist@listhub.w3.org; Tue, 31 Mar 2020 02:06:49 +0000
Resent-Date: Tue, 31 Mar 2020 02:06:49 +0000
Resent-Message-Id: <E1jJ6Ij-0001pu-Bc@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <kaduk@mit.edu>) id 1jJ6Ii-0001pC-2q for ietf-http-wg@listhub.w3.org; Tue, 31 Mar 2020 02:06:48 +0000
Received: from outgoing-auth-1.mit.edu ([18.9.28.11] helo=outgoing.mit.edu) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <kaduk@mit.edu>) id 1jJ6Ie-0002fy-S2 for ietf-http-wg@w3.org; Tue, 31 Mar 2020 02:06:47 +0000
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 02V26T3c007967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Mar 2020 22:06:32 -0400
Date: Mon, 30 Mar 2020 19:06:29 -0700
From: Benjamin Kaduk <kaduk@mit.edu>
To: ietf-http-wg@w3.org
Cc: secdispatch@ietf.org
Message-ID: <20200331020629.GD50174@kduck.mit.edu>
References: <20200329043333.GO18021@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20200329043333.GO18021@localhost>
User-Agent: Mutt/1.12.1 (2019-06-15)
X-W3C-Hub-Spam-Status: No, score=-7.2
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1jJ6Ie-0002fy-S2 4978b0af50fdca840ec8548412b86d5b
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Secdispatch] I-D on dealing with the 3xx XOR 401 problem
Archived-At: <https://www.w3.org/mid/20200331020629.GD50174@kduck.mit.edu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37488
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Sat, Mar 28, 2020 at 11:37:48PM -0500, Nico Williams wrote:
> I've just submitted draft-williams-http-accept-auth-and-redirect-00 [0]
> to deal with the problem of the mutual exclusivity of 3xx and 401.
> 
> This problem arises when, for example, one mixes in some organization,
> both Negotiate [RFC4559] and redirect-based authentication flows.  This
> problem is rather vexing: the server has to decide which to go with
> without knowing which the user-agent supports!
> 
> The solution seems simple: let the user-agent tell the server what
> authentication schemes it supports.  (Indeed, one common hack is to
> glean this from the user-agent string.)  As well, let the server mix
> redirection and authentication requests.
> 
> As well, while we're at it, why not codify redirect-based
> authentication.  In particular, the PowerShell HTTP command-line client,
> Invoke-WebRequest [1] has an option to copy Authorization headers from
> redirect responses to redirected requests, which seems like just the
> ticket:
> 
> |   -PreserveAuthorizationOnRedirect
> |
> |   Indicates the cmdlet should preserve the Authorization header, when
> |   present, across redirections.
> |
> |   By default, the cmdlet strips the Authorization header before
> |   redirecting. Specifying this parameter disables this logic for cases
> |   where the header needs to be sent to the redirection location.
> 
> ISTR seeing a prohibition on copying headers from redirect responses to
> redirected requests, but I can't find this now.  Digest [RFC2617]
> actually describes the Authorization-copying behavior in a paragraph
> that straddles pages 17 and 18, using the "domain" parameter of Digest
> to effect a redirection.
> 
> This I-D then adds an Accept-Auth request header, and an HTTP

Interestingly, I was just thinking about whether such an Accept-Auth header
would be useful in the context of Rick's SASL proposal that was presented
at SECDISPATCH last week.  Perhaps along with a way for the server to
annotate that various (e.g., linked) resources will require a given
authentication mechanism, there might be a route to improving the UX in
this space ... though there's a long way for it to go, so I don't know that
these in and of themselves will make a huge difference.

-Ben

> authentication scheme named Redirect, and codifies other ways to mix
> redirection and authentication requests.
> 
> This I-D seems trivial enough to go the ISE route, but perhaps some WG,
> such as HTTPbis, might be interested in taking a closer look, reviewing,
> possibly leading to request not to publish (if, e.g., there's already a
> solution I've missed or this is problematic for some reason), or to
> adopting the work.
> 
> Cc'ed is secdispatch@ietf.org, in case they want to dispatch this I-D.
> Reply-To is set to HTTPbis.
> 
> See also [2].
> 
> Feedback would be greatly appreciated.  Stay safe!
> 
> [0] https://tools.ietf.org/html/draft-williams-http-accept-auth-and-redirect-00
>     https://www.ietf.org/internet-drafts/draft-williams-http-accept-auth-and-redirect-00.txt
> 
> [1] https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7
> 
> [2] https://mailarchive.ietf.org/arch/msg/art/T4nP5Rv91yuE0ew8p0vJh2fX1IM/
> 
> Nico
> -- 
> 
> _______________________________________________
> Secdispatch mailing list
> Secdispatch@ietf.org
> https://www.ietf.org/mailman/listinfo/secdispatch