Re: [OAUTH-WG] TMI BFF - html meta tags over/alternative to discovery

Evert Pot <me@evertpot.com> Sat, 15 May 2021 15:57 UTC

Return-Path: <me@evertpot.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 0CC9A3A11BF for <oauth@ietfa.amsl.com>; Sat, 15 May 2021 08:57:49 -0700 (PDT)
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, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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=evertpot.com header.b=aeIeimlh; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=SF0a/492
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 nkbSnsUObxhB for <oauth@ietfa.amsl.com>; Sat, 15 May 2021 08:57:43 -0700 (PDT)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A29F3A11C3 for <oauth@ietf.org>; Sat, 15 May 2021 08:57:42 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C2B3E5C0135 for <oauth@ietf.org>; Sat, 15 May 2021 11:57:41 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 15 May 2021 11:57:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evertpot.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=mesmtp; bh=YqnivyJDw5vpYWuZXckKry56 KUU/qWC2rGB9vJmcXx0=; b=aeIeimlhsbhyPLL22H8iCicu8PzMe4yS41WdBJyV tIC1/fmVMuQckeGXfqHUBWfJWWWppXjUh7TNLXZsc4M9pKkigvf3rM5/DZQZv7go iDhKvYZFa4E6ofBhurl5KIUgGbI9qih1ARrh6suDED3mEPewWc6WmeZs/PzXCLBS aPk=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Yqnivy JDw5vpYWuZXckKry56KUU/qWC2rGB9vJmcXx0=; b=SF0a/492S+wuIJ86xSLiTe XhPqwP+A4cH4TOVmFi9IolhYCizP40/2cjDngbLz5PY8ePXpBwdLE2+MlkW4pZpG EaHTLIruF8riOUDRui7SkZmnDCYVrMrS4WZVuzlcF83+a4rZXIjLWKX05un8V3Yu E2lZKa2KCxylUXKutz9rH/NaI0ikb1oWNc9xjiLTRLu5Zv1xcLMfZAEIXYNx+OFH VFtJYEFtwaLC5tUqqGgFIZWn19bDvXdt2ovy17QlgHbhQCKhOmqluz3oY2TDc6+L WUjGvKpso0hi6rgxOgK74RwO9rRm0QKiw3uygrI3y/aHUEWV+geLf7vf3qOoINEA ==
X-ME-Sender: <xms:de-fYM4QRkgbaquob2LATAxl3IFeznLUTcj2QuKm14duCfhx7h03gA> <xme:de-fYN5XzCKBJkFHEF7p1kpyUXaTtjQWO4TlE3kWH0GqZmErn01jo-RqRR5X9TlYW UDASdwib7IHAIeq>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeitddgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgesrgdtre ertdefjeenucfhrhhomhepgfhvvghrthcurfhothcuoehmvgesvghvvghrthhpohhtrdgt ohhmqeenucggtffrrghtthgvrhhnpeelgeeigfefhefhffelveevkeduuefhtedtffevvd ehudfhvddtjefhhedutdegffenucffohhmrghinhepfiefshgthhhoohhlshdrtghomhdp ihgrnhgrrdhorhhgnecukfhppedujeegrdelhedrudekuddrvdegfeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvgesvghvvghrthhpohht rdgtohhm
X-ME-Proxy: <xmx:de-fYLc1--Mw_V658Zw0aTbP1gPUb2AlsE-nxfbYCiN4QO40pVxCyw> <xmx:de-fYBK1zz9eu3uQz5juzaJhl-yGBehlPkALRfRLfGvUAE-5TdmPHQ> <xmx:de-fYAIJ-oxEWYUq4HY5__4FAO0d2L1555aCWZPYzl1oPr6eJ5ItiA> <xmx:de-fYFWHjsETR_QPz3fKyokk84ZyeXuqjC8XVxe_b9m_buNDVDg21A>
Received: from [192.168.2.156] (bras-base-toroon0560w-grc-35-174-95-181-243.dsl.bell.ca [174.95.181.243]) by mail.messagingengine.com (Postfix) with ESMTPA for <oauth@ietf.org>; Sat, 15 May 2021 11:57:41 -0400 (EDT)
To: oauth@ietf.org
References: <CALAqi_8B7fv9j8CnqLt_wFKDbYLjmFci3jjeBz7EKpqKXu+Atw@mail.gmail.com>
From: Evert Pot <me@evertpot.com>
Message-ID: <4d1a2908-33c4-09a8-a487-2986c1c26667@evertpot.com>
Date: Sat, 15 May 2021 11:57:38 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1
MIME-Version: 1.0
In-Reply-To: <CALAqi_8B7fv9j8CnqLt_wFKDbYLjmFci3jjeBz7EKpqKXu+Atw@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------2053813E01455681F044BDEC"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/xpbqVqsnhJHhurlfvfZ8y69H3Uw>
Subject: Re: [OAUTH-WG] TMI BFF - html meta tags over/alternative to discovery
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: Sat, 15 May 2021 15:57:49 -0000

On 2021-05-15 11:35 a.m., Filip Skokan wrote:
> Hello Vittorio, Brian, everyone
>
> This is a followup to my feedback in the TMI BFF interim meeting on 
> April 26th where I mentioned I'd bring this to the list for discussion.
>
> I proposed an alternative to using fixed endpoint locations and/or 
> discovery. HTML <meta> Tags <https://www.w3schools.com/tags/tag_meta.asp>.
>
> These would be in the returned page HTML's head tag, e.g.
>
>     <meta name="oauth-bff-token" content="/api/bff-token">
>     <meta name="oauth-bff-sessioninfo" content="/api/bff-sessioninfo">
>
>
> The javascript SDK handing TMI BFF would know to look for these 
> defined meta tags to source the location of the different endpoints. I 
> think this could be the primary place an SDK would look at as it 
> doesn't require any upfront external requests.
>
> For the SDK this is as simple as
>
>     var bffTokenPath =
>     document.querySelector('meta[name="oauth-bff-token"]').content;
>
>
> If this was the only mechanism defined by the document (to be bashed) 
> I think it can save the group a lot of time defining a client 
> discovery document which would be otherwise needed. If discovery as an 
> alternative solution is indeed inevitable, it can be a second in line 
> mechanism the javascript SDK would know to use.
>
> As discussed in the interim, a well known set of endpoints (or even a 
> single root client discovery document) might not always be available 
> for control to the webpage depending on where and how it is hosted, on 
> the other hand the HTML it serves always, I hope, is.

A more appropriate HTML tag might be the <link> tag.

You would just need to register a link relationship in the IANA registry:

https://www.iana.org/assignments/link-relations/link-relations.xhtml