Re: [OAUTH-WG] Indicating origin of OAuth credentials to combat login CSRF

Eran Hammer-Lahav <eran@hueniverse.com> Thu, 24 March 2011 21:53 UTC

Return-Path: <eran@hueniverse.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 785E428C134 for <oauth@core3.amsl.com>; Thu, 24 Mar 2011 14:53:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.09
X-Spam-Level:
X-Spam-Status: No, score=-2.09 tagged_above=-999 required=5 tests=[AWL=-0.575, BAYES_00=-2.599, HTML_MESSAGE=0.001, URIBL_RHS_DOB=1.083]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o-U9QPFk6DFm for <oauth@core3.amsl.com>; Thu, 24 Mar 2011 14:53:22 -0700 (PDT)
Received: from p3plex1out02.prod.phx3.secureserver.net (p3plex1out02.prod.phx3.secureserver.net [72.167.180.18]) by core3.amsl.com (Postfix) with SMTP id 00CB428C10E for <oauth@ietf.org>; Thu, 24 Mar 2011 14:53:21 -0700 (PDT)
Received: (qmail 13765 invoked from network); 24 Mar 2011 21:54:56 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.21) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 24 Mar 2011 21:54:56 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.19]) by P3PW5EX1HT003.EX1.SECURESERVER.NET ([72.167.180.21]) with mapi; Thu, 24 Mar 2011 14:54:46 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>, OAuth Mailing List <oauth@ietf.org>, "websec@ietf.org" <websec@ietf.org>
Date: Thu, 24 Mar 2011 14:54:38 -0700
Thread-Topic: [OAUTH-WG] Indicating origin of OAuth credentials to combat login CSRF
Thread-Index: AcvUgCPYCfnEh2l8Tj+BafbhN2rcIQV7eaqQ
Message-ID: <90C41DD21FB7C64BB94121FBBC2E7234465642FE30@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <255B9BB34FB7D647A506DC292726F6E1127DCD2142@WSMSG3153V.srv.dir.telstra.com>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E1127DCD2142@WSMSG3153V.srv.dir.telstra.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_90C41DD21FB7C64BB94121FBBC2E7234465642FE30P3PW5EX1MB01E_"
MIME-Version: 1.0
Subject: Re: [OAUTH-WG] Indicating origin of OAuth credentials to combat login CSRF
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Thu, 24 Mar 2011 21:53:27 -0000

Was there any conclusion?

EHL

From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Manger, James H
Sent: Thursday, February 24, 2011 4:09 PM
To: OAuth Mailing List; websec@ietf.org
Subject: [OAUTH-WG] Indicating origin of OAuth credentials to combat login CSRF

Q. Should an OAuth client app list the authorization server in the Origin header of requests to resource servers?

In OAuth (delegation) flows a server dynamically issues credentials (such as a bearer token) to a client app to use in subsequent HTTP requests to other servers. To combat login cross-site request forgery (CSRF) attacks [1] (where an attacker's server issues the attacker's credentials to a client app to use on behalf of a victim at a legitimate server) the client app needs to indicate where the credentials came from. The Origin header [2] looks like the right place to indicate this.

[For the OAuth list: The Origin HTTP request header "indicates the origin(s) that caused the user agent to issue the request" [http://tools.ietf.org/html/draft-ietf-websec-origin-00#section-6.2].]

[For the WebSec list: An OAuth credential from an authorization server is a bit like a cookie, but not restricted to the same origin.]


Example:

  Client to (malicious) authorization server: ->
    POST /token HTTP/1.1
    Host: login.example.com
    ...
  <-
    HTTP/1.1 200 OK
    ...
    { "access_token": "SlAV32hkKG", ...}

  Client to resource server: ->
    POST /uploadData HTTP/1.1
    Host: api.exampledata.com
    Authorization: BEARER SlAV32hkKG
    Origin: https://login.example.com
    ...


There can be other servers that contribute to a client app making a request. For instance, one server can redirect to another. A Origin request header can list multiple origins. The server will not be able to distinguish which origin issued OAuth credentials from which issued a redirect etc. That might not matter if a server has to trust all the values listed in the Origin header.
Q. Is it the group's expectation that servers checking the Origin header will require all the listed origins to be trusted?

[1] Robust Defenses for Cross Site Request Forgery, http://www.adambarth.com/papers/2008/barth-jackson-mitchell-b.pdf
[2] The Web Origin Concept, http://tools.ietf.org/html/draft-ietf-websec-origin
[3] Principles of the Same Origin Policy, http://tools.ietf.org/html/draft-abarth-principles-of-origin

--
James Manger