Re: [OAUTH-WG] OAuth2/OIDC for client-server mobile app
Brian Campbell <bcampbell@pingidentity.com> Wed, 25 January 2017 20:25 UTC
Return-Path: <bcampbell@pingidentity.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 A03BE129BC4 for <oauth@ietfa.amsl.com>; Wed, 25 Jan 2017 12:25:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pingidentity.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 UDGTFS4c7TUH for <oauth@ietfa.amsl.com>; Wed, 25 Jan 2017 12:25:04 -0800 (PST)
Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002:c09::22d]) (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 37505129BB9 for <oauth@ietf.org>; Wed, 25 Jan 2017 12:25:03 -0800 (PST)
Received: by mail-yb0-x22d.google.com with SMTP id 123so22807249ybe.3 for <oauth@ietf.org>; Wed, 25 Jan 2017 12:25:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pingidentity.com; s=gmail; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e9m43hEPe5eBF6FztCSv5FKmTD3WJZ97rap5w1cHjCA=; b=kdtSFLcaZrceHGwp+ObbnHU3Bi+HYkoSIv6pUVXW4Ne6ZxHWtuUIFi9hjJSjTpFmLn vYNPTDbhPESArw9JyahfM7nxqMKHapi16rd5ZDfCT4VwOo6yuvEnagvvkKE6x5Y6ZUls p3nVcJfKwh7dEboSI9P5xROoYnNqZe/0D2gCg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e9m43hEPe5eBF6FztCSv5FKmTD3WJZ97rap5w1cHjCA=; b=bKkujuOlIQV+o7iN/esVJ6eUu16g2icyaac2gIDnc6676MalgdzI940NHsemOGSZ+U CUJK7NwaD9rv1xJeX3c0hF5lkyDCPNy3oZkmHqP+beGCnSYdy3qL36Qj/VR3lt5wr9bD 1x9QTYOYeXwgiFyD6JCSUbkZh/9qU54pr1N9mibHY7B7geUG5PD8puP0lt3u4IvCY/E5 aEwINt7nmCj6eB7PY8HkaMRkO/J5vGz8m1EzMiMs9cSjIDH/tNlyrkh0i7w2zeTDpQle kBOL3GeJfckkZM2aLnJevrfKkPbzcOurxYJ+vPo2KymWoD7pV7rI8LJjdIgrNDhE3ZDj Fz7Q==
X-Gm-Message-State: AIkVDXJ0WAMgmQFEchwxIxOeXl7jkJwHMVNCHedaS8RtBaVtfeZ5PSoJRXoQr3JFsPJhytNkbK0xnAbSf1LA8+mU
X-Received: by 10.129.174.90 with SMTP id g26mr37048415ywk.25.1485375902464; Wed, 25 Jan 2017 12:25:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.37.90.133 with HTTP; Wed, 25 Jan 2017 12:24:32 -0800 (PST)
In-Reply-To: <5889010c.06d0620a.31d79.5dd8@mx.google.com>
References: <ffc794a133b4b5fb341a0590c6848034@nleyten.com> <5889010c.06d0620a.31d79.5dd8@mx.google.com>
From: Brian Campbell <bcampbell@pingidentity.com>
Date: Wed, 25 Jan 2017 13:24:32 -0700
Message-ID: <CA+k3eCQ69_+7JEZN30OpOwfW-cy1Dmu6-K84geLLvrjWxpt=7A@mail.gmail.com>
To: John Bradley <ve7jtb@ve7jtb.com>
Content-Type: multipart/alternative; boundary="f403045f719a067ac00546f107f6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/4K4TJWxO3fzm13Uc6MLe69kHxaY>
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] OAuth2/OIDC for client-server mobile app
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.17
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, 25 Jan 2017 20:25:12 -0000
+1 to the AppAuth pattern On Wed, Jan 25, 2017 at 12:48 PM, <ve7jtb@ve7jtb.com> wrote: > There are a number of patterns that people use. > > > > I prefer the AppAuth pattern where the native app is a OAuth client to > your server and you are protecting your API with OAuth. Your AS becomes a > Connect/SAML/Twitter auth/ Facebook etc relying party and uses federated or > local authentication to issue tokens. (this gives your backend API access > to user info) > > > > The other pattern is for the native app to be a Connect client to Google > or other IdP and then passes a id_token (not access token) to your backend > in some secure manor and your backend validates the signature on the > id_token and that it was issued to your client (verification is essential) > (the native app gets access to user info api) You still have the problem > of how you secure your API, as you need to exchange the validated id_token > with something. I thnk that doing this securely winds up being more > complicated than the first option. > > > > There are other options that may not be allowed by the IdP where your > backend is the Connect client and has a client secret. The mobile app > makes the request and gets the code back. It then sends code and pkce > verifier to it’s backend and the server exchanges it with it’s secret to > get a id_token and access token. You still need to add security for your > API. (custom scheme redirects for confidential clients may not be allowed > depending on the Connect IdP) > > > > I think the first option is the best design that gives the best long term > design as new IdP can be added without changing the deployed app. > > > > > > John B. > > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *Dario Teixeira <dario.teixeira@nleyten.com> > *Sent: *January 25, 2017 7:59 AM > *To: *oauth@ietf.org > *Subject: *[OAUTH-WG] OAuth2/OIDC for client-server mobile app > > > > Hi, > > > > I am building a mobile app and a server. The mobile app fetches > > user-specific data from the server, and therefore some sort of > > authentication is required. I would like to avoid the traditional > > username+password scheme, and instead allow users to login via > > Google or Facebook. It seems the OAuth2-based OpenID Connect (OIDC) > > is the recommended solution nowadays, so my question is about the > > usage of OAuth2/OIDC in this scenario. > > > > All OIDC docs and tutorials describe the interaction between three > > parties: a Relying Party (RP), a User Agent (UA), and an OIDC > > Provider (OIP). There are however four parties in my scenario: > > the mobile app, the server, the UA, and the OIP. Which should > > take the role of RP? I see two different ways to do this: > > > > 1) The mobile app is the RP. It even takes care of starting a > > small web server to receive the data from the OIP. At the end > > of the interaction, the mobile app has a JWT signed by the OIP, > > which it sends to the server, which must validate it using a > > built-in list of OIP public signatures. > > > > 2) The server is the RP. When the user wishes to login, the mobile > > app asks the server about the OIP's authorization endpoint. > > The server provide the client with an URI whose redirect_uri > > parameter points to the server. All subsequent steps are > > handled by the server. > > > > Anyway, this seems like a fairly common scenario, and I would rather > > follow some best-practices documentation instead of cooking up my > > own schemes, like points 1 and 2 above. Therefore, if there is > > indeed such documentation, could someone please point me towards it? > > And if not, which would be the recommended route, 1 or 2? > > > > Thanks in advance for your attention! > > Best regards, > > Dario Teixeira > > > > _______________________________________________ > > 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 > >
- [OAUTH-WG] OAuth2/OIDC for client-server mobile a… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Justin Richer
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Phil Hunt
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… ve7jtb
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Brian Campbell
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Phil Hunt (IDM)
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Torsten Lodderstedt
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… ve7jtb
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… John Bradley
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Phil Hunt (IDM)
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… John Bradley
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Phil Hunt (IDM)
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… John Bradley
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Dario Teixeira
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… ve7jtb
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… Phil Hunt (IDM)
- Re: [OAUTH-WG] OAuth2/OIDC for client-server mobi… ve7jtb