Re: [OAUTH-WG] Call for Adoption

Nat Sakimura <sakimura@gmail.com> Wed, 27 January 2016 18:15 UTC

Return-Path: <sakimura@gmail.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C333E1B2A1C for <oauth@ietfa.amsl.com>; Wed, 27 Jan 2016 10:15:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
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 B31-s9uVv2sw for <oauth@ietfa.amsl.com>; Wed, 27 Jan 2016 10:15:41 -0800 (PST)
Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (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 C99E91B2A1A for <oauth@ietf.org>; Wed, 27 Jan 2016 10:15:40 -0800 (PST)
Received: by mail-qk0-x22b.google.com with SMTP id s68so6890879qkh.3 for <oauth@ietf.org>; Wed, 27 Jan 2016 10:15:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=eDnn5uVu3KfQvj5Ch7tsFN7zDIidj3z3V09NwM3Nfqg=; b=owIrb1o7/Gw6PTl4SfI2dqULpqP8Sn7HD8g1YzWYNrVkB3eEGgciVqOsT4i4TMLQoo PcYqKyBUcq4eBRpMB4sRZ8aXoG26j7cbJGw/+YU1mh4Xbpl9ulZw9BqA4Oslg+cBe+x4 a5nuawTGbbCWHbL7ARIFhYyaMLiBWKhFcDiWUIMVmEzjtDt6oN6mptgbrz/LMoQI0cFw 0cqHnkdefocCw//ys1kx1tZbS1xhb4KRzLw+S6KGQN1kXbyVigrA/LBNkgzXyJ180iB3 9zvoxDH0mRBirCyvm4rAzT9agtq2NIop6XbVFpnyxQd3Btm80eeGn0pIUv0qRIZh7/F9 YMcQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; bh=eDnn5uVu3KfQvj5Ch7tsFN7zDIidj3z3V09NwM3Nfqg=; b=UwpPPiVMumDFyq4YilckHTGVaV71zij4KAEIwMRH+z5vNZOVrdBr0b0KQB2BiHfvpt l4POIPzmj+un77W8HznR1qSMkQr/NkPpQkT7MxnP6FWBqStN+GlYwh+G9ZzypnKvlPzz jj4L3VxVIR2Rqo/GZLF9kOFgd8M2UPLIYG/cDyeFGrWMSfMH/TQJwAFmiwXDqTnx7tqz IO1aneiKQ1U1iVPM57ctRGx4FgEOJKav29fN+PfH56M2tIxq84EQZdoS2y7hmQpIpmcK oqEWsSs2jWnUaY8+7KzPrvFiovtPAkvfNt+jL1hbBvTQ7KV1TeSPAPAMiuosGCCgmy7y 0smA==
X-Gm-Message-State: AG10YOSi+Jjz3tgsd8JS5pdinMFp8XJGxrSE7ZsvAWlyEdtKWrykwK59FmncnFM4IoW/aWqE3WMX9DyVZxMIwg==
X-Received: by 10.55.209.27 with SMTP id s27mr3765825qki.55.1453918539950; Wed, 27 Jan 2016 10:15:39 -0800 (PST)
MIME-Version: 1.0
References: <569E2076.2090405@gmx.net> <CABzCy2DehwZh2gd_6oNy69O+qxowva00qZWnX8uWX2n4h+kPLw@mail.gmail.com> <BY2PR03MB442EA7CE4F9728C2E39BBEAF5C30@BY2PR03MB442.namprd03.prod.outlook.com> <EE414329-AA2A-4F99-841B-0581E4F4605F@mit.edu> <CABzCy2A9RCONixTG+ZFD8sz6FTD-o1Do8iV2gX2=pKu+PenT-A@mail.gmail.com> <BY2PR03MB442DE057967872C63A56DF8F5C40@BY2PR03MB442.namprd03.prod.outlook.com> <CABzCy2Co2okoC_hxy3bLTzbGm3nuQiULM3XqkJMwiV_5iU9-=Q@mail.gmail.com> <CA+k3eCSfXQng6PzhWR-Qjyp=SO1LYnfXH7qqzb-5btqWaJJX-A@mail.gmail.com> <BY2PR03MB4422882B74ED659DB47CECDF5C40@BY2PR03MB442.namprd03.prod.outlook.com> <CABzCy2CC8jN6kzxbJ70m900g4J1VW2b65gM_M1dhx6YXfWVhdQ@mail.gmail.com> <CA+k3eCSiEcE-YRG+ej+zJuEHOwqO4oyvvGmKWv5SeMUu4dVPrA@mail.gmail.com> <56A78EEF.4090706@aol.com> <CA+k3eCQh+KfX8+NONECjVj2ZX_e=JFFM4fF7XXcxwWJ-kii9Tw@mail.gmail.com> <56A7C3E8.8080601@aol.com> <CA+k3eCREJUx4Mb_aciKJoq03j0tdmwB2LEPw7GvZA1ZOBNhq+w@mail.gmail.com> <CABzCy2C69JAadYfaZNXgfMaAiJJOuXoKGkC3vC+x8KnhXPHpKw@mail.gmail.com> <56A8794C.2040304@pingidentity.com> <c8c693abce3e7f013d3af38f3b9333fb@gmail.com> <E63EF38B-8A63-4490-8A07-56CD2A3B7E4B@ve7jtb.com> <CA+k3eCT4VneEPSgBX0Ydf=QwUcpHN-2w7rsmQ3gOCs1T44vjvQ@mail.gmail.com>
In-Reply-To: <CA+k3eCT4VneEPSgBX0Ydf=QwUcpHN-2w7rsmQ3gOCs1T44vjvQ@mail.gmail.com>
From: Nat Sakimura <sakimura@gmail.com>
Date: Wed, 27 Jan 2016 18:15:30 +0000
Message-ID: <CABzCy2AKhajiCpJO8FgL1sTLRBvDWjUkj-bzAXaobmBR2FHCsQ@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>, John Bradley <ve7jtb@ve7jtb.com>
Content-Type: multipart/alternative; boundary=001a114798ea1b3189052a54cac3
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/u2cCkFtKXJIXzGWl85pFfRGqSfI>
Cc: oauth <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Call for Adoption
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 27 Jan 2016 18:15:44 -0000

yeah.

But for Google, Microsoft, etc., every RP can whitelist, cannot they? ;-)

Otherwise, for a code phishing attack, you need to implement discovery of
some sort. My thinking before reading your email was:

if( authority(authz_ep)==authority(token_ep) ) {
   get_token(token_ep, code, client_credential);
} else {
    get_token(token_ep_from_discovery(), code, client_credential);
}

where token_ep_from_discovery() either returns the value of the
toke_endpoint member from .well-known/openid-configuration OR the value of
turi parameter in the query.

2016年1月28日(木) 2:03 Brian Campbell <bcampbell@pingidentity.com>;:

> There's at least one smallish deployment that has a different authority
> for the Authorization Endpoint and the Token Endpoint.
>
> from https://accounts.google.com/.well-known/openid-configuration :
>
> {
>  "issuer": "https://accounts.google.com",
>  "authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
>  "token_endpoint": "https://www.googleapis.com/oauth2/v4/token",
>  "userinfo_endpoint": "https://www.googleapis.com/oauth2/v3/userinfo",
>  "revocation_endpoint": "https://accounts.google.com/o/oauth2/revoke",
>  "jwks_uri": "https://www.googleapis.com/oauth2/v3/certs",
>  ...
> }
>
>
>
> On Wed, Jan 27, 2016 at 6:30 AM, John Bradley <ve7jtb@ve7jtb.com>; wrote:
>
>> It think requiring a common authority segment for the authorization
>> endpoint and the token endpoint might work in common cases, but there are
>> legitimate cases where the URI of the Authorization endpoint might be a
>> alias in the case of multi tenants, all using a common token endpoint.
>>
>> The larger problem would be the RS, it is not uncommon to have the AS and
>> RS in different domains,  so with bearer tokens unless you make the same
>> authority restriction for RS then you are not really stoping the attacker.
>>  They can get the AT by impersonating the RS.
>>
>> I think trying to enforce a common origin policy over OAuth would be a
>> bad direction to go.
>>
>> I understand that it seems like a easy fix on the surface, and it works
>> for most of the things people are using OAuth for today, but would be quite
>> limiting over the long term.
>>
>> John B.
>> > On Jan 27, 2016, at 7:31 AM, sakimura@gmail.com wrote:
>> >
>> > Hi Hans,
>> >
>> > Sorry, I mixed up the IdP mix-up attack and the code phishing attack.
>> >
>> > Mandating the Authorization and Token Endpoint being in the same
>> > authority would solve the later without changing the wire protocol.
>> >
>> > For AS mix-up attack, mandating the client to change the redirection
>> endpoint
>> > per AS would solve the problem without change the wire protocol.
>> >
>> > If these are not possible, then we would have to look at changing the
>> > wire protocol. The solution that solves the both cases must
>> > provide the token endpoint URI authoritatively, which means
>> > you have to mandate some variation of discovery mandatory.
>> >
>> > Nat
>> >
>> >
>> > At 2016-01-27 17:01  Hans Zandbelt wrote:
>> >> I don't see how that can deal with the specific form of the attack
>> >> where the Client would have sent the authorization request to the
>> >> legitimate authorization endpoint of a compromised AS and believes it
>> >> gets the response from that, where in fact it was redirected away to
>> >> the good AS.
>> >> IOW, I don't think this is so much about mixing up endpoints where to
>> >> send stuff to, but mixing up the entity/endpoint from which the Client
>> >> believes the response was received. That may just be terminology
>> >> though.
>> >> Bottom line as far as I see is that a wire protocol element in the
>> >> response is needed to tell the Client who issued it, regardless of how
>> >> the Client deals with configuration of the AS information.
>> >> Hans.
>> >> On 1/27/16 1:31 AM, Nat Sakimura wrote:
>> >>> So, is there a lot of cases that the authority section of the Good
>> AS's
>> >>> Authorization Endpoint and the Token Endpoints are different?
>> >>> If not, then requiring that they are the same seems to virtually
>> remove
>> >>> the attack surface for the mix-up related attacks. It does not
>> introduce
>> >>> new parameter nor discovery. If it can be done, it probably is not
>> worth
>> >>> adding a new wire protocol element to mitigate the mix-up variants.
>> >
>> >
>> > _______________________________________________
>> > OAuth mailing list
>> > OAuth@ietf.org
>> > https://www.ietf.org/mailman/listinfo/oauth
>>
>>
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>>
>>
>