Re: [OAUTH-WG] One-time token login

Sam Goto <goto@google.com> Wed, 03 March 2021 21:15 UTC

Return-Path: <goto@google.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 A479B3A1B34 for <oauth@ietfa.amsl.com>; Wed, 3 Mar 2021 13:15:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.589
X-Spam-Level:
X-Spam-Status: No, score=-17.589 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 Uc01qzY98ZN7 for <oauth@ietfa.amsl.com>; Wed, 3 Mar 2021 13:15:01 -0800 (PST)
Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 DC9803A1B33 for <oauth@ietf.org>; Wed, 3 Mar 2021 13:15:00 -0800 (PST)
Received: by mail-io1-xd2e.google.com with SMTP id u20so27349956iot.9 for <oauth@ietf.org>; Wed, 03 Mar 2021 13:15:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rZK9P3EK0EQMUFWJCWPQgwyL0SB5m64+/X/a5MY7W2E=; b=Rgb4x0457GE0WBKcNTZc8i/DSoV85747+3qs14TqfnMKS/qwlIS63aFM2nM9aeFncp Ilm+UJTBSNNEcFV/zj62ePmgO1Btwy39nNkqEzYxFbFuR8dYKFJ6Ok5rWGcN167mR+lu txz0r0D/G+fNIU7Hit4BLV5yJv4N3qJ53ajhJs5GLe1TZhNi60HW+bl+MyC/0IqZAf/J xd4pou82aY+4PkVr/g7zXprdt0+LJuYUz1WnpMpDo3LU7sXbgebg/hEoEsugSCIYsdpd wwk8/Are+riPDAcPB8vbrKXSMV2dFMOtDtRuO1CAs4sr8XC3KzLYiaL9pgSAEAwajkIG H79A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rZK9P3EK0EQMUFWJCWPQgwyL0SB5m64+/X/a5MY7W2E=; b=bweIJdUcx/7V1UHmZnQmafWdkTUzNyaSxY8IouK1xYzvxvD1UEb+OrwyYzXT+/IEtd kj4ECbDRfxRoTKzKAS13zA6JVGRn2LeWwZG2sEAFvfp0j0bUOhUZQttpoke5MHjCPAJJ VBxCcRdhDPd4usGFMtPDEh59KpbEDlrP4eAYlCywsNJTbCrDSev14NQTYWyxCJEl5t5z 71dglpT9fVQ/MRpbaJqjS9C+rNsI8B+jNKnYng9PQM0HoRpigLsq1nejFpG9Q1WNo61R aSfzVsxRFqO4AnZvs5wytBE2tSGkXU5yjZpDr1FmxUpsD0dadu7mJugo49G+C8BwQdaV CbiA==
X-Gm-Message-State: AOAM533b60CRILS+oC+VIDiFxoYBBdSpT3qdaOWKczD12i21C3krK8MR Udt9KpipcVqyT1qhqYYXrs2Bxnh7s2NN6J2aOrryWQ==
X-Google-Smtp-Source: ABdhPJxOGVu4gVaiVA0Hg2TC5fT8elkv/G/c5MReEum+o9IJeEMI3P6IdUPmP81j8QRPHdYafwfgXD5atAOK/1jx4w4=
X-Received: by 2002:a02:cc1b:: with SMTP id n27mr860434jap.106.1614806099097; Wed, 03 Mar 2021 13:14:59 -0800 (PST)
MIME-Version: 1.0
References: <6105c6f6-d291-b80e-4596-9ff4f10b3b55@evertpot.com> <67896868-B842-402D-8BFC-DBDFA6AF648D@forgerock.com> <1ac815d9-3634-97bb-537c-478fce52b389@evertpot.com>
In-Reply-To: <1ac815d9-3634-97bb-537c-478fce52b389@evertpot.com>
From: Sam Goto <goto@google.com>
Date: Wed, 03 Mar 2021 13:14:47 -0800
Message-ID: <CAMtUnc42wMX3zAVL9aUo5s=WZUQsHh-fvs5zzCpRE8cifUnUWg@mail.gmail.com>
To: Evert Pot <me@evertpot.com>
Cc: Neil Madden <neil.madden@forgerock.com>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000eb665c05bca85735"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/K9ObIWScPBRzoVKYqlEIUMA0mNk>
Subject: Re: [OAUTH-WG] One-time token login
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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, 03 Mar 2021 21:15:04 -0000

Unclear to me if this is a perfect fit for the question, but wanted to
raise awareness of WebOTP [1] which is coming up with conventions for
verifying phone numbers (e.g. with SMS OTP formats [2]) and email addresses
(e.g. conventions over magic links).

LMK if that's of interest/relevance and I'd be happy to expand.

[1] https://web.dev/web-otp/
[2] https://github.com/WICG/sms-one-time-codes

On Tue, Mar 2, 2021 at 12:10 PM Evert Pot <me@evertpot.com> wrote:

> Thanks Neil & Hans,
>
> Our AS doesn't do jwt quite yet. It's in-house, but open source. We don't
> have rfc7523 yet, but this does sounds like a pretty great longer-term
> solution.
> We're a bit time constrained, so perhaps this feature just needs to be
> done as a one-off before we can do RFC7523 for real, later.
>
> Thank you!
>
> On 2021-03-02 3:05 p.m., Neil Madden wrote:
>
> One option is JWT Bearer grant with “jti” and replay prevention (
> https://tools.ietf.org/html/rfc7523#page-7
> <https://tools.ietf.org/html/rfc7523#page-7>) if your AS supports it.
> This is nice if some other component is generating the emails as it needs
> no coordination with the AS.
>
> — Neil
>
> On 2 Mar 2021, at 19:04, Evert Pot <me@evertpot.com> <me@evertpot.com>
> wrote:
>
> 
>
> Dear list,
>
> We have a requirement to let users log in to an application via a code
> sent by email.
> This code needs to be exchanged for an access/refresh token pair, and
> should only work once.
>
> The access/refresh token scope would give limited access to the
> application. Since we already use the authorization_code flow for other
> (more sensitive) parts of the application, I would like to re-use the
> OAuth2 framework for parts of this.
>
> It doesn't sit right with me to overload the 'code' in authorization_code,
> so I was considering introducing a new custom grant_type for our
> application, specific for this purpose.
> It seems that grant_type in the 'token' endpoint would support extension
> in this manner, by using a uri such as https://vendor.example/email-token
>
> I'm comfortable implementing this, but curious:
>
>    1. Is there already some prior art that I'm not aware of? I'd rather
>    not do a custom grant_type if there's something standard I could do.
>    2. Are there any major pitfalls associated with this?
>
> Evert
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>
>
> ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>