Re: [core] RD: Registration update/removal request without location

Christer Holmberg <christer.holmberg@ericsson.com> Fri, 25 October 2019 07:52 UTC

Return-Path: <christer.holmberg@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 CFEB412012A for <core@ietfa.amsl.com>; Fri, 25 Oct 2019 00:52:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 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, 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=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 qOFpn7Um_BQE for <core@ietfa.amsl.com>; Fri, 25 Oct 2019 00:52:00 -0700 (PDT)
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40087.outbound.protection.outlook.com [40.107.4.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4C159120108 for <core@ietf.org>; Fri, 25 Oct 2019 00:52:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DHvmzxkbuRKlCvFU8ubk1lnM8YplfVUUqnYW08lBZU0brb3/PV4GTLod1VJga7NLiozkEOZ9J+TRawwIGMbik7rHiWCmbyWYzwjGv9REDhI36OqRE3He2eIcQFBgSkbHzEsrDhn/5F0RR7gY2cXSjgeQEkKwRqvyT9moJO5wUNp4lKrOjGnezlsXqf+3gxK9oUKWOuJDDSwN/H1iTGzQ8hpTadaZVLGvcm5qilTxs2HK7zaH8FlUV1QmakknEynzqVg2XIYofL+nTmjvDFd5ntLOpJxTAs9DV0qBVHA2dvs0n9c6wIZZ2PDlBDzLN0MM1gbBVeBPGhlwGUXO69FDOg==
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=y4zgm+iUCsb3ACWJ/vTIyHYbQBk1fUZbFnV9MTuUjj4=; b=MGbSJzw9CmCCd6vOoSbUY9KZJ+CGbbVs/0r5HpkCVOr0g+OVSinty2mVljmTtHOdr0WB+lZ0Fcdi0T08iYaA0xn/2tz4Lj+FvEhiDFluGhDR/j5Rq34jH3tMMg9Qbz7TAy0bBdCd2osB/0FzJEUQIB+Dgda/ZXp8X/OnwwX207vZGbNW5o9OSgITQYy+KXF6rnDF9Fs5+bNOOYxySWgR9Um3HtqTzPq1KBixezak2yozaxkaya1HRAsirt2G+LeolWz7tcHcDlwWsX84flTgiKwhT+qlPxbJGRZT648cbepbdlx9+D9RPMlUXP9pkc+PKGJ7Ft9WFw4fgosKG7XkEw==
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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y4zgm+iUCsb3ACWJ/vTIyHYbQBk1fUZbFnV9MTuUjj4=; b=iihrmnIPQqFDhjhBJXj9f5clmemDyqSWp6lZ+nYbaqSurqSt3ZuQ5iVa6fnQvGYzTm06X1p4P9W5VWt8Diu+a1Cm59Z5uJZlZEMGfpy/w8tJZWoOAtLazzm/gvqr2CS2v2F6nHS2nc/R82QheeKRRAnf4Rn5lqu7j1iC6ro4OOQ=
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com (10.170.245.23) by HE1PR07MB3241.eurprd07.prod.outlook.com (10.170.243.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.13; Fri, 25 Oct 2019 07:51:58 +0000
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::5499:1231:e707:4cb7]) by HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::5499:1231:e707:4cb7%7]) with mapi id 15.20.2387.025; Fri, 25 Oct 2019 07:51:58 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Christian Amsüss <christian@amsuess.com>
CC: "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] RD: Registration update/removal request without location
Thread-Index: AQHViMx2E0Rpo6xviU28Op87SnHoBKdq9pcAgAA8QYA=
Date: Fri, 25 Oct 2019 07:51:57 +0000
Message-ID: <42420A40-A0D1-4890-A580-2B19C6D00426@ericsson.com>
References: <B6B208FC-F305-4703-8541-1C26925FA6F2@ericsson.com> <20191025071618.GA24136@hephaistos.amsuess.com>
In-Reply-To: <20191025071618.GA24136@hephaistos.amsuess.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1e.0.191013
authentication-results: spf=none (sender IP is ) smtp.mailfrom=christer.holmberg@ericsson.com;
x-originating-ip: [89.166.49.243]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 912acd3d-db45-4a7f-0398-08d75920364e
x-ms-traffictypediagnostic: HE1PR07MB3241:
x-microsoft-antispam-prvs: <HE1PR07MB324172E7242ED76261E3AD1F93650@HE1PR07MB3241.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02015246A9
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(39860400002)(346002)(376002)(396003)(136003)(189003)(199004)(33656002)(6512007)(476003)(6486002)(99286004)(8936002)(66066001)(81166006)(305945005)(7736002)(81156014)(76176011)(8676002)(66476007)(5660300002)(229853002)(26005)(446003)(6246003)(66946007)(186003)(102836004)(486006)(6506007)(3846002)(6116002)(15650500001)(2616005)(25786009)(71200400001)(44832011)(478600001)(11346002)(66556008)(14444005)(2906002)(256004)(6916009)(36756003)(71190400001)(4326008)(14454004)(64756008)(66446008)(86362001)(76116006)(316002)(6436002)(58126008); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3241; H:HE1PR07MB3161.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: g7XUy/1SPKZDh6ubQf1vuLlfowtI6bXRHpA0+5cIPGhnQ6g/RSjDiJF5IkiPXqSeNiWVPKBszxlNFNfOiWmtyeoBV9md2u11NaSf4tEmuMvphN3Uw7sK4mDZtLoieMaqBSAskUFtbeYWHG6PCR6uQn1mosFoRyvBWsasNHQYtEkiaBb+9RSrhYnBlCFIz3LHcEtMfD0kWhpvKuLKmygk0dJ2D0XhI/ecVcp/rOnjdpF+33lZMui3iup9SVnIIP5dGAxOSrp6v3fR8mhfHDntd4+dddA0Or8b62Y+PNkUT8WEZgPGhsFGy5ulWgC4e/8DjJ701zUuhBO4rLXtgQ501fC0GUrUAV547GakkDhabvRYynf2ZThGOYDboH9jbKA93ZiVJ0ApPR4DczxrakSwqoWgaVDrooFMTlyobzpZsEKWU9CpQR8QykZujWeec1Yl
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <AE3E1A50214A6B4BB03177080ABF89C3@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 912acd3d-db45-4a7f-0398-08d75920364e
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2019 07:51:57.9143 (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: KtmB9oCPknNQ+IVVsy+utiuB0UlU3hdsVALjF3og76kDQniuNM4xsRcDflfB+ye4nXGiNxK+UXSZVWamzEYZK2iPlje69wfVCSSRcovRMdU=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3241
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/Vy-X68b1Bp6MKhZSt1SNZB9Hrro>
Subject: Re: [core] RD: Registration update/removal request without location
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, 25 Oct 2019 07:52:03 -0000

Hi Christian,

    >> Section 5.3 of draft-ietf-core-resource-directory-19 says:
    >> 
    >>    “The registration interface MUST be implemented to be
    >>    idempotent, so that registering twice with the same endpoint
    >>    parameters ep and d (sector) does not create multiple registration
    >>    resources.”
    >> 
    >> Section 5.3 also says:
    >> 
    >>    ”Success:  2.01 "Created" or 201 "Created".  The Location-Path option
    >>    or Location header MUST be included in the response.  This
    >>    location MUST be a stable identifier generated by the RD as it is
    >>    used for all subsequent operations on this registration resource.”
    >> 
    >> Section 5.4 (including sub sections) then describe how the location is
    >> used in subsequent registration update/removal requests.
    >> 
    >> QUESTION: If a client DOES NOT use the location in the update/removal
    >> request, but the client DOES use the same endpoint parameters ep and
    >> d, is the RD supposed to handle the requests in the same way as if the
    >> location would have been provided? I assume the RD should be able to
    >> find the registration resource based on ep and d.
    >
    > Just to verify I got the question correctly I'll write this as an
    > example (with content-format and similar options elided for brevity):
    >
    >  Req: POST /rd?ep=node1
    >  Payload:
    >  </hello>
    >
    >  Res: 2.01 Created
    >  Location: /reg/1234
    >
    > Now the expected behavior would be for the registrant to refresh the
    > registration like this:
    >
    >  Req: POST /reg/1234
    >  (No payload)
    >
    >  Res: 2.04 Changed
    >
    > What I understand you asking about is what would happen if the
    > registrant ignored the Location options but tries to perform the refresh
    > operation on the /rd resource:
    >
    >  Req: POST /rd?ep=node1
    >  (No payload)
    >
    >  Res: 2.01 Created
    >  Location: /reg/1234

Correct.

    > That can succeed on a CoAP level (depending on the precise handling of
    > absent content formats), but would not give the desired results: It is
    > interpreted as the registrant trying to create a new registration (to
    > override its previous one) *without any links in it* -- rather than
    > refreshing the existig registraion.
    >
    > What a registrant that did not remember its location *could* do is to
    > repeat the complete registration (copy-pasted from above):
    >
    >  Req: POST /rd?ep=node1
    >  Payload:
    >  </hello>
    >
    >  Res: 2.01 Created
    >  Location: /reg/1234
    >
    > which has the same effect as refreshing it -- but is less efficient, and
    > not so much intended to be used like this. (That this is works this way
    > at all is a result of making the registration operation idempotent to
    > allow some optimizations, and to accomodate rebooting registrants). A
    > client that can not be bothered to parse and remember the location
    > should rather use the simple registration right away, which does allow
    > more efficient operation.

The use-case I have in mind is not about the registrant "not bothering to remember", but the registrant not receiving the 2.01 response to begin with.

Assume there is one or more proxies between the registrant and the RD. For some reason it takes time for the RD to send the 2.01, so one of the proxies times out and sends a 5.04 response to the registrant. The same proxy will then (I assume) drop the 2.01 response once it receives it. So, the RD has created a location, but the registrant didn't receive it.

Client        Proxy         RD

 ---- POST -->
                    ---- POST-->
 <---- 5.04---
                   <-- 2.01------

Now, the registrant would obviously try to repeat (not update, as I wrongly indicated) the registration. But, based on your explanation above, that will not cause problems - the new registration will simply overwrite the old one, and everything should be fine.

Thanks!

Regards,

Christer