From nobody Tue Mar  2 12:05:47 2021
Return-Path: <neil.madden@forgerock.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 CCC253A0E9B
 for <oauth@ietfa.amsl.com>; Tue,  2 Mar 2021 12:05:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level: 
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key)
 header.d=forgerock.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 z0KdJD8MSkxF for <oauth@ietfa.amsl.com>;
 Tue,  2 Mar 2021 12:05:44 -0800 (PST)
Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com
 [IPv6:2a00:1450:4864:20::336])
 (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 07F553A0E5D
 for <oauth@ietf.org>; Tue,  2 Mar 2021 12:05:44 -0800 (PST)
Received: by mail-wm1-x336.google.com with SMTP id n22so3278239wmc.2
 for <oauth@ietf.org>; Tue, 02 Mar 2021 12:05:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=forgerock.com; s=google;
 h=from:mime-version:subject:date:message-id:references:cc:in-reply-to
 :to:content-transfer-encoding;
 bh=QlOJtzPYO2QFKrYJw75n+BclRljpBaS1ZqJdJbK0reY=;
 b=KYuIE5hvCt/RNiXNqdIHqpMPuu1Lxm7Wq2lOIR9Rz1mjwC9FX3R1dXJhaqpIoCCqBy
 RM3PGCt5QxS7Sfr6nCK8yxsiRK1uAXhnIVM/CayyDk26H086nWMp714ROQFIG9nUURWb
 7Hp9YCxy8gGjpl+TPme3isO+qH54Nf/PT2V2Y=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:mime-version:subject:date:message-id
 :references:cc:in-reply-to:to:content-transfer-encoding;
 bh=QlOJtzPYO2QFKrYJw75n+BclRljpBaS1ZqJdJbK0reY=;
 b=ZlsVmTp44A+k8KGBFhRnFJ/2TvCotJhFa5kY5zovZfap+r3e8abMXjPWMp3vEWjG1A
 Eg31GJP19HFoe6q/UJKHdhXzFinGtIpTK0YOZ+4eUzrYjtIGfbO2/+0W8uAAKZRiPFas
 4HmSeO0b4OQxNUIXlWJD0aeIdblIiX2/JG8wJcYYyKWushD7h0Qghm3Uma1NvWyzQClm
 ce3nzOwoJI67dp5PHoyh75I4VxD/nfaRuGVa1WLc90nmpTG9LLDPbIfwHuS4n5rPZkPP
 +f7f3mA2k0SSfvdsn2g/ySE2jlo/0OCoUydH1kLMfaYmKQRKw8Ghs4nMPceh2f72VEJE
 wPeQ==
X-Gm-Message-State: AOAM530xmH+AaM8TK7GAkY3AH/oUEQ+BpSEiIOjLl7JNHqAB95ZJDaA/
 8za6AouNuX3cuDf3R3YB3RcLxixjaXMAGE31K3BjO8meQGX5o90GERiFH0VVJd2p8T7/wmVnGQ=
 =
X-Google-Smtp-Source: ABdhPJxgjunaPTQ87IcSMoB4g+pXbN6r3LY8fAN2CfsUolPevIP0fmEPOZrbWjQ0/5tMFulHqblFaQ==
X-Received: by 2002:a7b:cf16:: with SMTP id l22mr5508706wmg.26.1614715537223; 
 Tue, 02 Mar 2021 12:05:37 -0800 (PST)
Received: from [10.0.0.2] (252.207.159.143.dyn.plus.net. [143.159.207.252])
 by smtp.gmail.com with ESMTPSA id p17sm3204797wmd.42.2021.03.02.12.05.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 02 Mar 2021 12:05:36 -0800 (PST)
From: Neil Madden <neil.madden@forgerock.com>
Mime-Version: 1.0 (1.0)
Date: Tue, 2 Mar 2021 20:05:35 +0000
Message-Id: <67896868-B842-402D-8BFC-DBDFA6AF648D@forgerock.com>
References: <6105c6f6-d291-b80e-4596-9ff4f10b3b55@evertpot.com>
Cc: oauth@ietf.org
In-Reply-To: <6105c6f6-d291-b80e-4596-9ff4f10b3b55@evertpot.com>
To: Evert Pot <me@evertpot.com>
X-Mailer: iPhone Mail (18D52)
Content-Type: multipart/alternative;
 boundary=Apple-Mail-5418E326-C308-4515-BF3C-B4B683092964
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/kQwLpw04Izf0mCVMSrvCj1FmoQo>
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: Tue, 02 Mar 2021 20:05:47 -0000


--Apple-Mail-5418E326-C308-4515-BF3C-B4B683092964
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

One option is JWT Bearer grant with =E2=80=9Cjti=E2=80=9D and replay preven=
tion (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 n=
o coordination with the AS.=20

=E2=80=94 Neil

> On 2 Mar 2021, at 19:04, Evert Pot <me@evertpot.com> wrote:
>=20
> =EF=BB=BF
> Dear list,
>=20
> We have a requirement to let users log in to an application via a code se=
nt by email.
> This code needs to be exchanged for an access/refresh token pair, and sho=
uld only work once.
>=20
> The access/refresh token scope would give limited access to the applicati=
on. Since we already use the authorization_code flow for other (more sensit=
ive) parts of the application, I would like to re-use the OAuth2 framework =
for parts of this.
>=20
> 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 applicat=
ion, 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
>=20
> I'm comfortable implementing this, but curious:
>=20
> 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.
> Are there any major pitfalls associated with this?
> Evert
>=20
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth

--=20
ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>

--Apple-Mail-5418E326-C308-4515-BF3C-B4B683092964
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=
=3Dutf-8"></head><body dir=3D"auto"><div dir=3D"ltr">One option is JWT Bear=
er grant with =E2=80=9Cjti=E2=80=9D and replay prevention (<a href=3D"https=
://tools.ietf.org/html/rfc7523#page-7">https://tools.ietf.org/html/rfc7523#=
page-7&nbsp;</a>) if your AS supports it. This is nice if some other compon=
ent is generating the emails as it needs no coordination with the AS.&nbsp;=
</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">=E2=80=94 Neil</div><div =
dir=3D"ltr"><br><blockquote type=3D"cite">On 2 Mar 2021, at 19:04, Evert Po=
t &lt;me@evertpot.com&gt; wrote:<br><br></blockquote></div><blockquote type=
=3D"cite"><div dir=3D"ltr">=EF=BB=BF
 =20

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8=
">
 =20
 =20
    <p>Dear list,</p>
    <p>We have a requirement to let users log in to an application via a
      code sent by email.<br>
      This code needs to be exchanged for an access/refresh token pair,
      and should only work once.<br>
      <br>
      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.<br>
      <br>
      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.<br>
      It seems that grant_type in the 'token' endpoint would support
      extension in this manner, by using a uri such as
      <a class=3D"moz-txt-link-freetext" href=3D"https://vendor.example/ema=
il-token">https://vendor.example/email-token</a></p>
    <p>I'm comfortable implementing this, but curious:</p>
    <ol>
      <li>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.</li>
      <li>Are there any major pitfalls associated with this?</li>
    </ol>
    <p>Evert<br>
    </p>
 =20

<span>_______________________________________________</span><br><span>OAuth=
 mailing list</span><br><span>OAuth@ietf.org</span><br><span>https://www.ie=
tf.org/mailman/listinfo/oauth</span><br></div></blockquote></body></html>
<br>
<span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystem=
Font,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;=
Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;background-color:rgb=
(255,255,255)"><font size=3D"1">ForgeRock values your <a href=3D"https://ww=
w.forgerock.com/your-privacy" target=3D"_blank">Privacy</a></font></span>
--Apple-Mail-5418E326-C308-4515-BF3C-B4B683092964--

