Re: [OAUTH-WG] Redirection in authorization code flow: GET vs POST

Jim Manico <jim@manicode.com> Fri, 11 August 2017 20:17 UTC

Return-Path: <jim@manicode.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 26FD11320E3 for <oauth@ietfa.amsl.com>; Fri, 11 Aug 2017 13:17:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=manicode-com.20150623.gappssmtp.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 QEiAHa60eX2q for <oauth@ietfa.amsl.com>; Fri, 11 Aug 2017 13:17:44 -0700 (PDT)
Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::233]) (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 E8D0513235E for <oauth@ietf.org>; Fri, 11 Aug 2017 13:17:30 -0700 (PDT)
Received: by mail-oi0-x233.google.com with SMTP id x3so43155192oia.1 for <oauth@ietf.org>; Fri, 11 Aug 2017 13:17:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manicode-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IxnxKmFI3Q7iiyztd6mvGegx3dQzug95UGMK4nWtIzE=; b=yCKNzLG2G/BssfH6MbwPsAQEsX2xJoX1WMbdNE08DGC/mTiket+bbQmGBvC39WcvUQ YAFBQ7Gg1Bv/CT/R5k6V7ia2edHIiFHYdeOSJT7uADkjWUbWsfqanCmSE+RGkQJX4VXc 1RGXJc3r7TZSAOjdV7JdqWWYq5YyIPO6o5E556zSJIxpefCz4TWLtlTVLdwiuRChGjlX nemuFmXAJoZ1AEjVSwxVnU/u+/yX/q8uIXah5MGorZqnvzPitszrQxkL/MiefGNEyNVy TLAWlgcbLFtlYNgVxP5syQrAYlExxAMl+8rdvT6VDgwOhNNU8EILaiANhSklhuuUOHie ZtTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IxnxKmFI3Q7iiyztd6mvGegx3dQzug95UGMK4nWtIzE=; b=Aef8UQsK0u65EKtsx5Me1YEveu7ekC4GpNlaSQnD0t5GYffIz+mh2DnkU94fOS5RY2 qx4BsDBM+rnSY3lRytLbeb3QsEmNJpBdu23RMrChgEqbQzFf1TwElgAh2TfUIDIrcYHX uWKF0nRrA5zJqXNjGkBMeJxyKa4yEI93K3xFpWzS+oOnT21M2WIk4Xugd2OJ3q7VJG6O RRNSjsJhsIoFOvKXLD5u6WVpv2eINGmet+ZpMComcFwSRsl1Yh+pydwmZW92ETKY8xk5 yNGlEr9r0ea6nOhimuuHMl48NItyPI7Ve6M7m5h6zHPXfP5QCLx9bZGgZytNLuWOYmnF AUWA==
X-Gm-Message-State: AHYfb5iakya3tW2Oi4U4cnumTR/WUJ1tt5V05IxRpJFP0Cbl6J6cJDHe kts+Tda91pF4I1d7
X-Received: by 10.202.60.133 with SMTP id j127mr18041588oia.7.1502482650264; Fri, 11 Aug 2017 13:17:30 -0700 (PDT)
Received: from [10.186.174.249] (mobile-166-172-120-104.mycingular.net. [166.172.120.104]) by smtp.gmail.com with ESMTPSA id k64sm1524999oif.35.2017.08.11.13.17.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2017 13:17:29 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-203D81B1-DE09-4307-ABDA-D11DA8EBA02D"
Mime-Version: 1.0 (1.0)
From: Jim Manico <jim@manicode.com>
X-Mailer: iPhone Mail (14G60)
In-Reply-To: <CANSMLKGV6O7rJJPtPxP44598rz-RXt4rqt0kGrvtUKsN2DD_jw@mail.gmail.com>
Date: Fri, 11 Aug 2017 15:17:28 -0500
Cc: "oauth@ietf.org WG" <oauth@ietf.org>
Content-Transfer-Encoding: 7bit
Message-Id: <F548ED54-90D3-49DD-BC4C-B42D018176DB@manicode.com>
References: <CANSMLKFFGitCa6f5bqR=Ks-kqf_t=3poFwCMWTtJ=MyvNKUL3A@mail.gmail.com> <CANSMLKGV6O7rJJPtPxP44598rz-RXt4rqt0kGrvtUKsN2DD_jw@mail.gmail.com>
To: Josh Mandel <jmandel@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/vwhV4Afn4IkYykWfBJD9QIpk3vI>
Subject: Re: [OAUTH-WG] Redirection in authorization code flow: GET vs POST
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 11 Aug 2017 20:17:47 -0000

I would take it a step further. GET's leak parameters even over HTTPS. I advise all GET based OAuth communication to be switched to POST, a much more security centric verb.

Aloha,
--
Jim Manico

> On Aug 11, 2017, at 3:08 PM, Josh Mandel <jmandel@gmail.com> wrote:
> 
> Fixing my "with this technique" url: it should have been https://gist.github.com/jmandel/4704d1efed8578a67a6f9b600ffd0c63 .
> 
>> On Fri, Aug 11, 2017 at 4:00 PM, Josh Mandel <jmandel@gmail.com> wrote:
>> Hi All,
>> 
>> I've just encountered a server that performs a redirect (back to the client's redirect_uri) via POST instead of GET. This was surprising behavior to me and broke my client implementation — but citing chapter and verse, the server developer pointed out that https://tools.ietf.org/html/rfc6749#section-1.7 says 
>> 
>>> While the examples in this specification show the use of the HTTP 302 status code, any other method available via the user-agent to accomplish this redirection is allowed and is considered to be an implementation detail.
>> 
>> Is triggering a POST-based redirect (e.g. with this technique) to the redirect_url (including url query parameters for state and code) indeed considered a "method available via the user-agent to accomplish this redirection"? In other words, should a well-behaved OAuth client be prepared to receive GETs as well as POSTs to its redirect_uri? If so, what would be the considerations for a server choosing between GET and POST?
>> 
>> Best,
>> 
>>   Josh
> 
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth