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

Benjamin Kaduk <kaduk@mit.edu> Tue, 31 March 2020 02:06 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: secdispatch@ietfa.amsl.com
Delivered-To: secdispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1ACCD3A17EF for <secdispatch@ietfa.amsl.com>; Mon, 30 Mar 2020 19:06:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 s2jd4jZAJ6cu for <secdispatch@ietfa.amsl.com>; Mon, 30 Mar 2020 19:06:34 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 2D58B3A17EE for <secdispatch@ietf.org>; Mon, 30 Mar 2020 19:06:33 -0700 (PDT)
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)
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdispatch/Z8a5s1f50miQ2Kldqkn-HCvwezE>
Subject: Re: [Secdispatch] I-D on dealing with the 3xx XOR 401 problem
X-BeenThere: secdispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Dispatch <secdispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdispatch/>
List-Post: <mailto:secdispatch@ietf.org>
List-Help: <mailto:secdispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Mar 2020 02:06:36 -0000

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