Re: [Txauth] Polymorphism (Was: JSON Schema?)

Dick Hardt <dick.hardt@gmail.com> Mon, 06 July 2020 20:41 UTC

Return-Path: <dick.hardt@gmail.com>
X-Original-To: txauth@ietfa.amsl.com
Delivered-To: txauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2879E3A0A8B for <txauth@ietfa.amsl.com>; Mon, 6 Jul 2020 13:41:54 -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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 mURADvjcuHGF for <txauth@ietfa.amsl.com>; Mon, 6 Jul 2020 13:41:52 -0700 (PDT)
Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 69C523A0A87 for <txauth@ietf.org>; Mon, 6 Jul 2020 13:41:52 -0700 (PDT)
Received: by mail-lj1-x229.google.com with SMTP id e8so12903318ljb.0 for <txauth@ietf.org>; Mon, 06 Jul 2020 13:41:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fQ/aRR0rixwXJ9hpBo21V+Tf1uuSZeRGIg4OU/4nISI=; b=gRThaIguTojpqM0PTQ7UHfONngPERoHYgU7g2UoLbqx1zBSQCfbhQQjJVMMVNLwQ43 cmGsxV7PuSu2vnaSu5+el5mzePWunA1qv5uW/SAbt9ATWrh0YyXKX/MDkxeqvHZHKD8Z 3DzOwQob3D2e6QOeN2zcu6iK1CISmpZhcZlgyn5cmyEAwKZ4imZtsGS63f7THo1JDxOC A84UCzQH32hUQ/u9avbkT5kcX9kKtPmf520a3OtBqJc1G/3D+B/BJIoil3zjOqygCjjd Tk2L02RXy3EP2+QKZs6kfiw/NqsXPRq59av3iQQaKhp/vH0JhjyAycMwlnYDLKBKMJNO oVUQ==
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=fQ/aRR0rixwXJ9hpBo21V+Tf1uuSZeRGIg4OU/4nISI=; b=HGKZxR5RkxCN3NUeuMdeBdEB24nbEPHCAcbjV/sYSBH3iZ0edBUofRu7daBcfA9kJO EMGBv+ufHAQjDJj+d6GcxHumqt/7GFK82v5jBVYC828so/2qfLOq/Ls3/YiCSWy69NbN 5WoctMtT8txzeXAyi9u0ahFGisx6FeNFL60ORzzYWf9plZWr/JF4eU53fKX0SZIBIuzt S/GjhKLe673lgd3BtEfDoiwaQzxneuqNz+HOGwoYAwqC7RZGtp3jwKF1qaDWOZ08MPi2 IptlFDTW+qT6yOSNlupwtdmSuOi67fV+Yng8+lnEgUBnjeBFplqjZa0DRQtyKkZTDiww zIsQ==
X-Gm-Message-State: AOAM533s3QfbZr9tKBeASufz63+Cb67Ed1air8zUsRELS00j7oJCoyPm LVvSD+AQjfImbWGjkFaKlvki/1wKZF6vy6LH618=
X-Google-Smtp-Source: ABdhPJxisZjjhhmOX1X8JGZnJAcrTmZSNJQKwkAOx2D1vKrriWzh6ceNxWWdGWGexgU/6JH6+DX4ux85Bys7uQkU2Oc=
X-Received: by 2002:a2e:7f10:: with SMTP id a16mr29525338ljd.69.1594068110439; Mon, 06 Jul 2020 13:41:50 -0700 (PDT)
MIME-Version: 1.0
References: <CAD9ie-vnA98pobbboS00SAHneEG52_8eMxh_sE3r3jg6gyooGg@mail.gmail.com> <E9EC90C9-7A9A-4909-8627-A161B33E941F@mit.edu>
In-Reply-To: <E9EC90C9-7A9A-4909-8627-A161B33E941F@mit.edu>
From: Dick Hardt <dick.hardt@gmail.com>
Date: Mon, 06 Jul 2020 13:41:14 -0700
Message-ID: <CAD9ie-vyB8+5jS=K_qUHfvxsF2wPV5APRo+7WUDfJxNzJONJpg@mail.gmail.com>
To: Justin Richer <jricher@mit.edu>
Cc: txauth@ietf.org
Content-Type: multipart/alternative; boundary="0000000000007879ce05a9cbe794"
Archived-At: <https://mailarchive.ietf.org/arch/msg/txauth/35pClPYnHXoHtgOiAg1QMW4_2f8>
Subject: Re: [Txauth] Polymorphism (Was: JSON Schema?)
X-BeenThere: txauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <txauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/txauth>, <mailto:txauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/txauth/>
List-Post: <mailto:txauth@ietf.org>
List-Help: <mailto:txauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/txauth>, <mailto:txauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Jul 2020 20:41:55 -0000

Responding to Justin's polymorphism comments ...

On Mon, Jul 6, 2020 at 12:54 PM Justin Richer <jricher@mit.edu> wrote:

> Polymorphism in the protocol is an important part of the XYZ proposal’s
> design, and as a feature it directly addresses a number of the items you
> found when doing your XAuth implementation, like parsing OAuth scopes and
> dealing with the authorization/authorizations mutually-exclusive oddness
> that you mentioned. I strongly believe that GNAP should make use of a
> polymorphic protocol structure for these and other reasons. Polymorphism is
> a built-in feature of the JSON data model, and it’s also fully possible to
> support under CBOR and other data serialization languages. Even JWT most
> famously uses polymorphism for the “aud” field, which can be a string or an
> array of strings depending on context, all with clear semantics.
>

 I strongly disagree with "GNAP should make use of a polymorphic protocol
structure"

We should use it only if we really need it, and it makes implementations
simpler. I personally don't think it accomplished that in JWT with the
audience. I would bet there is a fair amount of code that does not check if
the 'aud' property is an array, it just assumes it is a string.

wrt. my authorization / authorizations oddness, polymorphism would not
solve it as the contents of both authorization / authorizations in XAuth
are objects.

/Dick