Re: [core] OSCORE: clarification on protected-response requirement

Göran Selander <goran.selander@ericsson.com> Fri, 12 March 2021 19:26 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 58D6F3A0121 for <core@ietfa.amsl.com>; Fri, 12 Mar 2021 11:26:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.349
X-Spam-Level:
X-Spam-Status: No, score=-2.349 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-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=ericsson.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 UyvVIrSEWqTQ for <core@ietfa.amsl.com>; Fri, 12 Mar 2021 11:26:01 -0800 (PST)
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50072.outbound.protection.outlook.com [40.107.5.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7DB243A00DB for <core@ietf.org>; Fri, 12 Mar 2021 11:26:00 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QAlii9WSpIEMcbJWO1Nj1z220zdD74gNptHKWa+jw4EkTan021VCEnWA5nLnUkCae+M8hb78XLPDrasMWAweGZXPLCCGb+o7PUeO8gl3ZbskvwCUcnpFdAtbO21Z3C043slFnmgDnyBzFb+2sa0lMqgzfzSXSYs1+D+OK4wB730kaOeYRMGsXk7DGmtUT13PuvPKQPshGqC+c/C7EsHcyildYeBSoZnjj9mRGvHvmnAUcYeVwlSCnVg6imK0RV843P0923zLFJ7BSxSfe23K0nS/K6oT3f506lAkwFatOausnKsUPS6KlvHYeyMyVEZbYF48MM0A+zAxaUkBS2PY0w==
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=6bQi+J0f0irlq/t7paEWUdwOP9oc2ANWCQ53tXVOJ5Q=; b=gGRVdAgJf7+qbnNXxGlHzvXIznMfXBL30LHkFZ4IZRnlFR6Ed8S21BhlZ+NInOKEbhjGdQbryvxffuhSXDVrkQ9GMpXPcOl1BbcNdCnz7QKf3I57FInFKRlLnfIg+/dHU6riklxiOFwNwK3iwbSStIyMvmConr6TiMgt/a9lwvJtHmR5XEzqEdVI4oNiwKhfgHMduPyOTC3ymMcb/BbyVMKL1BiVqHbvbOLGWfKJEjgRmx/WU0dSYOJmY1DHDTzhzov6Whc5w3hZdJ3j1PRi0VUykwDOfwgsZ++oQPaEdbsdorzPtJ/LpjPxgArqqOIuDhbL89S68hXq7cMU+kK3aQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6bQi+J0f0irlq/t7paEWUdwOP9oc2ANWCQ53tXVOJ5Q=; b=FlTBbc6fOZM0Fb3NS5sWmddpuq+DDhOaVDe27SN3g2QybkMhQvaNhebz8HjF81iR6nDWUJ+ROsjhfmhxlElvglvvFfri6QbZBHWndxh/gWtS5qoW4NF8JICOSjEan9ql51l2mqbYmg9m6u+uxaJI8UqK61A4/07ROmaVK2TCexg=
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com (2603:10a6:7:82::14) by HE1PR07MB3066.eurprd07.prod.outlook.com (2603:10a6:7:2f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.11; Fri, 12 Mar 2021 19:25:57 +0000
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::2887:d795:feec:2f59]) by HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::2887:d795:feec:2f59%7]) with mapi id 15.20.3955.011; Fri, 12 Mar 2021 19:25:57 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Christian Amsüss <christian@amsuess.com>, Core WG mailing list <core@ietf.org>
Thread-Topic: [core] OSCORE: clarification on protected-response requirement
Thread-Index: AQHXFaqXgfykelx8uUWhdctHdO6T4aqA0HuA
Date: Fri, 12 Mar 2021 19:25:57 +0000
Message-ID: <18264A65-1D45-4850-B0D8-3663651431A0@ericsson.com>
References: <YEi+OBDI8CnNx/gb@hephaistos.amsuess.com>
In-Reply-To: <YEi+OBDI8CnNx/gb@hephaistos.amsuess.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.48.21030800
authentication-results: amsuess.com; dkim=none (message not signed) header.d=none;amsuess.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [83.249.67.87]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 9bc1d75b-560e-4b6e-b659-08d8e58ca98f
x-ms-traffictypediagnostic: HE1PR07MB3066:
x-microsoft-antispam-prvs: <HE1PR07MB3066ABCE49F43D0062AFF78BF46F9@HE1PR07MB3066.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 0yiaAu6GlcV4USCabZyQ8C+o1tTri0QwZlOVcFJP9zLu1jLu/whCiYjh1bnbuQZVK+GgVyd2lWXOd+AwNad/3Edk3+yeW6xdeYAnxnUCEfmUPyPGILaUW8sNCzD4mEEw6UnNSHwgQsD7SQHRkhvNVYEG6gClGvQvRrHkgq/ClkoL2fHGWmB5nR/EXpQx1u8z5qy3Ehwa36Myrj8yHfB49QTCwHqMmApuXGsiXJoNYuVUltEq2R7NkHKNUTmOZrA069zZ4jAdB/eUl7o64Xul3Iy8jJWnWANSZ+oEpdFDLA//UCai7Ucgw+86NFiTscx7Q6EACN0q7DGGWqpIIg/VnWVM1YHLy8rAuie5x5lFkgpCJLqUJModZo97+V8kek7BLvie9tnAh0bMu72RQGmIIcNcBNVkhlhCE2BjC/Brt+Qfkx22RUK/JDpB1nEaX2zRaF4I7P0b2dleWUnLtv0WTiaasS2VRqUjGl6y42J6KLinnf8aFsZLdUBnNMRviMVsnKNMpyJjE0qjM8++jO3ALanXi3nyLlcwHmy4rPgtJdoo1vO1i/mLkeVMgEiN0+qoCgnFh09Am7rkAUPOTdQhW9xa0/nu80QbgNEmCyrWDYdBZoJsl2hR0vvykhXfUvnw
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0702MB3674.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(346002)(39860400002)(376002)(366004)(8676002)(6486002)(5660300002)(2906002)(66556008)(6506007)(71200400001)(8936002)(478600001)(316002)(6512007)(110136005)(186003)(26005)(2616005)(66446008)(83380400001)(33656002)(36756003)(85202003)(85182001)(86362001)(76116006)(66476007)(66946007)(66574015)(64756008)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: MxEf2EBO7g0MJjGV00adwubv2qzIjtSmm4SJ3NQM0rcr9Z/obBeilDWaCBTxBVfDnBwhAq0hPpKoTcYIjRApsnDs5J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dmn+GhC6cKuWwDm0ZbmINU/YNVojp6IZt0Lx5wjNu3JXrt7Ur9nQkk4JuDJe9bQyKknQwT1/4s5YE9QZlRMQBrlj3RI6sCIhS6Kl43ntOwP7RMQ0WYMBjN6FfqRIKs039yQHkZqmTYRYm1xRX/p3wEduBT98Uf4Y6bfI3NmeRjttGhRh+5t5qDdj
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <408FA4120D142A41BD1C4D9169FBCB65@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0702MB3674.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9bc1d75b-560e-4b6e-b659-08d8e58ca98f
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2021 19:25:57.4695 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 2VCLcArxbYMvvMksfM8Sz7xPg9RHVDfNOSwn2Kbx7/79i16JyEo9O9/N1hogie0H7tMti6/iTa5AfTg9K4roVPH9Tf8Oz5iKjzsqxuvrqvI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3066
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/C_KTN4MfzguHVBQ_y6qT8cqSkPg>
Subject: Re: [core] OSCORE: clarification on protected-response requirement
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Mar 2021 19:26:03 -0000

Hi Christian,

As far as I recall, this sentence intends to say that if an OSCORE request is successfully processed in the server by OSCORE, then the response SHALL be protected with OSCORE i.e. have an OSCORE option. So indeed, this corresponds to the case when the request "is subject to OSCORE processing", which is the only case considered in the draft. Errors during CoAP processing will be protected  by OSCORE whereas the errors during OSCORE processing are unprotected. 

As you point out, in draft-palombini-core-oscore-edhoc, it is specified how an OSCORE request containing EDHOC message_3 is preprocessed by EDHOC. So the question is how an error in EDHOC processing is reflected in the CoAP response. Clearly there can't be an OSCORE option in the response since the request did not successfully complete the OSCORE processing - it didn't even start. If I understand right, your question is what is the restriction on CoAP status codes in cases like this.

This goes beyond what was considered in RFC 8613. Although the sentence seems to forbid the use of success code in this case, with the interpretation as above the sentence does not actually say anything about this case, since the condition of the "if" is not fulfilled. 

Your proposal to extend the applicability of the current text to new situations makes sense to me. I don't know if this needs an erratum, but I think that we at least should document this interpretation whenever it is relevant.

I hope I answered the question.

Göran


On 2021-03-10, 13:40, "core on behalf of Christian Amsüss" <core-bounces@ietf.org on behalf of christian@amsuess.com> wrote:

    Hello all,

    OSCORE contains this sentence:

       A successful response to a request with the OSCORE option SHALL
       contain the OSCORE option.  Whether error responses contain the
       OSCORE option depends on the error type (see Section 8).

    I ask for clarification on the applicability of this statement. I think
    it is reasonable to clarify this (whether that's in an erratum, a piece
    of CoRE lore or corr-clarr I don't know):

       This is requirement applies to responders in which the request
       actually becomes subject to OSCORE processing.

    This clarification is relevant whenever there are options or mechanisms
    that occur before OSCORE processing and explicitly state that they can
    take effect even if there are particular other options; the prototypical
    example is core-oscore-edhoc.

    Protocols built around such options are, if the RFC8613 statement is
    interpreted strictly, limited to non-successful responses. For different
    reasons ("Don't abuse protocol errors for application errors", caching,
    maybe others) it makes sense to allow successful codes in responses too,
    and this is what the clarification is about. For example, if in EDHOC
    the preference should become to respond successful with an
    application/edhoc message (even if inside that there is an error), the
    response to a request

        POST EDHOC: M3 OSCORE:... encrypted { GET /foo }

    could be

        2.04 Changed Content-Format: application/edhoc { error-code, ... }

    which is understood as a response to the EDHOC option part due to its
    criticality, and for the same reason understood to have ignored the
    OSCORE option (as processing didn't get that far anyway).

    I think this also be relevant for any cases of application-layer
    redirection (given we don't want to mint 3.xx codes for that) and
    protocol negotiation (nothing fleshed out yet, but knowing the
    boundaries will ease exploration).

    BR
    Christian

    -- 
    To use raw power is to make yourself infinitely vulnerable to greater powers.
      -- Bene Gesserit axiom