[Teep] Comment on JSON support in TEEP OTrPv2 draft

Dave Thaler <dthaler@microsoft.com> Tue, 23 July 2019 21:29 UTC

Return-Path: <dthaler@microsoft.com>
X-Original-To: teep@ietfa.amsl.com
Delivered-To: teep@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 51D7A120352 for <teep@ietfa.amsl.com>; Tue, 23 Jul 2019 14:29:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 HGIPtznRgyvC for <teep@ietfa.amsl.com>; Tue, 23 Jul 2019 14:29:57 -0700 (PDT)
Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700127.outbound.protection.outlook.com [40.107.70.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E325A1202C3 for <teep@ietf.org>; Tue, 23 Jul 2019 14:29:56 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MYwKCCgb3IhLuK3wkrJLc7hiVWY/wAbTIN6sMiely2ruSIdIDU29QrLi52A1uc+oybkVTa7T8SM8Q+QLkEPrTBba++ECq7BWXnEtEnpiPmQDMZ+ZAs2tXcex6EDaan9i4NZnlBjj6cKqCtgSDLZzI3pWm+cvxGjgnBtl/fYZzq2Db/1CD64fOKb5x6QKUY12jYA4GNTcgy0tsGbJRI7MMJnwyBPoPbwTpJtyV8tH4NuJJPfpZh/auheHDjj5Yb3195tdyF/dCN1ZOODSnQBAg6rnhwQQ6o5dATRjt+Tl9oU+S8DGzQNLdYD15n96a2ShAUTSjLg2JhbD8O7h8nTESw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hofDf9MUSFV5qi5iwn+gINVBkRA1ct+FpUrRZ3f7mSU=; b=XhBi1uOF4VZTXthMeyCrtxPSNNqABesVnDa9SN0AsyKJjz33926In7RYF4Q0ITIVtzQsFfAOeDDfoXhBGQsmcK4RW2MeNSPXNkIuDdy7PT84az2hfoLwetP+gJ3lmRP293blmBC8K3jCgNAxbNY/3rUwAyhJOmCkZsSpVowp6aM6J+kYUGR8SiaANJvZ+GFODZGnaF8q19i5fUmoQHJHgyO8MBfLYX7iXL0hsR7e3HGY3gNuIdjWxF0xcwJGRjjO6goZIi0NuVufh1mpN8yDfKJ2cHc8GHG2PRF7r5foh6Y/fMl9zTV0MofgWdT6r7wzuxd6Y67yp0eVP5BSmAYyhg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=microsoft.com;dmarc=pass action=none header.from=microsoft.com;dkim=pass header.d=microsoft.com;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hofDf9MUSFV5qi5iwn+gINVBkRA1ct+FpUrRZ3f7mSU=; b=b3GGKTDMv3Ibn9Vt0WIL/lihbq2962sOQZCk3LuwVPA2hc4uXVb5J9ATBYU7BsDgbxP5/9HYe73wqSv9H/JKOsFsILuiiIs2hgD3blp9q63o9gDf57UgwhjybpQJqgP/UydKgW1Jg+TjeXIvfJqkrrPAJSv//hJQTIlGRk7jRyY=
Received: from MWHPR21MB0784.namprd21.prod.outlook.com (10.173.51.150) by MWHPR21MB0480.namprd21.prod.outlook.com (10.172.102.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.4; Tue, 23 Jul 2019 21:29:55 +0000
Received: from MWHPR21MB0784.namprd21.prod.outlook.com ([fe80::7de1:e6c1:296:4e82]) by MWHPR21MB0784.namprd21.prod.outlook.com ([fe80::7de1:e6c1:296:4e82%5]) with mapi id 15.20.2136.000; Tue, 23 Jul 2019 21:29:55 +0000
From: Dave Thaler <dthaler@microsoft.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
CC: "teep@ietf.org" <teep@ietf.org>
Thread-Topic: Comment on JSON support in TEEP OTrPv2 draft
Thread-Index: AdVBm/7p/+2+SshzR/qOX0J9Xs7iTQ==
Date: Tue, 23 Jul 2019 21:29:55 +0000
Message-ID: <MWHPR21MB0784A8A93EFABF7224F086D5A3C70@MWHPR21MB0784.namprd21.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=dthaler@ntdev.microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-07-23T21:29:56.7735738Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=653c2f77-7c3f-4071-b63e-672e0f250799; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic
authentication-results: spf=none (sender IP is ) smtp.mailfrom=dthaler@microsoft.com;
x-originating-ip: [2001:67c:370:128:5972:fc7e:43d9:33de]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 8c534a0d-fb12-4445-bb5e-08d70fb4e7d2
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:MWHPR21MB0480;
x-ms-traffictypediagnostic: MWHPR21MB0480:
x-ms-exchange-purlcount: 2
x-microsoft-antispam-prvs: <MWHPR21MB0480B08FE46CEC66E311442EA3C70@MWHPR21MB0480.namprd21.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0107098B6C
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(136003)(376002)(39860400002)(396003)(366004)(346002)(199004)(189003)(186003)(25786009)(66556008)(64756008)(66446008)(66476007)(52536014)(5660300002)(81166006)(102836004)(66946007)(486006)(76116006)(6436002)(54896002)(81156014)(10290500003)(55016002)(4326008)(86362001)(53936002)(9686003)(6306002)(8936002)(14444005)(256004)(478600001)(22452003)(316002)(71200400001)(68736007)(8676002)(8990500004)(33656002)(6916009)(2906002)(14454004)(71190400001)(6116002)(74316002)(10090500001)(6506007)(46003)(476003)(7736002)(7696005)(790700001)(99286004); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR21MB0480; H:MWHPR21MB0784.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: YePEX1UfCqfkpO9Fm8I4e+w5bYfa7pbeI5PGffu3lISjZs2BfIZS+iGMQz64k3EFz8buXbiZFphwWlgGIXanGTd0cgtatVXRTVpjA9t2StnAl6uugC3SEO9eJUcAfK/S022BLPSWByBDUgoOUsS5SMUr0lapUJafT1ohrBPxiWg8qThFgjFS8XdSv8pj/0R+jUV/ofafMVYld3xgx8j89A+YMdt5KELiK8EUwNJorYP16sXK8OQfIQJ+PZp4SbeFkKTH45MGyxJt3St4iB6jfa882DsmvPwzyjnD/HIknd/8Zh4NOJuQRrYI6/fXqwWCVVq90VglUUlcVlNzLlyYQeBAxJ7uX5JTNwdnO/noXkxDYV+8Ro4lSGcxvtabof7DBoJgtO9UW0GUod0erQJNLF+QmlYXpG99B3WDU7YKaHE=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MWHPR21MB0784A8A93EFABF7224F086D5A3C70MWHPR21MB0784namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8c534a0d-fb12-4445-bb5e-08d70fb4e7d2
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2019 21:29:55.2582 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: dthaler@ntdev.microsoft.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0480
Archived-At: <https://mailarchive.ietf.org/arch/msg/teep/yLqJAJg0dgHv1fJP7vn0IWXhGQs>
Subject: [Teep] Comment on JSON support in TEEP OTrPv2 draft
X-BeenThere: teep@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: A Protocol for Dynamic Trusted Execution Environment Enablement <teep.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/teep>, <mailto:teep-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/teep/>
List-Post: <mailto:teep@ietf.org>
List-Help: <mailto:teep-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/teep>, <mailto:teep-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Jul 2019 21:30:00 -0000

The OTrPv2 draft says it supports JSON and CBOR (which is great to see),
although in the meeting you correctly noted the JSON support isn't completely
specified.  The CDDL RFC (RFC 8610) does apply to JSON, as Appendix A explains,
as long as you only use the specific subset of CDDL specified there.

The current OTrPv2 draft does not, however, currently stick to that subset of CDDL.
For example, it uses "bstr" which Appendix A explains is not in that subset.
I think OTrPv2 can still be mapped to JSON, as long as you explain how
to map such types in the OTrPv2 JSON format.   (I am assuming we do NOT need
the ability for an intermediary to translate between CBOR and JSON, in which case
you'd need more than what I'm suggesting here.)


RFC 7493 was pointed out in the INTAREA WG, which species "a restricted profile of JSON
designed to maximize interoperability and increase confidence that
software can process it successfully with predictable results".  That is, it specifies
a profile of JSON, sort of like how RFC 8610 specifies a profile of CDDL.  Section 4 of
RFC 7493 in particular gives recommendations for how to map specific data types,
including binary data.

So I would suggest that the OTrPv2 doc talk about how to encode "bstr" (and any other
CDDL types missing from the profile in RFC 8610 Appendix A) into types within the CDDL
JSON profile, and reference relevant sections of RFC 7493, at least informatively if not normatively,
for how/why.   E.g., RFC 7493 section 4.4 can be used as the rule to encode bstr into
a string.

Dave