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

Neil Madden <neil.madden@forgerock.com> Tue, 02 March 2021 20:05 UTC

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, 02 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

One option is JWT Bearer grant with “jti” and replay prevention (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> 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:
> 
> 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
> 
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth

-- 
ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>