idnits 2.17.1 draft-ietf-core-resource-directory-27.txt: -(2): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 3 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 == There are 4 instances of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 392 has weird spacing: '... target o----...' == Line 394 has weird spacing: '...--o rel o...' == Line 460 has weird spacing: '...o href o----...' == Line 464 has weird spacing: '... o ep o---...' == Line 472 has weird spacing: '... o lt o---...' == (2 more instances...) -- The document date (22 February 2021) is 1153 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC3849' is defined on line 3551, but no explicit reference was found in the text == Outdated reference: A later version (-14) exists of draft-ietf-core-echo-request-tag-11 ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) == Outdated reference: A later version (-46) exists of draft-ietf-ace-oauth-authz-36 Summary: 1 error (**), 0 flaws (~~), 13 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CoRE C. Amsüss, Ed. 3 Internet-Draft 4 Intended status: Standards Track Z. Shelby 5 Expires: 26 August 2021 ARM 6 M. Koster 7 SmartThings 8 C. Bormann 9 Universitaet Bremen TZI 10 P. van der Stok 11 consultant 12 22 February 2021 14 CoRE Resource Directory 15 draft-ietf-core-resource-directory-27 17 Abstract 19 In many IoT applications, direct discovery of resources is not 20 practical due to sleeping nodes, or networks where multicast traffic 21 is inefficient. These problems can be solved by employing an entity 22 called a Resource Directory (RD), which contains information about 23 resources held on other servers, allowing lookups to be performed for 24 those resources. The input to an RD is composed of links and the 25 output is composed of links constructed from the information stored 26 in the RD. This document specifies the web interfaces that an RD 27 supports for web servers to discover the RD and to register, 28 maintain, lookup and remove information on resources. Furthermore, 29 new target attributes useful in conjunction with an RD are defined. 31 Note to Readers 33 Discussion of this document takes place on the CORE Working Group 34 mailing list (core@ietf.org), which is archived at 35 https://mailarchive.ietf.org/arch/browse/core/ 36 (https://mailarchive.ietf.org/arch/browse/core/). 38 Source for this draft and an issue tracker can be found at 39 https://github.com/core-wg/resource-directory (https://github.com/ 40 core-wg/resource-directory). 42 Status of This Memo 44 This Internet-Draft is submitted in full conformance with the 45 provisions of BCP 78 and BCP 79. 47 Internet-Drafts are working documents of the Internet Engineering 48 Task Force (IETF). Note that other groups may also distribute 49 working documents as Internet-Drafts. The list of current Internet- 50 Drafts is at https://datatracker.ietf.org/drafts/current/. 52 Internet-Drafts are draft documents valid for a maximum of six months 53 and may be updated, replaced, or obsoleted by other documents at any 54 time. It is inappropriate to use Internet-Drafts as reference 55 material or to cite them other than as "work in progress." 57 This Internet-Draft will expire on 26 August 2021. 59 Copyright Notice 61 Copyright (c) 2021 IETF Trust and the persons identified as the 62 document authors. All rights reserved. 64 This document is subject to BCP 78 and the IETF Trust's Legal 65 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 66 license-info) in effect on the date of publication of this document. 67 Please review these documents carefully, as they describe your rights 68 and restrictions with respect to this document. Code Components 69 extracted from this document must include Simplified BSD License text 70 as described in Section 4.e of the Trust Legal Provisions and are 71 provided without warranty as described in the Simplified BSD License. 73 Table of Contents 75 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 76 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 77 3. Architecture and Use Cases . . . . . . . . . . . . . . . . . 6 78 3.1. Principles . . . . . . . . . . . . . . . . . . . . . . . 7 79 3.2. Architecture . . . . . . . . . . . . . . . . . . . . . . 7 80 3.3. RD Content Model . . . . . . . . . . . . . . . . . . . . 8 81 3.4. Link-local addresses and zone identifiers . . . . . . . . 12 82 3.5. Use Case: Cellular M2M . . . . . . . . . . . . . . . . . 12 83 3.6. Use Case: Home and Building Automation . . . . . . . . . 13 84 3.7. Use Case: Link Catalogues . . . . . . . . . . . . . . . . 14 85 4. RD discovery and other interface-independent components . . . 14 86 4.1. Finding a Resource Directory . . . . . . . . . . . . . . 15 87 4.1.1. Resource Directory Address Option (RDAO) . . . . . . 17 88 4.1.2. Using DNS-SD to discover a Resource Directory . . . . 19 89 4.2. Payload Content Formats . . . . . . . . . . . . . . . . . 19 90 4.3. URI Discovery . . . . . . . . . . . . . . . . . . . . . . 19 91 5. Registration . . . . . . . . . . . . . . . . . . . . . . . . 22 92 5.1. Simple Registration . . . . . . . . . . . . . . . . . . . 26 93 5.2. Third-party registration . . . . . . . . . . . . . . . . 29 94 5.3. Operations on the Registration Resource . . . . . . . . . 29 95 5.3.1. Registration Update . . . . . . . . . . . . . . . . . 30 96 5.3.2. Registration Removal . . . . . . . . . . . . . . . . 33 97 5.3.3. Further operations . . . . . . . . . . . . . . . . . 34 98 5.3.4. Request freshness . . . . . . . . . . . . . . . . . . 34 99 6. RD Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . 36 100 6.1. Resource lookup . . . . . . . . . . . . . . . . . . . . . 37 101 6.2. Lookup filtering . . . . . . . . . . . . . . . . . . . . 37 102 6.3. Resource lookup examples . . . . . . . . . . . . . . . . 39 103 6.4. Endpoint lookup . . . . . . . . . . . . . . . . . . . . . 42 104 7. Security policies . . . . . . . . . . . . . . . . . . . . . . 43 105 7.1. Endpoint name . . . . . . . . . . . . . . . . . . . . . . 44 106 7.1.1. Random endpoint names . . . . . . . . . . . . . . . . 44 107 7.2. Entered resources . . . . . . . . . . . . . . . . . . . . 44 108 7.3. Link confidentiality . . . . . . . . . . . . . . . . . . 45 109 7.4. Segmentation . . . . . . . . . . . . . . . . . . . . . . 45 110 7.5. First-Come-First-Remembered: A default policy . . . . . . 46 111 8. Security Considerations . . . . . . . . . . . . . . . . . . . 47 112 8.1. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 48 113 8.2. Endpoint Identification and Authentication . . . . . . . 48 114 8.3. Access Control . . . . . . . . . . . . . . . . . . . . . 49 115 8.4. Denial of Service Attacks . . . . . . . . . . . . . . . . 49 116 8.5. Skipping freshness checks . . . . . . . . . . . . . . . . 50 117 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 50 118 9.1. Resource Types . . . . . . . . . . . . . . . . . . . . . 50 119 9.2. IPv6 ND Resource Directory Address Option . . . . . . . . 51 120 9.3. RD Parameter Registry . . . . . . . . . . . . . . . . . . 51 121 9.3.1. Full description of the "Endpoint Type" RD 122 Parameter . . . . . . . . . . . . . . . . . . . . . . 54 123 9.4. "Endpoint Type" (et=) RD Parameter values . . . . . . . . 54 124 9.5. Multicast Address Registration . . . . . . . . . . . . . 55 125 9.6. Well-Known URIs . . . . . . . . . . . . . . . . . . . . . 55 126 9.7. Service Names and Transport Protocol Port Number 127 Registry . . . . . . . . . . . . . . . . . . . . . . . . 55 128 10. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 56 129 10.1. Lighting Installation . . . . . . . . . . . . . . . . . 56 130 10.1.1. Installation Characteristics . . . . . . . . . . . . 56 131 10.1.2. RD entries . . . . . . . . . . . . . . . . . . . . . 57 132 10.2. OMA Lightweight M2M (LwM2M) . . . . . . . . . . . . . . 60 133 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 61 134 12. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 61 135 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 76 136 13.1. Normative References . . . . . . . . . . . . . . . . . . 76 137 13.2. Informative References . . . . . . . . . . . . . . . . . 77 138 Appendix A. Groups Registration and Lookup . . . . . . . . . . . 80 139 Appendix B. Web links and the Resource Directory . . . . . . . . 81 140 B.1. A simple example . . . . . . . . . . . . . . . . . . . . 82 141 B.1.1. Resolving the URIs . . . . . . . . . . . . . . . . . 82 142 B.1.2. Interpreting attributes and relations . . . . . . . . 83 144 B.2. A slightly more complex example . . . . . . . . . . . . . 83 145 B.3. Enter the Resource Directory . . . . . . . . . . . . . . 84 146 B.4. A note on differences between link-format and Link header 147 fields . . . . . . . . . . . . . . . . . . . . . . . . . 85 148 Appendix C. Limited Link Format . . . . . . . . . . . . . . . . 86 149 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 87 151 1. Introduction 153 In the work on Constrained RESTful Environments (CoRE), a REST 154 architecture suitable for constrained nodes (e.g. with limited RAM 155 and ROM [RFC7228]) and networks (e.g. 6LoWPAN [RFC4944]) has been 156 established and is used in Internet-of-Things (IoT) or machine-to- 157 machine (M2M) applications such as smart energy and building 158 automation. 160 The discovery of resources offered by a constrained server is very 161 important in machine-to-machine applications where there are no 162 humans in the loop and static interfaces result in fragility. The 163 discovery of resources provided by an HTTP Web Server is typically 164 called Web Linking [RFC8288]. The use of Web Linking for the 165 description and discovery of resources hosted by constrained web 166 servers is specified by the CoRE Link Format [RFC6690]. However, 167 [RFC6690] only describes how to discover resources from the web 168 server that hosts them by querying "/.well-known/core". In many 169 constrained scenarios, direct discovery of resources is not practical 170 due to sleeping nodes, or networks where multicast traffic is 171 inefficient. These problems can be solved by employing an entity 172 called a Resource Directory (RD), which contains information about 173 resources held on other servers, allowing lookups to be performed for 174 those resources. 176 This document specifies the web interfaces that an RD supports for 177 web servers to discover the RD and to register, maintain, lookup and 178 remove information on resources. Furthermore, new target attributes 179 useful in conjunction with an RD are defined. Although the examples 180 in this document show the use of these interfaces with CoAP 181 [RFC7252], they can be applied in an equivalent manner to HTTP 182 [RFC7230]. 184 2. Terminology 186 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 187 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 188 "OPTIONAL" in this document are to be interpreted as described in BCP 189 14 [RFC2119] [RFC8174] when, and only when, they appear in all 190 capitals, as shown here. 192 The term "byte" is used in its now customary sense as a synonym for 193 "octet". 195 This specification requires readers to be familiar with all the terms 196 and concepts that are discussed in [RFC3986], [RFC8288] and 197 [RFC6690]. Readers should also be familiar with the terms and 198 concepts discussed in [RFC7252]. To describe the REST interfaces 199 defined in this specification, the URI Template format is used 200 [RFC6570]. 202 This specification makes use of the following additional terminology: 204 resolve against 205 The expression "a URI-reference is _resolved against_ a base URI" 206 is used to describe the process of [RFC3986] Section 5.2. 207 Noteworthy corner cases are that if the URI-reference is a (full) 208 URI and resolved against any base URI, that gives the original 209 full URI, and that resolving an empty URI reference gives the base 210 URI without any fragment identifier. 212 Resource Directory (RD) 213 A web entity that stores information about web resources and 214 implements the REST interfaces defined in this specification for 215 discovery, for the creation, the maintenance and the removal of 216 registrations, and for lookup of the registered resources. 218 Sector 219 In the context of an RD, a sector is a logical grouping of 220 endpoints. 222 The abbreviation "d=" is used for the sector in query parameters 223 for compatibility with deployed implementations. 225 Endpoint 226 Endpoint (EP) is a term used to describe a web server or client in 227 [RFC7252]. In the context of this specification an endpoint is 228 used to describe a web server that registers resources to the RD. 229 An endpoint is identified by its endpoint name, which is included 230 during registration, and has a unique name within the associated 231 sector of the registration. 233 Registration Base URI 234 The Base URI of a Registration is a URI that typically gives 235 scheme and authority information about an Endpoint. The 236 Registration Base URI is provided at registration time, and is 237 used by the RD to resolve relative references of the registration 238 into URIs. 240 Target 241 The target of a link is the destination address (URI) of the link. 242 It is sometimes identified with "href=", or displayed as 243 "". Relative targets need resolving with respect to the 244 Base URI (section 5.2 of [RFC3986]). 246 This use of the term Target is consistent with [RFC8288]'s use of 247 the term. 249 Context 250 The context of a link is the source address (URI) of the link, and 251 describes which resource is linked to the target. A link's 252 context is made explicit in serialized links as the "anchor=" 253 attribute. 255 This use of the term Context is consistent with [RFC8288]'s use of 256 the term. 258 Directory Resource 259 A resource in the RD containing registration resources. 261 Registration Resource 262 A resource in the RD that contains information about an Endpoint 263 and its links. 265 Commissioning Tool 266 Commissioning Tool (CT) is a device that assists during 267 installation events by assigning values to parameters, naming 268 endpoints and groups, or adapting the installation to the needs of 269 the applications. 271 Registrant-ep 272 Registrant-ep is the endpoint that is registered into the RD. The 273 registrant-ep can register itself, or a CT registers the 274 registrant-ep. 276 RDAO 277 Resource Directory Address Option. A new IPv6 Neighbor Discovery 278 option defined for announcing an RD's address. 280 3. Architecture and Use Cases 281 3.1. Principles 283 The RD is primarily a tool to make discovery operations more 284 efficient than querying /.well-known/core on all connected devices, 285 or across boundaries that would limit those operations. 287 It provides information about resources hosted by other devices that 288 could otherwise only be obtained by directly querying the /.well- 289 known/core resource on these other devices, either by a unicast 290 request or a multicast request. 292 Information SHOULD only be stored in the RD if it can be obtained by 293 querying the described device's /.well-known/core resource directly. 295 Data in the RD can only be provided by the device which hosts those 296 data or a dedicated Commissioning Tool (CT). These CTs act on behalf 297 of endpoints too constrained, or generally unable, to present that 298 information themselves. No other client can modify data in the RD. 299 Changes to the information in the RD do not propagate automatically 300 back to the web servers from where the information originated. 302 3.2. Architecture 304 The RD architecture is illustrated in Figure 1. An RD is used as a 305 repository of registrations describing resources hosted on other web 306 servers, also called endpoints (EP). An endpoint is a web server 307 associated with a scheme, IP address and port. A physical node may 308 host one or more endpoints. The RD implements a set of REST 309 interfaces for endpoints to register and maintain RD registrations, 310 and for endpoints to lookup resources from the RD. An RD can be 311 logically segmented by the use of Sectors. 313 A mechanism to discover an RD using CoRE Link Format [RFC6690] is 314 defined. 316 Registrations in the RD are soft state and need to be periodically 317 refreshed. 319 An endpoint uses specific interfaces to register, update and remove a 320 registration. It is also possible for an RD to fetch Web Links from 321 endpoints and add their contents to its registrations. 323 At the first registration of an endpoint, a "registration resource" 324 is created, the location of which is returned to the registering 325 endpoint. The registering endpoint uses this registration resource 326 to manage the contents of registrations. 328 A lookup interface for discovering any of the Web Links stored in the 329 RD is provided using the CoRE Link Format. 331 Registration Lookup 332 Interface Interface 333 +----+ | | 334 | EP |---- | | 335 +----+ ---- | | 336 --|- +------+ | 337 +----+ | ----| | | +--------+ 338 | EP | ---------|-----| RD |----|-----| Client | 339 +----+ | ----| | | +--------+ 340 --|- +------+ | 341 +----+ ---- | | 342 | CT |---- | | 343 +----+ 345 Figure 1: The RD architecture. 347 A Registrant-EP MAY keep concurrent registrations to more than one RD 348 at the same time if explicitly configured to do so, but that is not 349 expected to be supported by typical EP implementations. Any such 350 registrations are independent of each other. The usual expectation 351 when multiple discovery mechanisms or addresses are configured is 352 that they constitute a fall-back path for a single registration. 354 3.3. RD Content Model 356 The Entity-Relationship (ER) models shown in Figure 2 and Figure 3 357 model the contents of /.well-known/core and the RD respectively, with 358 entity-relationship diagrams [ER]. Entities (rectangles) are used 359 for concepts that exist independently. Attributes (ovals) are used 360 for concepts that exist only in connection with a related entity. 361 Relations (diamonds) give a semantic meaning to the relation between 362 entities. Numbers specify the cardinality of the relations. 364 Some of the attribute values are URIs. Those values are always full 365 URIs and never relative references in the information model. They 366 can, however, be expressed as relative references in serializations, 367 and often are. 369 These models provide an abstract view of the information expressed in 370 link-format documents and an RD. They cover the concepts, but not 371 necessarily all details of an RD's operation; they are meant to give 372 an overview, and not be a template for implementations. 374 +----------------------+ 375 | /.well-known/core | 376 +----------------------+ 377 | 378 | 1 379 ////////\\\\\\\ 380 < contains > 381 \\\\\\\\/////// 382 | 383 | 0+ 384 +--------------------+ 385 | link | 386 +--------------------+ 387 | 388 | 1 oooooooo 389 +-----o target o 390 | oooooooo 391 oooooooooooo 0+ | 392 o target o--------+ 393 o attribute o | 0+ oooooo 394 oooooooooooo +-----o rel o 395 | oooooo 396 | 397 | 1 ooooooooo 398 +-----o context o 399 ooooooooo 401 Figure 2: ER Model of the content of /.well-known/core 403 The model shown in Figure 2 models the contents of /.well-known/core 404 which contains: 406 * a set of links belonging to the hosting web server 408 The web server is free to choose links it deems appropriate to be 409 exposed in its "/.well-known/core". Typically, the links describe 410 resources that are served by the host, but the set can also contain 411 links to resources on other servers (see examples in [RFC6690] page 412 14). The set does not necessarily contain links to all resources 413 served by the host. 415 A link has the following attributes (see [RFC8288]): 417 * Zero or more link relations: They describe relations between the 418 link context and the link target. 420 In link-format serialization, they are expressed as space- 421 separated values in the "rel" attribute, and default to "hosts". 423 * A link context URI: It defines the source of the relation, e.g. 424 _who_ "hosts" something. 426 In link-format serialization, it is expressed in the "anchor" 427 attribute and defaults to the Origin of the target (practically: 428 the target with its path and later components removed) 430 * A link target URI: It defines the destination of the relation 431 (e.g. _what_ is hosted), and is the topic of all target 432 attributes. 434 In link-format serialization, it is expressed between angular 435 brackets, and sometimes called the "href". 437 * Other target attributes (e.g. resource type (rt), interface (if), 438 or content format (ct)). These provide additional information 439 about the target URI. 441 +--------------+ 442 + RD + 443 +--------------+ 444 | 1 445 | 446 | 447 | 448 | 449 //////\\\\ 450 < contains > 451 \\\\\///// 452 | 453 0+ | 454 ooooooo 1 +---------------+ 455 o base o-------| registration | 456 ooooooo +---------------+ 457 | | 1 458 | +--------------+ 459 oooooooo 1 | | 460 o href o----+ /////\\\\ 461 oooooooo | < contains > 462 | \\\\\///// 463 oooooooo 1 | | 464 o ep o----+ | 0+ 465 oooooooo | +------------------+ 466 | | link | 467 oooooooo 0-1 | +------------------+ 468 o d o----+ | 469 oooooooo | | 1 oooooooo 470 | +-----o target o 471 oooooooo 1 | | oooooooo 472 o lt o----+ ooooooooooo 0+ | 473 oooooooo | o target o-----+ 474 | o attribute o | 0+ oooooo 475 ooooooooooo 0+ | ooooooooooo +-----o rel o 476 o endpoint o----+ | oooooo 477 o attribute o | 478 ooooooooooo | 1 ooooooooo 479 +----o context o 480 ooooooooo 482 Figure 3: ER Model of the content of the RD 484 The model shown in Figure 3 models the contents of the RD which 485 contains in addition to /.well-known/core: 487 * 0 to n Registrations of endpoints, 488 A registration is associated with one endpoint. A registration 489 defines a set of links as defined for /.well-known/core. A 490 Registration has six types of attributes: 492 * an endpoint name ("ep", a Unicode string) unique within a sector 494 * a Registration Base URI ("base", a URI typically describing the 495 scheme://authority part) 497 * a lifetime ("lt"), 499 * a registration resource location inside the RD ("href"), 501 * optionally a sector ("d", a Unicode string) 503 * optional additional endpoint attributes (from Section 9.3) 505 The cardinality of "base" is currently 1; future documents are 506 invited to extend the RD specification to support multiple values 507 (e.g. [I-D.silverajan-core-coap-protocol-negotiation]). Its value 508 is used as a Base URI when resolving URIs in the links contained in 509 the endpoint. 511 Links are modelled as they are in Figure 2. 513 3.4. Link-local addresses and zone identifiers 515 Registration Base URIs can contain link-local IP addresses. To be 516 usable across hosts, those cannot be serialized to contain zone 517 identifiers (see [RFC6874] Section 1). 519 Link-local addresses can only be used on a single link (therefore RD 520 servers cannot announce them when queried on a different link), and 521 lookup clients using them need to keep track of which interface they 522 got them from. 524 Therefore, it is advisable in many scenarios to use addresses with 525 larger scope if available. 527 3.5. Use Case: Cellular M2M 529 Over the last few years, mobile operators around the world have 530 focused on development of M2M solutions in order to expand the 531 business to the new type of users: machines. The machines are 532 connected directly to a mobile network using an appropriate embedded 533 wireless interface (GSM/GPRS, WCDMA, LTE) or via a gateway providing 534 short and wide range wireless interfaces. The ambition in such 535 systems is to build them from reusable components. These speed up 536 development and deployment, and enable shared use of machines across 537 different applications. One crucial component of such systems is the 538 discovery of resources (and thus the endpoints they are hosted on) 539 capable of providing required information at a given time or acting 540 on instructions from the end users. 542 Imagine a scenario where endpoints installed on vehicles enable 543 tracking of the position of these vehicles for fleet management 544 purposes and allow monitoring of environment parameters. During the 545 boot-up process endpoints register with an RD, which is hosted by the 546 mobile operator or somewhere in the cloud. Periodically, these 547 endpoints update their registration and may modify resources they 548 offer. 550 When endpoints are not always connected, for example because they 551 enter a sleep mode, a remote server is usually used to provide proxy 552 access to the endpoints. Mobile apps or web applications for 553 environment monitoring contact the RD, look up the endpoints capable 554 of providing information about the environment using an appropriate 555 set of link parameters, obtain information on how to contact them 556 (URLs of the proxy server), and then initiate interaction to obtain 557 information that is finally processed, displayed on the screen and 558 usually stored in a database. Similarly, fleet management systems 559 provide the appropriate link parameters to the RD to look up for EPs 560 deployed on the vehicles the application is responsible for. 562 3.6. Use Case: Home and Building Automation 564 Home and commercial building automation systems can benefit from the 565 use of IoT web services. The discovery requirements of these 566 applications are demanding. Home automation usually relies on run- 567 time discovery to commission the system, whereas in building 568 automation a combination of professional commissioning and run-time 569 discovery is used. Both home and building automation involve peer- 570 to-peer interactions between endpoints, and involve battery-powered 571 sleeping devices. Both can use the common RD infrastructure to 572 establish device interactions efficiently, but can pick security 573 policies suitable for their needs. 575 Two phases can be discerned for a network servicing the system: (1) 576 installation and (2) operation. During the operational phase, the 577 network is connected to the Internet with a Border Router (e.g. a 578 6LoWPAN Border Router (6LBR), see {{RFC6775}) and the nodes connected 579 to the network can use the Internet services that are provided by the 580 Internet Provider or the network administrator. During the 581 installation phase, the network is completely stand-alone, no Border 582 Router is connected, and the network only supports the IP 583 communication between the connected nodes. The installation phase is 584 usually followed by the operational phase. As an RD's operations 585 work without hard dependencies on names or addresses, it can be used 586 for discovery across both phases. 588 3.7. Use Case: Link Catalogues 590 Resources may be shared through data brokers that have no knowledge 591 beforehand of who is going to consume the data. An RD can be used to 592 hold links about resources and services hosted anywhere to make them 593 discoverable by a general class of applications. 595 For example, environmental and weather sensors that generate data for 596 public consumption may provide data to an intermediary server, or 597 broker. Sensor data are published to the intermediary upon changes 598 or at regular intervals. Descriptions of the sensors that resolve to 599 links to sensor data may be published to an RD. Applications wishing 600 to consume the data can use RD Lookup to discover and resolve links 601 to the desired resources and endpoints. The RD service need not be 602 coupled with the data intermediary service. Mapping of RDs to data 603 intermediaries may be many-to-many. 605 Metadata in web link formats like [RFC6690] which may be internally 606 stored as triples, or relation/attribute pairs providing metadata 607 about resource links, need to be supported by RDs. External 608 catalogues that are represented in other formats may be converted to 609 common web linking formats for storage and access by RDs. Since it 610 is common practice for these to be encoded in URNs [RFC8141], simple 611 and lossless structural transforms should generally be sufficient to 612 store external metadata in RDs. 614 The additional features of an RD allow sectors to be defined to 615 enable access to a particular set of resources from particular 616 applications. This provides isolation and protection of sensitive 617 data when needed. Application groups with multicast addresses may be 618 defined to support efficient data transport. 620 4. RD discovery and other interface-independent components 622 This and the following sections define the required set of REST 623 interfaces between an RD, endpoints and lookup clients. Although the 624 examples throughout these sections assume the use of CoAP [RFC7252], 625 these REST interfaces can also be realized using HTTP [RFC7230]. The 626 multicast discovery and simple registration operations are exceptions 627 to that, as they rely on mechanisms unavailable in HTTP. In all 628 definitions in these sections, both CoAP response codes (with dot 629 notation) and HTTP response codes (without dot notation) are shown. 630 An RD implementing this specification MUST support the discovery, 631 registration, update, lookup, and removal interfaces. 633 All operations on the contents of the RD MUST be atomic and 634 idempotent. 636 For several operations, interface templates are given in list form; 637 those describe the operation participants, request codes, URIs, 638 content formats and outcomes. Sections of those templates contain 639 normative content about Interaction, Method, URI Template and URI 640 Template Variables as well as the details of the Success condition. 641 The additional sections on options like Content-Format and on Failure 642 codes give typical cases that an implementation of the RD should deal 643 with. Those serve to illustrate the typical responses to readers who 644 are not yet familiar with all the details of CoAP based interfaces; 645 they do not limit what a server may respond under atypical 646 circumstances. 648 REST clients (registrant-EPs and CTs during registration and 649 maintenance, lookup clients, RD servers during simple registrations) 650 must be prepared to receive any unsuccessful code and act upon it 651 according to its definition, options and/or payload to the best of 652 their capabilities, falling back to failing the operation if recovery 653 is not possible. In particular, they SHOULD retry the request upon 654 5.03 (Service Unavailable; 503 in HTTP) according to the Max-Age 655 (Retry-After in HTTP) option, and SHOULD fall back to link-format 656 when receiving 4.15 (Unsupported Content-Format; 415 in HTTP). 658 An RD MAY make the information submitted to it available to further 659 directories (subject to security policies on link confidentiality), 660 if it can ensure that a loop does not form. The protocol used 661 between directories to ensure loop-free operation is outside the 662 scope of this document. 664 4.1. Finding a Resource Directory 666 A (re-)starting device may want to find one or more RDs before it can 667 discover their URIs. Dependent on the operational conditions, one or 668 more of the techniques below apply. 670 The device may be pre-configured to exercise specific mechanisms for 671 finding the RD: 673 1. It may be configured with a specific IP address for the RD. That 674 IP address may also be an anycast address, allowing the network 675 to forward RD requests to an RD that is topologically close; each 676 target network environment in which some of these preconfigured 677 nodes are to be brought up is then configured with a route for 678 this anycast address that leads to an appropriate RD. (Instead 679 of using an anycast address, a multicast address can also be 680 preconfigured. The RD servers then need to configure one of 681 their interfaces with this multicast address.) 683 2. It may be configured with a DNS name for the RD and use DNS to 684 return the IP address of the RD; it can find a DNS server to 685 perform the lookup using the usual mechanisms for finding DNS 686 servers. 688 3. It may be configured to use a service discovery mechanism such as 689 DNS-SD, as outlined in Section 4.1.2. 691 For cases where the device is not specifically configured with a way 692 to find an RD, the network may want to provide a suitable default. 694 1. The IPv6 Neighbor Discovery option RDAO Section 4.1.1 can do 695 that. 697 2. When DHCP is in use, this could be provided via a DHCP option (no 698 such option is defined at the time of writing). 700 Finally, if neither the device nor the network offers any specific 701 configuration, the device may want to employ heuristics to find a 702 suitable RD. 704 The present specification does not fully define these heuristics, but 705 suggests a number of candidates: 707 1. In a 6LoWPAN, just assume the Border Router (6LBR) can act as an 708 RD (using the ABRO option to find that [RFC6775]). Confirmation 709 can be obtained by sending a unicast to "coap://[6LBR]/.well- 710 known/core?rt=core.rd*". 712 2. In a network that supports multicast well, discovering the RD 713 using a multicast query for /.well-known/core as specified in 714 CoRE Link Format [RFC6690]: Sending a Multicast GET to 715 "coap://[MCD1]/.well-known/core?rt=core.rd*". RDs within the 716 multicast scope will answer the query. 718 When answering a multicast request directed at a link-local group, 719 the RD may want to respond from a routable address; this makes it 720 easier for registrants to use one of their own routable addresses for 721 registration. When [RFC6724] is used for source address selection, 722 this can be achieved by applying the changes of its Section 10.4, 723 picking public addresses in its Section 5 Rule 7, and superseding 724 rule 8 with preferring the source address's precedence. 726 As some of the RD addresses obtained by the methods listed here are 727 just (more or less educated) guesses, endpoints MUST make use of any 728 error messages to very strictly rate-limit requests to candidate IP 729 addresses that don't work out. For example, an ICMP Destination 730 Unreachable message (and, in particular, the port unreachable code 731 for this message) may indicate the lack of a CoAP server on the 732 candidate host, or a CoAP error response code such as 4.05 "Method 733 Not Allowed" may indicate unwillingness of a CoAP server to act as a 734 directory server. 736 The following RD discovery mechanisms are recommended: 738 * In managed networks with border routers that need stand-alone 739 operation, the RDAO option is recommended (e.g. operational phase 740 described in Section 3.6). 742 * In managed networks without border router (no Internet services 743 available), the use of a preconfigured anycast address is 744 recommended (e.g. installation phase described in Section 3.6). 746 * In networks managed using DNS-SD, the use of DNS-SD for discovery 747 as described in Section 4.1.2 is recommended. 749 The use of multicast discovery in mesh networks is NOT RECOMMENDED. 751 4.1.1. Resource Directory Address Option (RDAO) 753 The Resource Directory Address Option (RDAO) carries information 754 about the address of the RD in RAs (Router Advertisements) of IPv6 755 Neighbor Discovery (ND), similar to how RDNSS options [RFC8106] are 756 sent. This information is needed when endpoints cannot discover the 757 RD with a link-local or realm-local scope multicast address, for 758 instance because the endpoint and the RD are separated by a Border 759 Router (6LBR). In many circumstances the availability of DHCP cannot 760 be guaranteed either during commissioning of the network. The 761 presence and the use of the RD is essential during commissioning. 763 It is possible to send multiple RDAO options in one message, 764 indicating as many RD addresses. 766 The RDAO format is: 768 0 1 2 3 769 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 770 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 771 | Type | Length = 3 | Reserved | 772 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 773 | Valid Lifetime | 774 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 775 | | 776 + + 777 | | 778 + RD Address + 779 | | 780 + + 781 | | 782 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 784 Fields: 786 Type: TBD38 788 Length: 8-bit unsigned integer. The length of 789 the option in units of 8 bytes. 790 Always 3. 792 Reserved: This field is unused. It MUST be 793 initialized to zero by the sender and 794 MUST be ignored by the receiver. 796 Valid Lifetime: 32-bit unsigned integer. The length of 797 time in seconds (relative to 798 the time the packet is received) that 799 this RD address is valid. 800 A value of all zero bits (0x0) indicates 801 that this RD address 802 is not valid anymore. 804 RD Address: IPv6 address of the RD. 806 Figure 4: Resource Directory Address Option 808 4.1.2. Using DNS-SD to discover a Resource Directory 810 An RD can advertise its presence in DNS-SD [RFC6763] using the 811 service name "_core-rd._udp" (for CoAP), "_core-rd-dtls._udp" (for 812 CoAP over DTLS), "_core-rd._tcp" (for CoAP over TCP) or "_core-rd- 813 tls._tcp" (for CoAP over TLS) defined in this document. (For the 814 WebSocket transports of CoAP, no service is defined as DNS-SD is 815 typically unavailable in environments where CoAP over WebSockets is 816 used). 818 The selection of the service indicates the protocol used, and the SRV 819 record points the client to a host name and port to use as a starting 820 point for the URI discovery steps of Section 4.3. 822 This section is a simplified concrete application of the more generic 823 mechanism specified in [I-D.ietf-core-rd-dns-sd]. 825 4.2. Payload Content Formats 827 RDs implementing this specification MUST support the application/ 828 link-format content format (ct=40). 830 RDs implementing this specification MAY support additional content 831 formats. 833 Any additional content format supported by an RD implementing this 834 specification SHOULD be able to express all the information 835 expressible in link-format. It MAY be able to express information 836 that is inexpressible in link-format, but those expressions SHOULD be 837 avoided where possible. 839 4.3. URI Discovery 841 Before an endpoint can make use of an RD, it must first know the RD's 842 address and port, and the URI path information for its REST APIs. 843 This section defines discovery of the RD and its URIs using the well- 844 known interface of the CoRE Link Format [RFC6690] after having 845 discovered a host as described in Section 4.1. 847 Discovery of the RD registration URI is performed by sending either a 848 multicast or unicast GET request to "/.well-known/core" and including 849 a Resource Type (rt) parameter [RFC6690] with the value "core.rd" in 850 the query string. Likewise, a Resource Type parameter value of 851 "core.rd-lookup*" is used to discover the URIs for RD Lookup 852 operations, core.rd* is used to discover all URIs for RD operations. 853 Upon success, the response will contain a payload with a link format 854 entry for each RD function discovered, indicating the URI of the RD 855 function returned and the corresponding Resource Type. When 856 performing multicast discovery, the multicast IP address used will 857 depend on the scope required and the multicast capabilities of the 858 network (see Section 9.5). 860 An RD MAY provide hints about the content-formats it supports in the 861 links it exposes or registers, using the "ct" target attribute, as 862 shown in the example below. Clients MAY use these hints to select 863 alternate content-formats for interaction with the RD. 865 HTTP does not support multicast and consequently only unicast 866 discovery can be supported at the using the HTTP "/.well-known/core" 867 resource. 869 RDs implementing this specification MUST support query filtering for 870 the rt parameter as defined in [RFC6690]. 872 While the link targets in this discovery step are often expressed in 873 path-absolute form, this is not a requirement. Clients of the RD 874 SHOULD therefore accept URIs of all schemes they support, both as 875 URIs and relative references, and not limit the set of discovered 876 URIs to those hosted at the address used for URI discovery. 878 With security policies where the client requires the RD to be 879 authorized to act as an RD, that authorization may be limited to 880 resources on which the authorized RD advertises the adequate resource 881 types. Clients that have obtained links they can not rely on yet can 882 repeat the URI discovery step at the /.well-known/core resource of 883 the indicated host to obtain the resource type information from an 884 authorized source. 886 The URI Discovery operation can yield multiple URIs of a given 887 resource type. The client of the RD can use any of the discovered 888 addresses initially. 890 The discovery request interface is specified as follows (this is 891 exactly the Well-Known Interface of [RFC6690] Section 4, with the 892 additional requirement that the server MUST support query filtering): 894 Interaction: EP, CT or Client -> RD 896 Method: GET 898 URI Template: /.well-known/core{?rt} 900 URI Template Variables: rt := Resource Type. SHOULD contain one of 901 the values "core.rd", "core.rd-lookup*", "core.rd-lookup-res", 902 "core.rd-lookup-ep", or "core.rd*" 904 Accept: absent, application/link-format or any other media type 905 representing web links 907 The following response is expected on this interface: 909 Success: 2.05 "Content" or 200 "OK" with an application/link-format 910 or other web link payload containing one or more matching entries 911 for the RD resource. 913 The following example shows an endpoint discovering an RD using this 914 interface, thus learning that the directory resource location, in 915 this example, is /rd, and that the content-format delivered by the 916 server hosting the resource is application/link-format (ct=40). Note 917 that it is up to the RD to choose its RD locations. 919 Req: GET coap://[MCD1]/.well-known/core?rt=core.rd* 921 Res: 2.05 Content 922 Payload: 923 ;rt=core.rd;ct=40, 924 ;rt=core.rd-lookup-ep;ct=40, 925 ;rt=core.rd-lookup-res;ct=40 927 Figure 5: Example discovery exchange 929 The following example shows the way of indicating that a client may 930 request alternate content-formats. The Content-Format code attribute 931 "ct" MAY include a space-separated sequence of Content-Format codes 932 as specified in Section 7.2.1 of [RFC7252], indicating that multiple 933 content-formats are available. The example below shows the required 934 Content-Format 40 (application/link-format) indicated as well as a 935 CBOR and JSON representation from [I-D.ietf-core-links-json] (which 936 have no numeric values assigned yet, so they are shown as TBD64 and 937 TBD504 as in that draft). The RD resource locations /rd, and /rd- 938 lookup are example values. The server in this example also indicates 939 that it is capable of providing observation on resource lookups. 941 Req: GET coap://[MCD1]/.well-known/core?rt=core.rd* 943 Res: 2.05 Content 944 Payload: 945 ;rt=core.rd;ct="40 65225", 946 ;rt=core.rd-lookup-res;ct="40 TBD64 TBD504";obs, 947 ;rt=core.rd-lookup-ep;ct="40 TBD64 TBD504" 949 Figure 6: Example discovery exchange indicating additional 950 content-formats 952 For maintenance, management and debugging, it can be useful to 953 identify the components that constitute the RD server. The 954 identification can be used to find client-server incompatibilities, 955 supported features, required updates and other aspects. The Well- 956 Known interface described in Section 4 of [RFC6690] can be used to 957 find such data. 959 It would typically be stored in an implementation information link 960 (as described in [I-D.bormann-t2trg-rel-impl]): 962 Req: GET /.well-known/core?rel=impl-info 964 Res: 2.05 Content 965 Payload: 966 ; 967 rel=impl-info 969 Figure 7: Example exchange of obtaining implementation 970 information, using the relation type currently proposed in the 971 work-in-progress document 973 Note that depending on the particular server's architecture, such a 974 link could be anchored at the RD server's root (as in this example), 975 or at individual RD components. The latter is to be expected when 976 different applications are run on the same server. 978 5. Registration 980 After discovering the location of an RD, a registrant-ep or CT MAY 981 register the resources of the registrant-ep using the registration 982 interface. This interface accepts a POST from an endpoint containing 983 the list of resources to be added to the directory as the message 984 payload in the CoRE Link Format [RFC6690] or other representations of 985 web links, along with query parameters indicating the name of the 986 endpoint, and optionally the sector, lifetime and base URI of the 987 registration. It is expected that other specifications will define 988 further parameters (see Section 9.3). The RD then creates a new 989 registration resource in the RD and returns its location. The 990 receiving endpoint MUST use that location when refreshing 991 registrations using this interface. Registration resources in the RD 992 are kept active for the period indicated by the lifetime parameter. 993 The creating endpoint is responsible for refreshing the registration 994 resource within this period using either the registration or update 995 interface. The registration interface MUST be implemented to be 996 idempotent, so that registering twice with the same endpoint 997 parameters ep and d (sector) does not create multiple registration 998 resources. 1000 The following rules apply for a registration request targeting a 1001 given (ep, d) value pair: 1003 * When the (ep, d) value pair of the registration-request is 1004 different from any existing registration, a new registration is 1005 generated. 1007 * When the (ep, d) value pair of the registration-request is equal 1008 to an existing registration, the content and parameters of the 1009 existing registration are replaced with the content of the 1010 registration request. Like the later changes to registration 1011 resources, security policies (Section 7) usually require such 1012 requests to come from the same device. 1014 The posted link-format document can (and typically does) contain 1015 relative references both in its link targets and in its anchors, or 1016 contain empty anchors. The RD server needs to resolve these 1017 references in order to faithfully represent them in lookups. They 1018 are resolved against the base URI of the registration, which is 1019 provided either explicitly in the "base" parameter or constructed 1020 implicitly from the requester's URI as constructed from its network 1021 address and scheme. 1023 For media types to which Appendix C applies (i.e. documents in 1024 application/link-format), request bodies MUST be expressed in Limited 1025 Link Format. 1027 The registration request interface is specified as follows: 1029 Interaction: EP or CT -> RD 1031 Method: POST 1033 URI Template: {+rd}{?ep,d,lt,base,extra-attrs*} 1035 URI Template Variables: rd := RD registration URI (mandatory). 1036 This is the location of the RD, as obtained from discovery. 1038 ep := Endpoint name (mostly mandatory). 1039 The endpoint name is an identifier that MUST be unique within a 1040 sector. As the endpoint name is a Unicode string, it is 1041 encoded in UTF-8 (and possibly pct-encoded) during variable 1042 expansion (see [RFC6570] Section 3.2.1). The endpoint name 1043 MUST NOT contain any character in the inclusive ranges 0-31 or 1044 127-159. The maximum length of this parameter is 63 UTF-8 1045 encoded bytes. If the RD is configured to recognize the 1046 endpoint to be authorized to use exactly one endpoint name, the 1047 RD assigns that name. In that case, giving the endpoint name 1048 becomes optional for the client; if the client gives any other 1049 endpoint name, it is not authorized to perform the 1050 registration. 1052 d := Sector (optional). The sector to 1053 which this endpoint belongs. When this parameter is not 1054 present, the RD MAY associate the endpoint with a configured 1055 default sector (possibly based on the endpoint's authorization) 1056 or leave it empty. The sector is encoded like the ep 1057 parameter, and is limited to 63 UTF-8 encoded bytes as well. 1059 lt := Lifetime (optional). Lifetime of the 1060 registration in seconds. Range of 1-4294967295. If no 1061 lifetime is included in the initial registration, a default 1062 value of 90000 (25 hours) SHOULD be assumed. 1064 base := Base URI (optional). This 1065 parameter sets the base URI of the registration, under which 1066 the relative links in the payload are to be interpreted. The 1067 specified URI typically does not have a path component of its 1068 own, and MUST be suitable as a base URI to resolve any relative 1069 references given in the registration. The parameter is 1070 therefore usually of the shape "scheme://authority" for HTTP 1071 and CoAP URIs. The URI SHOULD NOT have a query or fragment 1072 component as any non-empty relative part in a reference would 1073 remove those parts from the resulting URI. 1075 In the absence of this parameter the scheme of the protocol, 1076 source address and source port of the registration request are 1077 assumed. The Base URI is consecutively constructed by 1078 concatenating the used protocol's scheme with the characters 1079 "://", the requester's source address as an address literal and 1080 ":" followed by its port (if it was not the protocol's default 1081 one) in analogy to [RFC7252] Section 6.5. 1083 This parameter is mandatory when the directory is filled by a 1084 third party such as an commissioning tool. 1086 If the registrant-ep uses an ephemeral port to register with, 1087 it MUST include the base parameter in the registration to 1088 provide a valid network path. 1090 A registrant that cannot be reached by potential lookup clients 1091 at the address it registers from (e.g. because it is behind 1092 some form of Network Address Translation (NAT)) MUST provide a 1093 reachable base address with its registration. 1095 If the Base URI contains a link-local IP literal, it MUST NOT 1096 contain a Zone Identifier, and MUST be local to the link on 1097 which the registration request is received. 1099 Endpoints that register with a base that contains a path 1100 component cannot efficiently express their registrations in 1101 Limited Link Format (Appendix C). Those applications should 1102 use different representations of links to which Appendix C is 1103 not applicable (e.g. [I-D.hartke-t2trg-coral]). 1105 extra-attrs := Additional registration 1106 attributes (optional). The endpoint can pass any parameter 1107 registered at Section 9.3 to the directory. If the RD is aware 1108 of the parameter's specified semantics, it processes it 1109 accordingly. Otherwise, it MUST store the unknown key and its 1110 value(s) as an endpoint attribute for further lookup. 1112 Content-Format: application/link-format or any other indicated media 1113 type representing web links 1115 The following response is expected on this interface: 1117 Success: 2.01 "Created" or 201 "Created". The Location-Path option 1118 or Location header field MUST be included in the response. This 1119 location MUST be a stable identifier generated by the RD as it is 1120 used for all subsequent operations on this registration resource. 1121 The registration resource location thus returned is for the 1122 purpose of updating the lifetime of the registration and for 1123 maintaining the content of the registered links, including 1124 updating and deleting links. 1126 A registration with an already registered ep and d value pair 1127 responds with the same success code and location as the original 1128 registration; the set of links registered with the endpoint is 1129 replaced with the links from the payload. 1131 The location MUST NOT have a query or fragment component, as that 1132 could conflict with query parameters during the Registration 1133 Update operation. Therefore, the Location-Query option MUST NOT 1134 be present in a successful response. 1136 If the registration fails, including request timeouts, or if delays 1137 from Service Unavailable responses with Max-Age or Retry-After 1138 accumulate to exceed the registrant's configured timeouts, it SHOULD 1139 pick another registration URI from the "URI Discovery" step and if 1140 there is only one or the list is exhausted, pick other choices from 1141 the "Finding a Resource Directory" step. Care has to be taken to 1142 consider the freshness of results obtained earlier, e.g. of the 1143 result of a "/.well-known/core" response, the lifetime of an RDAO 1144 option and of DNS responses. Any rate limits and persistent errors 1145 from the "Finding a Resource Directory" step must be considered for 1146 the whole registration time, not only for a single operation. 1148 The following example shows a registrant-ep with the name "node1" 1149 registering two resources to an RD using this interface. The 1150 location "/rd" is an example RD location discovered in a request 1151 similar to Figure 5. 1153 Req: POST coap://rd.example.com/rd?ep=node1 1154 Content-Format: 40 1155 Payload: 1156 ;rt=temperature-c;if=sensor, 1157 ; 1158 anchor="/sensors/temp";rel=describedby 1160 Res: 2.01 Created 1161 Location-Path: /rd/4521 1163 Figure 8: Example registration payload 1165 An RD may optionally support HTTP. Here is an example of almost the 1166 same registration operation above, when done using HTTP. 1168 Req: 1169 POST /rd?ep=node1&base=http://[2001:db8:1::1] HTTP/1.1 1170 Host: rd.example.com 1171 Content-Type: application/link-format 1173 ;rt=temperature-c;if=sensor, 1174 ; 1175 anchor="/sensors/temp";rel=describedby 1177 Res: 1178 HTTP/1.1 201 Created 1179 Location: /rd/4521 1181 Figure 9: Example registration payload as expressed using HTTP 1183 5.1. Simple Registration 1185 Not all endpoints hosting resources are expected to know how to 1186 upload links to an RD as described in Section 5. Instead, simple 1187 endpoints can implement the Simple Registration approach described in 1188 this section. An RD implementing this specification MUST implement 1189 Simple Registration. However, there may be security reasons why this 1190 form of directory discovery would be disabled. 1192 This approach requires that the registrant-ep makes available the 1193 hosted resources that it wants to be discovered, as links on its 1194 "/.well-known/core" interface as specified in [RFC6690]. The links 1195 in that document are subject to the same limitations as the payload 1196 of a registration (with respect to Appendix C). 1198 * The registrant-ep finds one or more addresses of the directory 1199 server as described in Section 4.1. 1201 * The registrant-ep sends (and regularly refreshes with) a POST 1202 request to the "/.well-known/rd" URI of the directory server of 1203 choice. The body of the POST request is empty, and triggers the 1204 resource directory server to perform GET requests at the 1205 requesting registrant-ep's /.well-known/core to obtain the link- 1206 format payload to register. 1208 The registrant-ep includes the same registration parameters in the 1209 POST request as it would per Section 5. The registration base URI 1210 of the registration is taken from the registrant-ep's network 1211 address (as is default with regular registrations). 1213 Example request from registrant-EP to RD (unanswered until the 1214 next step): 1216 Req: POST /.well-known/rd?lt=6000&ep=node1 1217 (No payload) 1219 Figure 10: First half example exchange of a simple registration 1221 * The RD queries the registrant-ep's discovery resource to determine 1222 the success of the operation. It SHOULD keep a cache of the 1223 discovery resource and not query it again as long as it is fresh. 1225 Example request from the RD to the registrant-EP: 1227 Req: GET /.well-known/core 1228 Accept: 40 1230 Res: 2.05 Content 1231 Content-Format: 40 1232 Payload: 1233 1235 Figure 11: Example exchange of the RD querying the simple endpoint 1237 With this response, the RD would answer the previous step's request: 1239 Res: 2.04 Changed 1240 Figure 12: Second half example exchange of a simple registration 1242 The sequence of fetching the registration content before sending a 1243 successful response was chosen to make responses reliable, and the 1244 point about caching was chosen to still allow very constrained 1245 registrants. Registrants MUST be able to serve a GET request to 1246 "/.well-known/core" after having requested registration. Constrained 1247 devices MAY regard the initial request as temporarily failed when 1248 they need RAM occupied by their own request to serve the RD's GET, 1249 and retry later when the RD already has a cached representation of 1250 their discovery resources. Then, the RD can reply immediately and 1251 the registrant can receive the response. 1253 The simple registration request interface is specified as follows: 1255 Interaction: EP -> RD 1257 Method: POST 1259 URI Template: /.well-known/rd{?ep,d,lt,extra-attrs*} 1261 URI Template Variables are as they are for registration in Section 5. 1262 The base attribute is not accepted to keep the registration interface 1263 simple; that rules out registration over CoAP-over-TCP or HTTP that 1264 would need to specify one. For some time during this document's 1265 development, the URI template "/.well-known/core{?ep,...}" has been 1266 in use instead. 1268 The following response is expected on this interface: 1270 Success: 2.04 "Changed". 1272 For the second interaction triggered by the above, the registrant-ep 1273 takes the role of server and the RD the role of client. (Note that 1274 this is exactly the Well-Known Interface of [RFC6690] Section 4): 1276 Interaction: RD -> EP 1278 Method: GET 1280 URI Template: /.well-known/core 1282 The following response is expected on this interface: 1284 Success: 2.05 "Content". 1286 When the RD uses any authorization credentials to access the 1287 endpoint's discovery resource, or when it is deployed in a location 1288 where third parties might reach it but not the endpoint, it SHOULD 1289 verify that the apparent registrant-ep intends to register with the 1290 given registration parameters before revealing the obtained discovery 1291 information to lookup clients. An easy way to do that is to verify 1292 the simple registration request's sender address using the Echo 1293 option as described in [I-D.ietf-core-echo-request-tag] Section 2.4. 1295 The RD MUST delete registrations created by simple registration after 1296 the expiration of their lifetime. Additional operations on the 1297 registration resource cannot be executed because no registration 1298 location is returned. 1300 5.2. Third-party registration 1302 For some applications, even Simple Registration may be too taxing for 1303 some very constrained devices, in particular if the security 1304 requirements become too onerous. 1306 In a controlled environment (e.g. building control), the RD can be 1307 filled by a third party device, called a Commissioning Tool (CT). 1308 The commissioning tool can fill the RD from a database or other 1309 means. For that purpose scheme, IP address and port of the URI of 1310 the registered device is the value of the "base" parameter of the 1311 registration described in Section 5. 1313 It should be noted that the value of the "base" parameter applies to 1314 all the links of the registration and has consequences for the anchor 1315 value of the individual links as exemplified in Appendix B. An 1316 eventual (currently non-existing) "base" attribute of the link is not 1317 affected by the value of "base" parameter in the registration. 1319 5.3. Operations on the Registration Resource 1321 This section describes how the registering endpoint can maintain the 1322 registrations that it created. The registering endpoint can be the 1323 registrant-ep or the CT. The registrations are resources of the RD. 1325 An endpoint should not use this interface for registrations that it 1326 did not create. This is usually enforced by security policies, which 1327 in general require equivalent credentials for creation of and 1328 operations on a registration. 1330 After the initial registration, the registering endpoint retains the 1331 returned location of the Registration Resource for further 1332 operations, including refreshing the registration in order to extend 1333 the lifetime and "keep-alive" the registration. When the lifetime of 1334 the registration has expired, the RD SHOULD NOT respond to discovery 1335 queries concerning this endpoint. The RD SHOULD continue to provide 1336 access to the Registration Resource after a registration time-out 1337 occurs in order to enable the registering endpoint to eventually 1338 refresh the registration. The RD MAY eventually remove the 1339 registration resource for the purpose of garbage collection. If the 1340 Registration Resource is removed, the corresponding endpoint will 1341 need to be re-registered. 1343 The Registration Resource may also be used cancel the registration 1344 using DELETE, and to perform further operations beyond the scope of 1345 this specification. 1347 Operations on the Registration Resource are sensitive to reordering; 1348 Section 5.3.4 describes how order is restored. 1350 The operations on the Registration Resource are described below. 1352 5.3.1. Registration Update 1354 The update interface is used by the registering endpoint to refresh 1355 or update its registration with an RD. To use the interface, the 1356 registering endpoint sends a POST request to the registration 1357 resource returned by the initial registration operation. 1359 An update MAY update registration parameters like lifetime, base URI 1360 or others. Parameters that are not being changed should not be 1361 included in an update. Adding parameters that have not changed 1362 increases the size of the message but does not have any other 1363 implications. Parameters are included as query parameters in an 1364 update operation as in Section 5. 1366 A registration update resets the timeout of the registration to the 1367 (possibly updated) lifetime of the registration, independent of 1368 whether a "lt" parameter was given. 1370 If the base URI of the registration is changed in an update, relative 1371 references submitted in the original registration or later updates 1372 are resolved anew against the new base. 1374 The registration update operation only describes the use of POST with 1375 an empty payload. Future standards might describe the semantics of 1376 using content formats and payloads with the POST method to update the 1377 links of a registration (see Section 5.3.3). 1379 The update registration request interface is specified as follows: 1381 Interaction: EP or CT -> RD 1382 Method: POST 1384 URI Template: {+location}{?lt,base,extra-attrs*} 1386 URI Template Variables: location := This is the Location returned 1387 by the RD as a result of a successful earlier registration. 1389 lt := Lifetime (optional). Lifetime of the 1390 registration in seconds. Range of 1-4294967295. If no 1391 lifetime is included, the previous last lifetime set on a 1392 previous update or the original registration (falling back to 1393 90000) SHOULD be used. 1395 base := Base URI (optional). This 1396 parameter updates the Base URI established in the original 1397 registration to a new value, and is subject to the same 1398 restrictions as in the registration. If the parameter is set 1399 in an update, it is stored by the RD as the new Base URI under 1400 which to interpret the relative links present in the payload of 1401 the original registration. If the parameter is not set in the 1402 request but was set before, the previous Base URI value is kept 1403 unmodified. If the parameter is not set in the request and was 1404 not set before either, the source address and source port of 1405 the update request are stored as the Base URI. 1407 extra-attrs := Additional registration 1408 attributes (optional). As with the registration, the RD 1409 processes them if it knows their semantics. Otherwise, unknown 1410 attributes are stored as endpoint attributes, overriding any 1411 previously stored endpoint attributes of the same key. 1413 Note that this default behavior does not allow removing an 1414 endpoint attribute in an update. For attributes whose 1415 functionality depends on the endpoints' ability to remove them 1416 in an update, it can make sense to define a value whose 1417 presence is equivalent to the absence of a value. As an 1418 alternative, an extension can define different updating rules 1419 for their attributes. That necessitates either discovery of 1420 whether the RD is aware of that extension, or tolerating the 1421 default behavior. 1423 Content-Format: none (no payload) 1425 The following responses are expected on this interface: 1427 Success: 2.04 "Changed" or 204 "No Content" if the update was 1428 successfully processed. 1430 Failure: 4.04 "Not Found" or 404 "Not Found". Registration does not 1431 exist (e.g. may have been removed). 1433 If the registration update fails in any way, including "Not Found" 1434 and request timeouts, or if the time indicated in a Service 1435 Unavailable Max-Age/Retry-After exceeds the remaining lifetime, the 1436 registering endpoint SHOULD attempt registration again. 1438 The following example shows how the registering endpoint resets the 1439 timeout on its registration resource at an RD using this interface 1440 with the example location value: /rd/4521. 1442 Req: POST /rd/4521 1444 Res: 2.04 Changed 1446 Figure 13: Example update of a registration 1448 The following example shows the registering endpoint updating its 1449 registration resource at an RD using this interface with the example 1450 location value: /rd/4521. The initial registration by the 1451 registering endpoint set the following values: 1453 * endpoint name (ep)=endpoint1 1455 * lifetime (lt)=500 1457 * Base URI (base)=coap://local-proxy-old.example.com 1459 * payload of Figure 8 1461 The initial state of the RD is reflected in the following request: 1463 Req: GET /rd-lookup/res?ep=endpoint1 1465 Res: 2.05 Content 1466 Payload: 1467 ; 1468 rt=temperature-c;if=sensor, 1469 ; 1470 anchor="coap://local-proxy-old.example.com/sensors/temp"; 1471 rel=describedby 1473 Figure 14: Example lookup before a change to the base address 1475 The following example shows the registering endpoint changing the 1476 Base URI to "coaps://new.example.com:5684": 1478 Req: POST /rd/4521?base=coaps://new.example.com 1480 Res: 2.04 Changed 1482 Figure 15: Example registration update that changes the base address 1484 The consecutive query returns: 1486 Req: GET /rd-lookup/res?ep=endpoint1 1488 Res: 2.05 Content 1489 Payload: 1490 ; 1491 rt=temperature-c;if=sensor, 1492 ; 1493 anchor="coaps://new.example.com/sensors/temp"; 1494 rel=describedby 1496 Figure 16: Example lookup after a change to the base address 1498 5.3.2. Registration Removal 1500 Although RD registrations have soft state and will eventually timeout 1501 after their lifetime, the registering endpoint SHOULD explicitly 1502 remove an entry from the RD if it knows it will no longer be 1503 available (for example on shut-down). This is accomplished using a 1504 removal interface on the RD by performing a DELETE on the endpoint 1505 resource. 1507 The removal request interface is specified as follows: 1509 Interaction: EP or CT -> RD 1511 Method: DELETE 1513 URI Template: {+location} 1515 URI Template Variables: location := This is the Location returned 1516 by the RD as a result of a successful earlier registration. 1518 The following responses are expected on this interface: 1520 Success: 2.02 "Deleted" or 204 "No Content" upon successful deletion 1522 Failure: 4.04 "Not Found" or 404 "Not Found". Registration does not 1523 exist (e.g. may already have been removed). 1525 The following examples shows successful removal of the endpoint from 1526 the RD with example location value /rd/4521. 1528 Req: DELETE /rd/4521 1530 Res: 2.02 Deleted 1532 Figure 17: Example of a registration removal 1534 5.3.3. Further operations 1536 Additional operations on the registration can be specified in future 1537 documents, for example: 1539 * Send iPATCH (or PATCH) updates ([RFC8132]) to add, remove or 1540 change the links of a registration. 1542 * Use GET to read the currently stored set of links in a 1543 registration resource. 1545 Those operations are out of scope of this document, and will require 1546 media types suitable for modifying sets of links. 1548 5.3.4. Request freshness 1550 Some security mechanisms usable with an RD allow out of order request 1551 processing, or do not even mandate replay protection at all. The RD 1552 needs to ensure that operations on the registration resource are 1553 executed in an order that does not distort the client's intentions. 1555 This ordering of operations is expressed in terms of freshness as 1556 defined in [I-D.ietf-core-echo-request-tag]. Requests that alter a 1557 resource's state need to be fresh relative to the latest request that 1558 altered that state in a conflicting way. 1560 An RD SHOULD determine a request's freshness, and MUST use the Echo 1561 option if it requires request freshness and can not determine the it 1562 in any other way. An endpoint MUST support the use of the Echo 1563 option. (One reason why an RD would not require freshness is when no 1564 relevant registration properties are covered by is security 1565 policies.) 1567 5.3.4.1. Efficient use of Echo by an RD 1569 To keep latency and traffic added by the freshness requirements to a 1570 minimum, RDs should avoid naive (sufficient but inefficient) 1571 freshness criteria. 1573 Some simple mechanisms the RD can employ are: 1575 * State counter. The RD can keep a monotonous counter that 1576 increments whenever a registration changes. For every 1577 registration resource, it stores the post-increment value of that 1578 resource's last change. Requests altering them need to have at 1579 least that value encoded in their Echo option, and are otherwise 1580 rejected with a 4.01 Unauthorized and the current counter value as 1581 the Echo value. If other applications on the same server use Echo 1582 as well, that encoding may include a prefix indicating that it 1583 pertains to the RD's counter. 1585 The value associated with a resource needs to be kept across the 1586 removal of registrations if the same registration resource is to 1587 be reused. 1589 The counter can be reset (and the values of removed resources 1590 forgotten) when all previous security associations are reset. 1592 This is the "Persistent Counter" method of 1593 [I-D.ietf-core-echo-request-tag] Appendix A. 1595 * Preemptive Echo values. The current state counter can be sent in 1596 an Echo option not only when requests are rejected with 4.01 1597 Unauthorized, but also with successful responses. Thus, clients 1598 can be provided with Echo values sufficient for their next request 1599 on a regular basis. 1601 While endpoints may discard received Echo values at leisure 1602 between requests, they are encouraged to retain these values for 1603 the next request to avoid additional round trips. 1605 * If the RD can ensure that only one security association has 1606 modifying access to any registration at any given time, and that 1607 security association provides order on the requests, that order is 1608 sufficient to show request freshness. 1610 5.3.4.2. Examples of Echo usage 1612 Figure 18 shows the interactions of an endpoint that has forgotten 1613 the server's latest Echo value and temporarily reduces its 1614 registration lifetime: 1616 Req: POST /rd/4521?lt=7200 1618 Res: 4.01 Unauthorized 1619 Echo: 0x0123 1621 (EP tries again immediately) 1623 Req: POST /rd/4521?lt=7200 1624 Echo: 0x0123 1626 Res: 2.04 Changed 1627 Echo: 0x0124 1629 (Later the EP regains its confidence in its long-term reachability) 1631 Req: POST /rd/4521?lt=90000 1632 Echo: 0x0124 1634 Res: 2.04 Changed 1635 Echo: 0x0247 1637 Figure 18: Example update of a registration 1639 The other examples do not show Echo options for simplicity, and 1640 because they lack the context for any example values to have meaning. 1642 6. RD Lookup 1644 To discover the resources registered with the RD, a lookup interface 1645 must be provided. This lookup interface is defined as a default, and 1646 it is assumed that RDs may also support lookups to return resource 1647 descriptions in alternative formats (e.g. JSON or CBOR link format 1648 [I-D.ietf-core-links-json]) or using more advanced interfaces (e.g. 1649 supporting context or semantic based lookup) on different resources 1650 that are discovered independently. 1652 RD Lookup allows lookups for endpoints and resources using attributes 1653 defined in this document and for use with the CoRE Link Format. The 1654 result of a lookup request is the list of links (if any) 1655 corresponding to the type of lookup. Thus, an endpoint lookup MUST 1656 return a list of endpoints and a resource lookup MUST return a list 1657 of links to resources. 1659 The lookup type is selected by a URI endpoint, which is indicated by 1660 a Resource Type as per Table 1 below: 1662 +=============+====================+===========+ 1663 | Lookup Type | Resource Type | Mandatory | 1664 +=============+====================+===========+ 1665 | Resource | core.rd-lookup-res | Mandatory | 1666 +-------------+--------------------+-----------+ 1667 | Endpoint | core.rd-lookup-ep | Mandatory | 1668 +-------------+--------------------+-----------+ 1670 Table 1: Lookup Types 1672 6.1. Resource lookup 1674 Resource lookup results in links that are semantically equivalent to 1675 the links submitted to the RD by the registrant. The links and link 1676 parameters returned by the lookup are equal to the originally 1677 submitted ones, except that the target reference is fully resolved, 1678 and that the anchor reference is fully resolved if it is present in 1679 the lookup result at all. 1681 Links that did not have an anchor attribute in the registration are 1682 returned without an anchor attribute. Links of which href or anchor 1683 was submitted as a (full) URI are returned with the respective 1684 attribute unmodified. 1686 The above rules allow the client to interpret the response as links 1687 without any further knowledge of the storage conventions of the RD. 1688 The RD MAY replace the registration base URIs with a configured 1689 intermediate proxy, e.g. in the case of an HTTP lookup interface for 1690 CoAP endpoints. 1692 If the base URI of a registration contains a link-local address, the 1693 RD MUST NOT show its links unless the lookup was made from the link 1694 on which the registered endpoint can be reached. The RD MUST NOT 1695 include zone identifiers in the resolved URIs. 1697 6.2. Lookup filtering 1699 Using the Accept Option, the requester can control whether the 1700 returned list is returned in CoRE Link Format ("application/link- 1701 format", default) or in alternate content-formats (e.g. from 1702 [I-D.ietf-core-links-json]). 1704 Multiple search criteria MAY be included in a lookup. All included 1705 criteria MUST match for a link to be returned. The RD MUST support 1706 matching with multiple search criteria. 1708 A link matches a search criterion if it has an attribute of the same 1709 name and the same value, allowing for a trailing "*" wildcard 1710 operator as in Section 4.1 of [RFC6690]. Attributes that are defined 1711 as "relation-types" (in the link-format ABNF) match if the search 1712 value matches any of their values (see Section 4.1 of [RFC6690]; e.g. 1713 "?if=tag:example.net,2020:sensor" matches ";if="example.regname 1714 tag:example.net,2020:sensor";"). A resource link also matches a 1715 search criterion if its endpoint would match the criterion, and vice 1716 versa, an endpoint link matches a search criterion if any of its 1717 resource links matches it. 1719 Note that "href" is a valid search criterion and matches target 1720 references. Like all search criteria, on a resource lookup it can 1721 match the target reference of the resource link itself, but also the 1722 registration resource of the endpoint that registered it. Queries 1723 for resource link targets MUST be in URI form (i.e. not relative 1724 references) and are matched against a resolved link target. Queries 1725 for endpoints SHOULD be expressed in path-absolute form if possible 1726 and MUST be expressed in URI form otherwise; the RD SHOULD recognize 1727 either. The "anchor" attribute is usable for resource lookups, and, 1728 if queried, MUST be in URI form as well. 1730 Additional query parameters "page" and "count" are used to obtain 1731 lookup results in specified increments using pagination, where count 1732 specifies how many links to return and page specifies which subset of 1733 links organized in sequential pages, each containing 'count' links, 1734 starting with link zero and page zero. Thus, specifying count of 10 1735 and page of 0 will return the first 10 links in the result set (links 1736 0-9). Count = 10 and page = 1 will return the next 'page' containing 1737 links 10-19, and so on. Unlike block-wise transfer of a compelte 1738 result set, these parameters ensure that each chunk of results can be 1739 interpreted on its own. This simplifies the processing, but can 1740 result in duplicate or missed items when coinciding with changes from 1741 the registration interface. 1743 Endpoints that are interested in a lookup result repeatedly or 1744 continuously can use mechanisms like ETag caching, resource 1745 observation ([RFC7641]), or any future mechanism that might allow 1746 more efficient observations of collections. These are advertised, 1747 detected and used according to their own specifications and can be 1748 used with the lookup interface as with any other resource. 1750 When resource observation is used, every time the set of matching 1751 links changes, or the content of a matching link changes, the RD 1752 sends a notification with the matching link set. The notification 1753 contains the successful current response to the given request, 1754 especially with respect to representing zero matching links (see 1755 "Success" item below). 1757 The lookup interface is specified as follows: 1759 Interaction: Client -> RD 1761 Method: GET 1763 URI Template: {+type-lookup-location}{?page,count,search*} 1765 URI Template Variables: type-lookup-location := RD Lookup URI for a 1766 given lookup type (mandatory). The address is discovered as 1767 described in Section 4.3. 1769 search := Search criteria for limiting the 1770 number of results (optional). 1772 The search criteria are an associative array, expressed in a 1773 form-style query as per the URI template (see [RFC6570] 1774 Sections 2.4.2 and 3.2.8) 1776 page := Page (optional). Parameter cannot 1777 be used without the count parameter. Results are returned from 1778 result set in pages that contain 'count' links starting from 1779 index (page * count). Page numbering starts with zero. 1781 count := Count (optional). Number of 1782 results is limited to this parameter value. If the page 1783 parameter is also present, the response MUST only include 1784 'count' links starting with the (page * count) link in the 1785 result set from the query. If the count parameter is not 1786 present, then the response MUST return all matching links in 1787 the result set. Link numbering starts with zero. 1789 Accept: absent, application/link-format or any other indicated media 1790 type representing web links 1792 The following responses codes are defined for this interface: 1794 Success: 2.05 "Content" or 200 "OK" with an "application/link- 1795 format" or other web link payload containing matching entries for 1796 the lookup. The payload can contain zero links (which is an empty 1797 payload in [RFC6690] link format, but could also be "[]" in JSON 1798 based formats), indicating that no entities matched the request. 1800 6.3. Resource lookup examples 1802 The examples in this section assume the existence of CoAP hosts with 1803 a default CoAP port 61616. HTTP hosts are possible and do not change 1804 the nature of the examples. 1806 The following example shows a client performing a resource lookup 1807 with the example resource look-up locations discovered in Figure 5: 1809 Req: GET /rd-lookup/res?rt=tag:example.org,2020:temperature 1811 Res: 2.05 Content 1812 Payload: 1813 ; 1814 rt="tag:example.org,2020:temperature" 1816 Figure 19: Example a resource lookup 1818 A client that wants to be notified of new resources as they show up 1819 can use observation: 1821 Req: GET /rd-lookup/res?rt=tag:example.org,2020:light 1822 Observe: 0 1824 Res: 2.05 Content 1825 Observe: 23 1826 Payload: empty 1828 (at a later point in time) 1830 Res: 2.05 Content 1831 Observe: 24 1832 Payload: 1833 ;rt="tag:example.org,2020:light", 1834 ;rt="tag:example.org,2020:light", 1835 ;rt="tag:example.org,2020:light" 1837 Figure 20: Example an observing resource lookup 1839 The following example shows a client performing a paginated resource 1840 lookup 1841 Req: GET /rd-lookup/res?page=0&count=5 1843 Res: 2.05 Content 1844 Payload: 1845 ;ct=60, 1846 ;ct=60, 1847 ;ct=60, 1848 ;ct=60, 1849 ;ct=60 1851 Req: GET /rd-lookup/res?page=1&count=5 1853 Res: 2.05 Content 1854 Payload: 1855 ;ct=60, 1856 ;ct=60, 1857 ;ct=60, 1858 ;ct=60, 1859 ;ct=60 1861 Figure 21: Examples of paginated resource lookup 1863 The following example shows a client performing a lookup of all 1864 resources of all endpoints of a given endpoint type. It assumes that 1865 two endpoints (with endpoint names "sensor1" and "sensor2") have 1866 previously registered with their respective addresses 1867 "coap://sensor1.example.com" and "coap://sensor2.example.com", and 1868 posted the very payload of the 6th response of section 5 of 1869 [RFC6690]. 1871 It demonstrates how absolute link targets stay unmodified, while 1872 relative ones are resolved: 1874 Req: GET /rd-lookup/res?et=tag:example.com,2020:platform 1876 Res: 2.05 Content 1877 Payload: 1878 ;ct=40;title="Sensor Index", 1879 ;rt=temperature-c;if=sensor, 1880 ;rt=light-lux;if=sensor, 1881 ;rel=describedby; 1882 anchor="coap://sensor1.example.com/sensors/temp", 1883 ;rel=alternate; 1884 anchor="coap://sensor1.example.com/sensors/temp", 1885 ;ct=40;title="Sensor Index", 1886 ;rt=temperature-c;if=sensor, 1887 ;rt=light-lux;if=sensor, 1888 ;rel=describedby; 1889 anchor="coap://sensor2.example.com/sensors/temp", 1890 ;rel=alternate; 1891 anchor="coap://sensor2.example.com/sensors/temp" 1893 Figure 22: Example of resource lookup from multiple endpoints 1895 6.4. Endpoint lookup 1897 The endpoint lookup returns links to and information about 1898 registration resources, which themselves can only be manipulated by 1899 the registering endpoint. 1901 Endpoint registration resources are annotated with their endpoint 1902 names (ep), sectors (d, if present) and registration base URI (base; 1903 reports the registrant-ep's address if no explicit base was given) as 1904 well as a constant resource type (rt="core.rd-ep"); the lifetime (lt) 1905 is not reported. Additional endpoint attributes are added as target 1906 attributes to their endpoint link unless their specification says 1907 otherwise. 1909 Links to endpoints SHOULD be presented in path-absolute form or, if 1910 required, as (full) URIs. (This ensures that the output conforms to 1911 Limited Link Format as described in Appendix C.) 1913 Base addresses that contain link-local addresses MUST NOT include 1914 zone identifiers, and such registrations MUST NOT be shown unless the 1915 lookup was made from the same link from which the registration was 1916 made. 1918 While Endpoint Lookup does expose the registration resources, the RD 1919 does not need to make them accessible to clients. Clients SHOULD NOT 1920 attempt to dereference or manipulate them. 1922 An RD can report registrations in lookup whose URI scheme and 1923 authority differ from the lookup resource's. Lookup clients MUST be 1924 prepared to see arbitrary URIs as registration resources in the 1925 results and treat them as opaque identifiers; the precise semantics 1926 of such links are left to future specifications. 1928 The following example shows a client performing an endpoint lookup 1929 limited to endpoints of endpoint type 1930 "tag:example.com,2020:platform": 1932 Req: GET /rd-lookup/ep?et=tag:example.com,2020:platform 1934 Res: 2.05 Content 1935 Payload: 1936 ;base="coap://[2001:db8:3::127]:61616";ep=node5; 1937 et="tag:example.com,2020:platform";ct=40;rt=core.rd-ep, 1938 ;base="coap://[2001:db8:3::129]:61616";ep=node7; 1939 et="tag:example.com,2020:platform";ct=40;d=floor-3; 1940 rt=core.rd-ep 1942 Figure 23: Examples of endpoint lookup 1944 7. Security policies 1946 The security policies that are applicable to an RD strongly depend on 1947 the application, and are not set out normatively here. 1949 This section provides a list of aspects that applications should 1950 consider when describing their use of the RD, without claiming to 1951 cover all cases. It is using terminology of 1952 [I-D.ietf-ace-oauth-authz], in which the RD acts as the Resource 1953 Server (RS), and both registrant-eps and lookup clients act as 1954 Clients (C) with support from an Authorization Server (AS), without 1955 the intention of ruling out other (e.g. certificate / public-key 1956 infrastructure (PKI) based) schemes. 1958 Any, all or none of the below can apply to an application. Which are 1959 relevant depends on its protection objectives. 1961 Security policies are set by configuration of the RD, or by choice of 1962 the implementation. Lookup clients (and, where relevant, endpoints) 1963 can only trust an RD to uphold them if it is authenticated, and 1964 authorized to serve as an RD according to the application's 1965 requirements. 1967 7.1. Endpoint name 1969 Whenever an RD needs to provide trustworthy results to clients doing 1970 endpoint lookup, or resource lookup with filtering on the endpoint 1971 name, the RD must ensure that the registrant is authorized to use the 1972 given endpoint name. This applies both to registration and later to 1973 operations on the registration resource. It is immaterial whether 1974 the client is the registrant-ep itself or a CT is doing the 1975 registration: The RD cannot tell the difference, and CTs may use 1976 authorization credentials authorizing only operations on that 1977 particular endpoint name, or a wider range of endpoint names. 1979 It is up to the concrete security policy to describe how endpoint 1980 name and sector are transported when certificates are used. For 1981 example, it may describe how SubjectAltName dNSName entries are 1982 mapped to endpoint and domain names. 1984 7.1.1. Random endpoint names 1986 Conversely, in applications where the RD does not check the endpoint 1987 name, the authorized registering endpoint can generate a random 1988 number (or string) that identifies the endpoint. The RD should then 1989 remember unique properties of the registrant, associate them with the 1990 registration for as long as its registration resource is active 1991 (which may be longer than the registration's lifetime), and require 1992 the same properties for operations on the registration resource. 1994 Registrants that are prepared to pick a different identifier when 1995 their initial attempt (or attempts, in the unlikely case of two 1996 subsequent collisions) at registration is unauthorized should pick an 1997 identifier at least twice as long as the expected number of 1998 registrants; registrants without such a recovery options should pick 1999 significantly longer endpoint names (e.g. using UUID URNs [RFC4122]). 2001 7.2. Entered resources 2003 When lookup clients expect that certain types of links can only 2004 originate from certain endpoints, then the RD needs to apply 2005 filtering to the links an endpoint may register. 2007 For example, if clients use an RD to find a server that provides 2008 firmware updates, then any registrant that wants to register (or 2009 update) links to firmware sources will need to provide suitable 2010 credentials to do so, independently of its endpoint name. 2012 Note that the impact of having undesirable links in the RD depends on 2013 the application: if the client requires the firmware server to 2014 present credentials as a firmware server, a fraudulent link's impact 2015 is limited to the client revealing its intention to obtain updates 2016 and slowing down the client until it finds a legitimate firmware 2017 server; if the client accepts any credentials from the server as long 2018 as they fit the provided URI, the impact is larger. 2020 An RD may also require that links are only registered if the 2021 registrant is authorized to publish information about the anchor (or 2022 even target) of the link. One way to do this is to demand that the 2023 registrant present the same credentials as a client that they'd need 2024 to present if contacted as a server at the resources' URI, which may 2025 include using the address and port that are part of the URI. Such a 2026 restriction places severe practical limitations on the links that can 2027 be registered. 2029 As above, the impact of undesirable links depends on the extent to 2030 which the lookup client relies on the RD. To avoid the limitations, 2031 RD applications should consider prescribing that lookup clients only 2032 use the discovered information as hints, and describe which pieces of 2033 information need to be verified because they impact the application's 2034 security. A straightforward way to verify such information is to 2035 request it again from an authorized server, typically the one that 2036 hosts the target resource. That similar to what happens in 2037 Section 4.3 when the URI discovery step is repeated. 2039 7.3. Link confidentiality 2041 When registrants publish information in the RD that is not available 2042 to any client that would query the registrant's /.well-known/core 2043 interface, or when lookups to that interface are subject so stricter 2044 firewalling than lookups to the RD, the RD may need to limit which 2045 lookup clients may access the information. 2047 In this case, the endpoint (and not the lookup clients) needs to be 2048 careful to check the RD's authorization. 2050 7.4. Segmentation 2052 Within a single RD, different security policies can apply. 2054 One example of this are multi-tenant deployments separated by the 2055 sector (d) parameter. Some sectors might apply limitations on the 2056 endpoint names available, while others use a random identifier 2057 approach to endpoint names and place limits on the entered links 2058 based on their attributes instead. 2060 Care must be taken in such setups to determine the applicable access 2061 control measures to each operation. One easy way to do that is to 2062 mandate the use of the sector parameter on all operations, as no 2063 credentials are suitable for operations across sector borders anyway. 2065 7.5. First-Come-First-Remembered: A default policy 2067 The First-Come-First-Remembered policy is provided both as a 2068 reference example for a security policy definition, and as a policy 2069 that implementations may choose to use as default policy in absence 2070 of other configuration. It is designed to enable efficient discovery 2071 operations even in ad-hoc settings. 2073 Under this policy, the RD accepts registrations for any endpoint name 2074 that is not assigned to an active registration resource, and only 2075 accepts registration updates from the same endpoint. The policy is 2076 minimal in that towards lookup clients it does not make any of the 2077 claims of Section 7.2 and Section 7.3, and its claims on Section 7.1 2078 are limited to the lifetime of that endpoint's registration. It 2079 does, however, guarantee towards any endpoint that for the duration 2080 of its registration, its links will be discoverable on the RD. 2082 When a registration or operation is attempted, the RD MUST determine 2083 the client's subject name or public key: 2085 * If the client's credentials indicate any subject name that is 2086 certified by any authority which the RD recognizes (which may be 2087 the system's trust anchor store), all those subject names are 2088 stored. With CWT or JWT based credentials (as common with ACE), 2089 the Subject (sub) claim is stored as a single name, if it exists. 2090 With X.509 certificates, the Common Name (CN) and the complete 2091 list of SubjectAltName entries are stored. In both cases, the 2092 authority that certified the claim is stored along with the 2093 subject, as the latter may only be locally unique. 2095 * Otherwise, if the client proves possession of a private key, the 2096 matching public key is stored. This applies both to raw public 2097 keys and to the public keys indicated in certificates that failed 2098 the above authority check. 2100 * If neither is present, a reference to the security session itself 2101 is stored. With (D)TLS, that is the connection itself, or the 2102 session resumption information if available. With OSCORE, that is 2103 the security context. 2105 As part of the registration operation, that information is stored 2106 along with the registration resource. 2108 The RD MUST accept all registrations whose registration resource is 2109 not already active, as long as they are made using a security layer 2110 supported by the RD. 2112 Any operation on a registration resource, including registrations 2113 that lead to an existing registration resource, MUST be rejected by 2114 the RD unless all the stored information is found in the new 2115 request's credentials. 2117 Note that even though subject names are compared in this policy, they 2118 are never directly compared to endpoint names, and an endpoint can 2119 not expect to "own" any particular endpoint name outside of an active 2120 registration - even if a certificate says so. It is an accepted 2121 shortcoming of this approach that the endpoint has no indication of 2122 whether the RD remembers it by its subject name or public key; 2123 recognition by subject happens on a best-effort base (given the RD 2124 may not recognize any authority). Clients MUST be prepared to pick a 2125 different endpoint name when rejected by the RD initially or after a 2126 change in their credentials; picking an endpoint name as per 2127 Section 7.1.1 is an easy option for that. 2129 For this policy to be usable without configuration, clients should 2130 not set a sector name in their registrations. An RD can set a 2131 default sector name for registrations accepted under this policy, 2132 which is useful especially in a segmented setup where different 2133 policies apply to different sectors. The configuration of such a 2134 behavior, as well as any other configuration applicable to such an RD 2135 (i.e. the set of recognized authorities) is out of scope for this 2136 document. 2138 8. Security Considerations 2140 The security considerations as described in Section 5 of [RFC8288] 2141 and Section 6 of [RFC6690] apply. The "/.well-known/core" resource 2142 may be protected e.g. using DTLS when hosted on a CoAP server as 2143 described in [RFC7252]. 2145 Access that is limited or affects sensitive data SHOULD be protected, 2146 e.g. using (D)TLS or OSCORE ([RFC8613]; which aspects of the RD this 2147 affects depends on the security policies of the application (see 2148 Section 7). 2150 8.1. Discovery 2152 Most steps in discovery of the RD, and possibly its resources, are 2153 not covered by CoAP's security mechanisms. This will not endanger 2154 the security properties of the registrations and lookup itself (where 2155 the client requires authorization of the RD if it expects any 2156 security properties of the operation), but may leak the client's 2157 intention to third parties, and allow them to slow down the process. 2159 To mitigate that, clients can retain the RD's address, use secure 2160 discovery options like configured addresses, and send queries for RDs 2161 in a very general form ("?rt=core.rd*" rather than "?rt=core.rd- 2162 lookup-ep"). 2164 8.2. Endpoint Identification and Authentication 2166 An Endpoint (name, sector) pair is unique within the set of endpoints 2167 registered by the RD. An Endpoint MUST NOT be identified by its 2168 protocol, port or IP address as these may change over the lifetime of 2169 an Endpoint. 2171 Every operation performed by an Endpoint on an RD SHOULD be mutually 2172 authenticated using Pre-Shared Key, Raw Public Key or Certificate 2173 based security. 2175 Consider the following threat: two devices A and B are registered at 2176 a single server. Both devices have unique, per-device credentials 2177 for use with DTLS to make sure that only parties with authorization 2178 to access A or B can do so. 2180 Now, imagine that a malicious device A wants to sabotage the device 2181 B. It uses its credentials during the DTLS exchange. Then, it 2182 specifies the endpoint name of device B as the name of its own 2183 endpoint in device A. If the server does not check whether the 2184 identifier provided in the DTLS handshake matches the identifier used 2185 at the CoAP layer then it may be inclined to use the endpoint name 2186 for looking up what information to provision to the malicious device. 2188 Endpoint authorization needs to be checked on registration and 2189 registration resource operations independently of whether there are 2190 configured requirements on the credentials for a given endpoint name 2191 (and sector; Section 7.1) or whether arbitrary names are accepted 2192 (Section 7.1.1). 2194 Simple registration could be used to circumvent address-based access 2195 control: An attacker would send a simple registration request with 2196 the victim's address as source address, and later look up the 2197 victim's /.well-known/core content in the RD. Mitigation for this is 2198 recommended in Section 5.1. 2200 The Registration Resource path is visible to any client that is 2201 allowed endpoint lookup, and can be extracted by resource lookup 2202 clients as well. The same goes for registration attributes that are 2203 shown as target attributes or lookup attributes. The RD needs to 2204 consider this in the choice of Registration Resource paths, and 2205 administrators or endpoint in their choice of attributes. 2207 8.3. Access Control 2209 Access control SHOULD be performed separately for the RD registration 2210 and Lookup API paths, as different endpoints may be authorized to 2211 register with an RD from those authorized to lookup endpoints from 2212 the RD. Such access control SHOULD be performed in as fine-grained a 2213 level as possible. For example access control for lookups could be 2214 performed either at the sector, endpoint or resource level. 2216 The precise access controls necessary (and the consequences of 2217 failure to enforce them) depend on the protection objectives of the 2218 application and the security policies (Section 7) derived from them. 2220 8.4. Denial of Service Attacks 2222 Services that run over UDP unprotected are vulnerable to unknowingly 2223 amplify and distribute a DoS attack as UDP does not require return 2224 routability check. Since RD lookup responses can be significantly 2225 larger than requests, RDs are prone to this. 2227 [RFC7252] describes this at length in its Section 11.3, including 2228 some mitigation by using small block sizes in responses. The 2229 upcoming [I-D.ietf-core-echo-request-tag] updates that by describing 2230 a source address verification mechanism using the Echo option. 2232 [ If this document is published together with or after I-D.ietf-core- 2233 echo-request-tag, the above paragraph is replaced with the following: 2235 [RFC7252] describes this at length in its Section 11.3, and 2236 [I-D.ietf-core-echo-request-tag] (which updates the former) 2237 recommends using the Echo option to verify the request's source 2238 address. 2240 ] 2242 8.5. Skipping freshness checks 2244 When RD based applications are built in which request freshness 2245 checks are not performed, these concerns need to be balanced: 2247 * When alterations to registration attributes are reordered, an 2248 attacker may create any combination of attributes ever set, with 2249 the attack difficulty determined by the security layer's replay 2250 properties. 2252 For example, if Figure 18 were conducted without freshness 2253 assurances, an attacker could later reset the lifetime back to 2254 7200. Thus, the device is made unreachable to lookup clients. 2256 * When registration updates without query parameters (which just 2257 serve to restart the lifetime) can be reordered, an attacker can 2258 use intercepted messages to give the appearance of the device 2259 being alive to the RD. 2261 This is unacceptable when when the RD's security policy promises 2262 reachability of endpoints (e.g. when disappearing devices would 2263 trigger further investigation), but may be acceptable with other 2264 policies. 2266 9. IANA Considerations 2268 9.1. Resource Types 2270 IANA is asked to enter the following values into the Resource Type 2271 (rt=) Link Target Attribute Values sub-registry of the Constrained 2272 Restful Environments (CoRE) Parameters registry defined in [RFC6690]: 2274 +====================+=============================+=============+ 2275 | Value | Description | Reference | 2276 +====================+=============================+=============+ 2277 | core.rd | Directory resource of an RD | RFCTHIS | 2278 | | | Section 4.3 | 2279 +--------------------+-----------------------------+-------------+ 2280 | core.rd-lookup-res | Resource lookup of an RD | RFCTHIS | 2281 | | | Section 4.3 | 2282 +--------------------+-----------------------------+-------------+ 2283 | core.rd-lookup-ep | Endpoint lookup of an RD | RFCTHIS | 2284 | | | Section 4.3 | 2285 +--------------------+-----------------------------+-------------+ 2286 | core.rd-ep | Endpoint resource of an RD | RFCTHIS | 2287 | | | Section 6 | 2288 +--------------------+-----------------------------+-------------+ 2290 Table 2 2292 9.2. IPv6 ND Resource Directory Address Option 2294 This document registers one new ND option type under the sub-registry 2295 "IPv6 Neighbor Discovery Option Formats" of the "Internet Control 2296 Message Protocol version 6 (ICMPv6) Parameters" registry: 2298 * Resource Directory Address Option (TBD38) 2300 [ The RFC editor is asked to replace TBD38 with the assigned number 2301 in the document; the value 38 is suggested. ] 2303 9.3. RD Parameter Registry 2305 This specification defines a new sub-registry for registration and 2306 lookup parameters called "RD Parameters" under "CoRE Parameters". 2307 Although this specification defines a basic set of parameters, it is 2308 expected that other standards that make use of this interface will 2309 define new ones. 2311 Each entry in the registry must include 2313 * the human readable name of the parameter, 2315 * the short name as used in query parameters or target attributes, 2317 * indication of whether it can be passed as a query parameter at 2318 registration of endpoints, as a query parameter in lookups, or be 2319 expressed as a target attribute, 2321 * syntax and validity requirements if any, 2322 * a description, 2324 * and a link to reference documentation. 2326 The query parameter MUST be both a valid URI query key [RFC3986] and 2327 a token as used in [RFC8288]. 2329 The description must give details on whether the parameter can be 2330 updated, and how it is to be processed in lookups. 2332 The mechanisms around new RD parameters should be designed in such a 2333 way that they tolerate RD implementations that are unaware of the 2334 parameter and expose any parameter passed at registration or updates 2335 on in endpoint lookups. (For example, if a parameter used at 2336 registration were to be confidential, the registering endpoint should 2337 be instructed to only set that parameter if the RD advertises support 2338 for keeping it confidential at the discovery step.) 2340 Initial entries in this sub-registry are as follows: 2342 +==============+=======+==============+=====+=====================+ 2343 | Full name | Short | Validity | Use | Description | 2344 +==============+=======+==============+=====+=====================+ 2345 | Endpoint | ep | Unicode* | RLA | Name of the | 2346 | Name | | | | endpoint | 2347 +--------------+-------+--------------+-----+---------------------+ 2348 | Lifetime | lt | 1-4294967295 | R | Lifetime of the | 2349 | | | | | registration in | 2350 | | | | | seconds | 2351 +--------------+-------+--------------+-----+---------------------+ 2352 | Sector | d | Unicode* | RLA | Sector to which | 2353 | | | | | this endpoint | 2354 | | | | | belongs | 2355 +--------------+-------+--------------+-----+---------------------+ 2356 | Registration | base | URI | RLA | The scheme, address | 2357 | Base URI | | | | and port and path | 2358 | | | | | at which this | 2359 | | | | | server is available | 2360 +--------------+-------+--------------+-----+---------------------+ 2361 | Page | page | Integer | L | Used for pagination | 2362 +--------------+-------+--------------+-----+---------------------+ 2363 | Count | count | Integer | L | Used for pagination | 2364 +--------------+-------+--------------+-----+---------------------+ 2365 | Endpoint | et | Section | RLA | Semantic type of | 2366 | Type | | 9.3.1 | | the endpoint (see | 2367 | | | | | Section 9.4) | 2368 +--------------+-------+--------------+-----+---------------------+ 2370 Table 3: RD Parameters 2372 (Short: Short name used in query parameters or target attributes. 2373 Validity: Unicode* = 63 Bytes of UTF-8 encoded Unicode, with no 2374 control characters as per Section 5. Use: R = used at registration, 2375 L = used at lookup, A = expressed in target attribute.) 2377 The descriptions for the options defined in this document are only 2378 summarized here. To which registrations they apply and when they are 2379 to be shown is described in the respective sections of this document. 2380 All their reference documentation entries point to this document. 2382 The IANA policy for future additions to the sub-registry is "Expert 2383 Review" as described in [RFC8126]. The evaluation should consider 2384 formal criteria, duplication of functionality (Is the new entry 2385 redundant with an existing one?), topical suitability (E.g. is the 2386 described property actually a property of the endpoint and not a 2387 property of a particular resource, in which case it should go into 2388 the payload of the registration and need not be registered?), and the 2389 potential for conflict with commonly used target attributes (For 2390 example, "if" could be used as a parameter for conditional 2391 registration if it were not to be used in lookup or attributes, but 2392 would make a bad parameter for lookup, because a resource lookup with 2393 an "if" query parameter could ambiguously filter by the registered 2394 endpoint property or the [RFC6690] target attribute). 2396 9.3.1. Full description of the "Endpoint Type" RD Parameter 2398 An endpoint registering at an RD can describe itself with endpoint 2399 types, similar to how resources are described with Resource Types in 2400 [RFC6690]. An endpoint type is expressed as a string, which can be 2401 either a URI or one of the values defined in the Endpoint Type sub- 2402 registry. Endpoint types can be passed in the "et" query parameter 2403 as part of extra-attrs at the Registration step, are shown on 2404 endpoint lookups using the "et" target attribute, and can be filtered 2405 for using "et" as a search criterion in resource and endpoint lookup. 2406 Multiple endpoint types are given as separate query parameters or 2407 link attributes. 2409 Note that Endpoint Type differs from Resource Type in that it uses 2410 multiple attributes rather than space separated values. As a result, 2411 RDs implementing this specification automatically support correct 2412 filtering in the lookup interfaces from the rules for unknown 2413 endpoint attributes. 2415 9.4. "Endpoint Type" (et=) RD Parameter values 2417 This specification establishes a new sub-registry under "CoRE 2418 Parameters" called '"Endpoint Type" (et=) RD Parameter values'. The 2419 registry properties (required policy, requirements, template) are 2420 identical to those of the Resource Type parameters in [RFC6690], in 2421 short: 2423 The review policy is IETF Review for values starting with "core", and 2424 Specification Required for others. 2426 The requirements to be enforced are: 2428 * The values MUST be related to the purpose described in 2429 Section 9.3.1. 2431 * The registered values MUST conform to the ABNF reg-rel-type 2432 definition of [RFC6690] and MUST NOT be a URI. 2434 * It is recommended to use the period "." character for 2435 segmentation. 2437 The registry initially contains one value: 2439 * "core.rd-group": An application group as described in Appendix A. 2441 9.5. Multicast Address Registration 2443 IANA is asked to assign the following multicast addresses for use by 2444 CoAP nodes: 2446 IPv4 - "all CoRE Resource Directories" address MCD2 (suggestion: 2447 224.0.1.189), from the "IPv4 Multicast Address Space Registry". As 2448 the address is used for discovery that may span beyond a single 2449 network, it has come from the Internetwork Control Block (224.0.1.x) 2450 [RFC5771]. 2452 IPv6 - "all CoRE Resource Directories" address MCD1 (suggestions 2453 FF0X::FE), from the "IPv6 Multicast Address Space Registry", in the 2454 "Variable Scope Multicast Addresses" space (RFC 3307). Note that 2455 there is a distinct multicast address for each scope that interested 2456 CoAP nodes should listen to; CoAP needs the Link-Local and Site-Local 2457 scopes only. 2459 [ The RFC editor is asked to replace MCD1 and MCD2 with the assigned 2460 addresses throughout the document. ] 2462 9.6. Well-Known URIs 2464 IANA is asked to permanently register the URI suffix "rd" in the 2465 "Well-Known URIs" registry. The change controller is the IETF, this 2466 document is the reference. 2468 9.7. Service Names and Transport Protocol Port Number Registry 2470 IANA is asked to enter four new items into the Service Names and 2471 Transport Protocol Port Number Registry: 2473 * Service name: "core-rd", Protocol: "udp", Description: "Resource 2474 Directory accessed using CoAP" 2476 * Service name "core-rd-dtls", Protocol: "udp", Description: 2477 "Resource Directory accessed using CoAP over DTLS" 2479 * Service name: "core-rd", Protocol: "tcp", Description: "Resource 2480 Directory accessed using CoAP over TCP" 2482 * Service name "core-rd-tls", Protocol: "tcp", Description: 2483 "Resource Directory accessed using CoAP over TLS" 2485 All in common have this document as their reference. 2487 10. Examples 2489 Two examples are presented: a Lighting Installation example in 2490 Section 10.1 and a LwM2M example in Section 10.2. 2492 10.1. Lighting Installation 2494 This example shows a simplified lighting installation which makes use 2495 of the RD with a CoAP interface to facilitate the installation and 2496 start-up of the application code in the lights and sensors. In 2497 particular, the example leads to the definition of a group and the 2498 enabling of the corresponding multicast address as described in 2499 Appendix A. No conclusions must be drawn on the realization of 2500 actual installation or naming procedures, because the example only 2501 "emphasizes" some of the issues that may influence the use of the RD 2502 and does not pretend to be normative. 2504 10.1.1. Installation Characteristics 2506 The example assumes that the installation is managed. That means 2507 that a Commissioning Tool (CT) is used to authorize the addition of 2508 nodes, name them, and name their services. The CT can be connected 2509 to the installation in many ways: the CT can be part of the 2510 installation network, connected by WiFi to the installation network, 2511 or connected via GPRS link, or other method. 2513 It is assumed that there are two naming authorities for the 2514 installation: (1) the network manager that is responsible for the 2515 correct operation of the network and the connected interfaces, and 2516 (2) the lighting manager that is responsible for the correct 2517 functioning of networked lights and sensors. The result is the 2518 existence of two naming schemes coming from the two managing 2519 entities. 2521 The example installation consists of one presence sensor, and two 2522 luminaries, luminary1 and luminary2, each with their own wireless 2523 interface. Each luminary contains three lamps: left, right and 2524 middle. Each luminary is accessible through one endpoint. For each 2525 lamp a resource exists to modify the settings of a lamp in a 2526 luminary. The purpose of the installation is that the presence 2527 sensor notifies the presence of persons to a group of lamps. The 2528 group of lamps consists of: middle and left lamps of luminary1 and 2529 right lamp of luminary2. 2531 Before commissioning by the lighting manager, the network is 2532 installed and access to the interfaces is proven to work by the 2533 network manager. 2535 At the moment of installation, the network under installation is not 2536 necessarily connected to the DNS infrastructure. Therefore, SLAAC 2537 IPv6 addresses are assigned to CT, RD, luminaries and the sensor. 2538 The addresses shown in Table 4 below stand in for these in the 2539 following examples. 2541 +=================+================+ 2542 | Name | IPv6 address | 2543 +=================+================+ 2544 | luminary1 | 2001:db8:4::1 | 2545 +-----------------+----------------+ 2546 | luminary2 | 2001:db8:4::2 | 2547 +-----------------+----------------+ 2548 | Presence sensor | 2001:db8:4::3 | 2549 +-----------------+----------------+ 2550 | RD | 2001:db8:4::ff | 2551 +-----------------+----------------+ 2553 Table 4: Addresses used in the 2554 examples 2556 In Section 10.1.2 the use of RD during installation is presented. 2558 10.1.2. RD entries 2560 It is assumed that access to the DNS infrastructure is not always 2561 possible during installation. Therefore, the SLAAC addresses are 2562 used in this section. 2564 For discovery, the resource types (rt) of the devices are important. 2565 The lamps in the luminaries have rt=tag:example.com,2020:light, and 2566 the presence sensor has rt=tag:example.com,2020:p-sensor. The 2567 endpoints have names which are relevant to the light installation 2568 manager. In this case luminary1, luminary2, and the presence sensor 2569 are located in room 2-4-015, where luminary1 is located at the window 2570 and luminary2 and the presence sensor are located at the door. The 2571 endpoint names reflect this physical location. The middle, left and 2572 right lamps are accessed via path /light/middle, /light/left, and 2573 /light/right respectively. The identifiers relevant to the RD are 2574 shown in Table 5 below: 2576 +=========+================+========+===============================+ 2577 |Name |endpoint |resource| resource type | 2578 | | |path | | 2579 +=========+================+========+===============================+ 2580 |luminary1|lm_R2-4-015_wndw|/light/ | tag:example.com,2020:light | 2581 | | |left | | 2582 +---------+----------------+--------+-------------------------------+ 2583 |luminary1|lm_R2-4-015_wndw|/light/ | tag:example.com,2020:light | 2584 | | |middle | | 2585 +---------+----------------+--------+-------------------------------+ 2586 |luminary1|lm_R2-4-015_wndw|/light/ | tag:example.com,2020:light | 2587 | | |right | | 2588 +---------+----------------+--------+-------------------------------+ 2589 |luminary2|lm_R2-4-015_door|/light/ | tag:example.com,2020:light | 2590 | | |left | | 2591 +---------+----------------+--------+-------------------------------+ 2592 |luminary2|lm_R2-4-015_door|/light/ | tag:example.com,2020:light | 2593 | | |middle | | 2594 +---------+----------------+--------+-------------------------------+ 2595 |luminary2|lm_R2-4-015_door|/light/ | tag:example.com,2020:light | 2596 | | |right | | 2597 +---------+----------------+--------+-------------------------------+ 2598 |Presence |ps_R2-4-015_door|/ps | tag:example.com,2020:p-sensor | 2599 |sensor | | | | 2600 +---------+----------------+--------+-------------------------------+ 2602 Table 5: RD identifiers 2604 It is assumed that the CT has performed RD discovery and has received 2605 a response like the one in the Section 4.3 example. 2607 The CT inserts the endpoints of the luminaries and the sensor in the 2608 RD using the registration base URI parameter (base) to specify the 2609 interface address: 2611 Req: POST coap://[2001:db8:4::ff]/rd 2612 ?ep=lm_R2-4-015_wndw&base=coap://[2001:db8:4::1]&d=R2-4-015 2613 Payload: 2614 ;rt="tag:example.com,2020:light", 2615 ;rt="tag:example.com,2020:light", 2616 ;rt="tag:example.com,2020:light" 2618 Res: 2.01 Created 2619 Location-Path: /rd/4521 2621 Req: POST coap://[2001:db8:4::ff]/rd 2622 ?ep=lm_R2-4-015_door&base=coap://[2001:db8:4::2]&d=R2-4-015 2623 Payload: 2624 ;rt="tag:example.com,2020:light", 2625 ;rt="tag:example.com,2020:light", 2626 ;rt="tag:example.com,2020:light" 2628 Res: 2.01 Created 2629 Location-Path: /rd/4522 2631 Req: POST coap://[2001:db8:4::ff]/rd 2632 ?ep=ps_R2-4-015_door&base=coap://[2001:db8:4::3]&d=R2-4-015 2633 Payload: 2634 ;rt="tag:example.com,2020:p-sensor" 2636 Res: 2.01 Created 2637 Location-Path: /rd/4523 2639 Figure 24: Example of registrations a CT enters into an RD 2641 The sector name d=R2-4-015 has been added for an efficient lookup 2642 because filtering on "ep" name is more awkward. The same sector name 2643 is communicated to the two luminaries and the presence sensor by the 2644 CT. 2646 The group is specified in the RD. The base parameter is set to the 2647 site-local multicast address allocated to the group. In the POST in 2648 the example below, the resources supported by all group members are 2649 published. 2651 Req: POST coap://[2001:db8:4::ff]/rd 2652 ?ep=grp_R2-4-015&et=core.rd-group&base=coap://[ff05::1] 2653 Payload: 2654 ;rt="tag:example.com,2020:light", 2655 ;rt="tag:example.com,2020:light", 2656 ;rt="tag:example.com,2020:light" 2658 Res: 2.01 Created 2659 Location-Path: /rd/501 2661 Figure 25: Example of a multicast group a CT enters into an RD 2663 After the filling of the RD by the CT, the application in the 2664 luminaries can learn to which groups they belong, and enable their 2665 interface for the multicast address. 2667 The luminary, knowing its sector and being configured to join any 2668 group containing lights, searches for candidate groups and joins 2669 them: 2671 Req: GET coap://[2001:db8:4::ff]/rd-lookup/ep 2672 ?d=R2-4-015&et=core.rd-group&rt=light 2674 Res: 2.05 Content 2675 Payload: 2676 ;ep=grp_R2-4-015;et=core.rd-group; 2677 base="coap://[ff05::1]";rt=core.rd-ep 2679 Figure 26: Example of a lookup exchange to find suitable 2680 multicast addresses 2682 From the returned base parameter value, the luminary learns the 2683 multicast address of the multicast group. 2685 The presence sensor can learn the presence of groups that support 2686 resources with rt=tag:example.com,2020:light in its own sector by 2687 sending the same request, as used by the luminary. The presence 2688 sensor learns the multicast address to use for sending messages to 2689 the luminaries. 2691 10.2. OMA Lightweight M2M (LwM2M) 2693 OMA LwM2M is a profile for device services based on CoAP, providing 2694 interfaces and operations for device management and device service 2695 enablement. 2697 An LwM2M server is an instance of an LwM2M middleware service layer, 2698 containing an RD ([LwM2M] page 36f). 2700 That RD only implements the registration interface, and no lookup is 2701 implemented. Instead, the LwM2M server provides access to the 2702 registered resources, in a similar way to a reverse proxy. 2704 The location of the LwM2M Server and RD URI path is provided by the 2705 LwM2M Bootstrap process, so no dynamic discovery of the RD is used. 2706 LwM2M Servers and endpoints are not required to implement the /.well- 2707 known/core resource. 2709 11. Acknowledgments 2711 Oscar Novo, Srdjan Krco, Szymon Sasin, Kerry Lynn, Esko Dijk, Anders 2712 Brandt, Matthieu Vial, Jim Schaad, Mohit Sethi, Hauke Petersen, 2713 Hannes Tschofenig, Sampo Ukkola, Linyi Tian, Jan Newmarch, Matthias 2714 Kovatsch, Jaime Jimenez and Ted Lemon have provided helpful comments, 2715 discussions and ideas to improve and shape this document. Zach would 2716 also like to thank his colleagues from the EU FP7 SENSEI project, 2717 where many of the RD concepts were originally developed. 2719 12. Changelog 2721 changes from -26 to -27 2723 * In general, this addresses the points that were pointed out in 2724 https://mailarchive.ietf.org/arch/msg/core/xWLomwwhovkU- 2725 CPGNxnvs40BhaM/ as having "evolved from the review comments being 2726 discussed in the interim meetings", and the review comments from 2727 Esko Dijk that were largely entangled in these points. 2729 * Relaxation of the serialization rules for link-format 2731 The interpretation of RFC6690 used in Appendix B.4 was shown to be 2732 faulty. Along with a correction, the common implementations of 2733 link-format were surveyed again and it was found that the only one 2734 that employed the faulty interpretation can still safely be 2735 upgraded. These were removed from the set considered for Limited 2736 Link Format, making the set of valid Limited Link Format documents 2737 larger. 2739 As a consequence, the prescribed serialization of RD output can be 2740 roughly halved in bytes. 2742 There might be additional usage patterns that are possible with 2743 the new set of constraints, but there is insufficient 2744 implementation and deployment experience with them to warrant a 2745 change changes on that front at this point. The specification can 2746 later be extended compatibly to allow these cases and drop the 2747 requirement of Limited Link Format. 2749 * Add Request freshness subsection 2751 It is now recommended (with security considerations on 2752 consequences of not doing it) to require ordering of RD 2753 operations. 2755 The Echo mechanism (previously suggested in various places but 2756 never exclusively) is the one prescribed way of getting this 2757 ordering, making the echo-request-tag reference normative. 2759 * Improved expression about when an RD needs to verify simple 2760 registration. 2762 The simple wording missed the authorization part, and did not 2763 emphasize that this is a per-deployment property. 2765 * Point out the non-atomic properties of paginated access. 2767 * Clarification around impl-info reference. 2769 * Inconsistencies and extraneous quotings removed from examples. 2771 changes from -25 to -26 2773 * Security policies: 2775 - The First-Come-First-Remembered policy is added as an example 2776 and a potential default behavior. 2778 - Clarify that the mapping between endpoint names and subject 2779 fields is up to a policy that defines reliance on names, and 2780 give an example. 2782 - Random EP names: Point that multiple collisions are possible 2783 but unlikely. 2785 - Add pointers to policies: 2787 o RD replication: Point out that policies may limit that. 2789 o Registration: Reword (ep, d) mapping to a previous 2790 registration's resource that could have been read as another 2791 endpoint taking over an existing registration. 2793 - Clarify that the security policy is a property of the RD the 2794 any client may need to verify by checking the RD's 2795 authorization. 2797 - Clarify how information from an untrusted RD can be verified 2799 - Remove speculation about how in detail ACE scopes are obtained. 2801 * Security considerations: 2803 - Generalize to all current options for security layers usable 2804 with CoAP (OSCORE was missing as the text predated RFC8613) 2806 - Relax the previous SHOULD on secure access to SHOULD where 2807 protection is indicated by security policies (bringing the text 2808 in line with the -25 changes) 2810 - Point out that failure to follow the security considerations 2811 has implications depending on the protection objective 2812 described with the security policies 2814 - Shorten amplification mitigation 2816 - Add note about information in Registration Resource path. 2818 - Acknowledge that most host discovery operations are not 2819 secured; mention consequences and mitigation. 2821 * Abstract, introduction: removed "or disperse networks" 2823 * RD discovery: 2825 - Drop the previously stated assumption that RDAO and any DHCP 2826 options would only be used together with SLAAC and DHCP for 2827 address configuration, respectivly. 2829 - Give concrete guidance for address selection based on RFC6724 2830 when responding to multicasts 2832 - RDAO: 2834 o Clarify that it is an option for RAs and not other ND 2835 messages. 2837 o Change Lifetime from 16-bit minutes to 32-bit seconds and 2838 swap it with Reserved (aligning it with RDNSS which it 2839 shares other properties as well). 2841 - Point out that clients may need to check RD authorization 2842 already in last discovery step 2844 * Registration: 2846 - Wording around "mostly mandatory" has been improved, conflicts 2847 clarified and sector default selection adjusted. 2849 * Simple registration: Rather than coopting POSTs to /.well-known/ 2850 core, a new resource /.well-known/rd is registered. A historical 2851 note in the text documents the change. 2853 * Examples: 2855 - Use example URIs rather than unclear reg names (unless it's 2856 RFC6690 examples, which were kept for continuity) 2858 - The LwM2M example was reduced from an outdated explanation of 2859 the complete LwM2M model to a summary of how RD is used in 2860 there, with a reference to the current specification. 2862 - Luminary example: Explain example addresses 2864 - Luminary example: Drop reference to coap-group mechanism that's 2865 becoming obsolete, and thus also to RFC7390 2867 - Multicast addresses in the examples were changed from 2868 ff35:30:2001:db8::x to ff35:30:2001:db8:f1::8000:x; the 8000 is 2869 to follow RFC 3307, and the f1 is for consistency with all the 2870 other example addresses where 2001:db8::/32 is subnetted to 2871 2001:db8:x::/48 by groups of internally consistent examples. 2873 * Use case text enhancements 2875 - Home and building automation: Tie in with RD 2877 - M2M: Move system design paragraph towards the topic of 2878 reusability. 2880 * Various editorial fixes in response to Gen-ART and IESG reviews. 2882 * Rename 'Full description of the "Endpoint Type" Registration 2883 Parameter' section to '... RD Parameter' 2885 * Error handling: Place a SHOULD around the likely cases, and make 2886 the previous "MUST to the best of their capabilities" a "must". 2888 * impl-info: Add note about the type being WIP 2890 * Interaction tables: list CTs as possible initiators where 2891 applicable 2893 * Registration update: Relax requirement to not send parameters 2894 needlessly 2896 * Terminology: Clarify that the CTs' installation events can occur 2897 multiple times. 2899 * Promote RFCs 7252, 7230 and 8288 to normative references 2901 * Moved Christian Amsuess to first author 2903 changes from -24 to -25 2905 * Large rework of section 7 (Security policies) 2907 Rather than prescribing which data in the RD _is_ authenticated 2908 (and how), it now describes what applications built on an RD _can_ 2909 choose to authenticate, show possibilities on how to do it and 2910 outline what it means for clients. 2912 This addresses Russ' Genart review points on details in the text 2913 in a rather broad fashion. That is because the discussion on the 2914 topic inside the WG showed that that text on security has been 2915 driven more review-by-review than by an architectural plan of the 2916 authors and WG. 2918 * Add concrete suggestions (twice as long as registrant number with 2919 retries, or UUIDs without) for random endpoint names 2921 * Point out that simple registration can have faked origins, 2922 RECOMMEND mitigation when applicable and suggest the Echo 2923 mechanism to implement it. 2925 * Reference existing and upcoming specifications for DDOS mitigation 2926 in CoAP. 2928 * Explain the provenance of the example's multicast address. 2930 * Make "SHOULD" of not manipulating foreign registrations a "should" 2931 and explain how it is enforced 2933 * Clarify application of RFC6570 to search parameters 2935 * Syntactic fixes in examples 2937 * IANA: 2939 - Don't announce expected number of registrations (goes to write- 2940 up) 2942 - Include syntax as part of a field's validity in entry 2943 requirements 2945 * Editorial changes 2947 - Align wording between abstract and introduction 2949 - Abbreviation normalization: "ER model", "RD" 2951 - RFC8174 boilerplate update 2953 - Minor clarity fixes 2955 - Markup and layouting 2957 changes from -23 to -24 2959 * Discovery using DNS-SD added again 2961 * Minimum lifetime (lt) reduced from 60 to 1 2963 * References added 2965 * IANA considerations 2967 - added about .well-known/core resource 2969 - added DNS-SD service names 2971 - made RDAO option number a suggestion 2973 - added "reference" field to endpoint type registry 2975 * Lookup: mention that anchor is a legitimate lookup attribute 2977 * Terminology and example fixes 2979 * Layout fixes, esp. the use of non-ASCII characters in figures 2981 changes from -22 to -23 2983 * Explain that updates can not remove attributes 2985 * Typo fixes 2987 changes from -21 to -22 2988 * Request a dedicated IPv4 address from IANA (rather than sharing 2989 with All CoAP nodes) 2991 * Fix erroneous examples 2993 * Editorial changes 2995 - Add figure numbers to examples 2997 - Update RD parameters table to reflect changes of earlier 2998 versions in the text 3000 - Typos and minor wording 3002 changes from -20 to -21 3004 (Processing comments during WGLC) 3006 * Defer outdated description of using DNS-SD to find an RD to the 3007 defining document 3009 * Describe operational conditions in automation example 3011 * Recommend particular discovery mechanisms for some managed network 3012 scenarios 3014 changes from -19 to -20 3016 (Processing comments from the WG chair review) 3018 * Define the permissible characters in endpoint and sector names 3020 * Express requirements on NAT situations in more abstract terms 3022 * Shifted heading levels to have the interfaces on the same level 3024 * Group instructions for error handling into general section 3026 * Simple Registration: process reflowed into items list 3028 * Updated introduction to reflect state of CoRE in general, 3029 reference RFC7228 (defining "constrained") and use "IoT" term in 3030 addition to "M2M" 3032 * Update acknowledgements 3034 * Assorted editorial changes 3035 - Unify examples style 3037 - Terminology: RDAO defined and not only expanded 3039 - Add CT to Figure 1 3041 - Consistency in the use of the term "Content Format" 3043 changes from -18 to -19 3045 * link-local addresses: allow but prescribe split-horizon fashion 3046 when used, disallow zone identifiers 3048 * Remove informative references to documents not mentioned any more 3050 changes from -17 to -18 3052 * Rather than re-specifying link format (Modernized Link Format), 3053 describe a Limited Link Format that's the uncontested subset of 3054 Link Format 3056 * Acknowledging the -17 version as part of the draft 3058 * Move "Read endpoint links" operation to future specification like 3059 PATCH 3061 * Demote links-json to an informative reference, and removed them 3062 from exchange examples 3064 * Add note on unusability of link-local IP addresses, and describe 3065 mitigation. 3067 * Reshuffling of sections: Move additional operations and endpoint 3068 lookup back from appendix, and groups into one 3070 * Lookup interface tightened to not imply applicability for non 3071 link-format lookups (as those can have vastly different views on 3072 link cardinality) 3074 * Simple registration: Change sequence of GET and POST-response, 3075 ensuring unsuccessful registrations are reported as such, and 3076 suggest how devices that would have required the inverse behavior 3077 can still cope with it. 3079 * Abstract and introduction reworded to avoid the impression that 3080 resources are stored in full in the RD 3082 * Simplify the rules governing when a registration resource can or 3083 must be changed. 3085 * Drop a figure that has become useless due to the changes of and 3086 -13 and -17 3088 * Wording consistency fixes: Use "Registrations" and "target 3089 attributes" 3091 * Fix incorrect use of content negotiation in discovery interface 3092 description (Content-Format -> Accept) 3094 * State that the base attribute value is part of endpoint lookup 3095 even when implicit in the registration 3097 * Update references from RFC5988 to its update RFC8288 3099 * Remove appendix on protocol-negotiation (which had a note to be 3100 removed before publication) 3102 changes from -16 to -17 3104 (Note that -17 is published as a direct follow-up to -16, containing 3105 a single change to be discussed at IETF103) 3107 * Removed groups that are enumerations of registrations and have 3108 dedicated mechanism 3110 * Add groups that are enumerations of shared resources and are a 3111 special case of endpoint registrations 3113 changes from -15 to -16 3115 * Recommend a common set of resources for members of a group 3117 * Clarified use of multicast group in lighting example 3119 * Add note on concurrent registrations from one EP being possible 3120 but not expected 3122 * Refresh web examples appendix to reflect current use of Modernized 3123 Link Format 3125 * Add examples of URIs where Modernized Link Format matters 3127 * Editorial changes 3129 changes from -14 to -15 3130 * Rewrite of section "Security policies" 3132 * Clarify that the "base" parameter text applies both to relative 3133 references both in anchor and href 3135 * Renamed "Registree-EP" to Registrant-EP" 3137 * Talk of "relative references" and "URIs" rather than "relative" 3138 and "absolute" URIs. (The concept of "absolute URIs" of [RFC3986] 3139 is not needed in RD). 3141 * Fixed examples 3143 * Editorial changes 3145 changes from -13 to -14 3147 * Rename "registration context" to "registration base URI" (and 3148 "con" to "base") and "domain" to "sector" (where the abbreviation 3149 "d" stays for compatibility reasons) 3151 * Introduced resource types core.rd-ep and core.rd-gp 3153 * Registration management moved to appendix A, including endpoint 3154 and group lookup 3156 * Minor editorial changes 3158 - PATCH/iPATCH is clearly deferred to another document 3160 - Recommend against query / fragment identifier in con= 3162 - Interface description lists are described as illustrative 3164 - Rewording of Simple Registration 3166 * Simple registration carries no error information and succeeds 3167 immediately (previously, sequence was unspecified) 3169 * Lookup: href are matched against resolved values (previously, this 3170 was unspecified) 3172 * Lookup: lt are not exposed any more 3174 * con/base: Paths are allowed 3176 * Registration resource locations can not have query or fragment 3177 parts 3179 * Default life time extended to 25 hours 3181 * clarified registration update rules 3183 * lt-value semantics for lookup clarified. 3185 * added template for simple registration 3187 changes from -12 to -13 3189 * Added "all resource directory" nodes MC address 3191 * Clarified observation behavior 3193 * version identification 3195 * example rt= and et= values 3197 * domain from figure 2 3199 * more explanatory text 3201 * endpoints of a groups hosted by different RD 3203 * resolve RFC6690-vs-8288 resolution ambiguities: 3205 - require registered links not to be relative when using anchor 3207 - return absolute URIs in resource lookup 3209 changes from -11 to -12 3211 * added Content Model section, including ER diagram 3213 * removed domain lookup interface; domains are now plain attributes 3214 of groups and endpoints 3216 * updated chapter "Finding a Resource Directory"; now distinguishes 3217 configuration-provided, network-provided and heuristic sources 3219 * improved text on: atomicity, idempotency, lookup with multiple 3220 parameters, endpoint removal, simple registration 3222 * updated LWM2M description 3224 * clarified where relative references are resolved, and how context 3225 and anchor interact 3227 * new appendix on the interaction with RFCs 6690, 5988 and 3986 3229 * lookup interface: group and endpoint lookup return group and 3230 registration resources as link targets 3232 * lookup interface: search parameters work the same across all 3233 entities 3235 * removed all methods that modify links in an existing registration 3236 (POST with payload, PATCH and iPATCH) 3238 * removed plurality definition (was only needed for link 3239 modification) 3241 * enhanced IANA registry text 3243 * state that lookup resources can be observable 3245 * More examples and improved text 3247 changes from -09 to -10 3249 * removed "ins" and "exp" link-format extensions. 3251 * removed all text concerning DNS-SD. 3253 * removed inconsistency in RDAO text. 3255 * suggestions taken over from various sources 3257 * replaced "Function Set" with "REST API", "base URI", "base path" 3259 * moved simple registration to registration section 3261 changes from -08 to -09 3263 * clarified the "example use" of the base RD resource values /rd, 3264 /rd-lookup, and /rd-group. 3266 * changed "ins" ABNF notation. 3268 * various editorial improvements, including in examples 3270 * clarifications for RDAO 3272 changes from -07 to -08 3273 * removed link target value returned from domain and group lookup 3274 types 3276 * Maximum length of domain parameter 63 bytes for consistency with 3277 group 3279 * removed option for simple POST of link data, don't require a 3280 .well-known/core resource to accept POST data and handle it in a 3281 special way; we already have /rd for that 3283 * add IPv6 ND Option for discovery of an RD 3285 * clarify group configuration section 6.1 that endpoints must be 3286 registered before including them in a group 3288 * removed all superfluous client-server diagrams 3290 * simplified lighting example 3292 * introduced Commissioning Tool 3294 * RD-Look-up text is extended. 3296 changes from -06 to -07 3298 * added text in the discovery section to allow content format hints 3299 to be exposed in the discovery link attributes 3301 * editorial updates to section 9 3303 * update author information 3305 * minor text corrections 3307 Changes from -05 to -06 3309 * added note that the PATCH section is contingent on the progress of 3310 the PATCH method 3312 changes from -04 to -05 3314 * added Update Endpoint Links using PATCH 3316 * http access made explicit in interface specification 3318 * Added http examples 3320 Changes from -03 to -04: 3322 * Added http response codes 3324 * Clarified endpoint name usage 3326 * Add application/link-format+cbor content-format 3328 Changes from -02 to -03: 3330 * Added an example for lighting and DNS integration 3332 * Added an example for RD use in OMA LWM2M 3334 * Added Read Links operation for link inspection by endpoints 3336 * Expanded DNS-SD section 3338 * Added draft authors Peter van der Stok and Michael Koster 3340 Changes from -01 to -02: 3342 * Added a catalogue use case. 3344 * Changed the registration update to a POST with optional link 3345 format payload. Removed the endpoint type update from the update. 3347 * Additional examples section added for more complex use cases. 3349 * New DNS-SD mapping section. 3351 * Added text on endpoint identification and authentication. 3353 * Error code 4.04 added to Registration Update and Delete requests. 3355 * Made 63 bytes a SHOULD rather than a MUST for endpoint name and 3356 resource type parameters. 3358 Changes from -00 to -01: 3360 * Removed the ETag validation feature. 3362 * Place holder for the DNS-SD mapping section. 3364 * Explicitly disabled GET or POST on returned Location. 3366 * New registry for RD parameters. 3368 * Added support for the JSON Link Format. 3370 * Added reference to the Groupcomm WG draft. 3372 Changes from -05 to WG Document -00: 3374 * Updated the version and date. 3376 Changes from -04 to -05: 3378 * Restricted Update to parameter updates. 3380 * Added pagination support for the Lookup interface. 3382 * Minor editing, bug fixes and reference updates. 3384 * Added group support. 3386 * Changed rt to et for the registration and update interface. 3388 Changes from -03 to -04: 3390 * Added the ins= parameter back for the DNS-SD mapping. 3392 * Integrated the Simple Directory Discovery from Carsten. 3394 * Editorial improvements. 3396 * Fixed the use of ETags. 3398 * Fixed tickets 383 and 372 3400 Changes from -02 to -03: 3402 * Changed the endpoint name back to a single registration parameter 3403 ep= and removed the h= and ins= parameters. 3405 * Updated REST interface descriptions to use RFC6570 URI Template 3406 format. 3408 * Introduced an improved RD Lookup design as its own function set. 3410 * Improved the security considerations section. 3412 * Made the POST registration interface idempotent by requiring the 3413 ep= parameter to be present. 3415 Changes from -01 to -02: 3417 * Added a terminology section. 3419 * Changed the inclusion of an ETag in registration or update to a 3420 MAY. 3422 * Added the concept of an RD Domain and a registration parameter for 3423 it. 3425 * Recommended the Location returned from a registration to be 3426 stable, allowing for endpoint and Domain information to be changed 3427 during updates. 3429 * Changed the lookup interface to accept endpoint and Domain as 3430 query string parameters to control the scope of a lookup. 3432 13. References 3434 13.1. Normative References 3436 [I-D.ietf-core-echo-request-tag] 3437 Amsuess, C., Mattsson, J., and G. Selander, "CoAP: Echo, 3438 Request-Tag, and Token Processing", Work in Progress, 3439 Internet-Draft, draft-ietf-core-echo-request-tag-11, 2 3440 November 2020, . 3443 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3444 Requirement Levels", BCP 14, RFC 2119, 3445 DOI 10.17487/RFC2119, March 1997, 3446 . 3448 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 3449 Resource Identifier (URI): Generic Syntax", STD 66, 3450 RFC 3986, DOI 10.17487/RFC3986, January 2005, 3451 . 3453 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 3454 and D. Orchard, "URI Template", RFC 6570, 3455 DOI 10.17487/RFC6570, March 2012, 3456 . 3458 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 3459 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 3460 . 3462 [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service 3463 Discovery", RFC 6763, DOI 10.17487/RFC6763, February 2013, 3464 . 3466 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 3467 Protocol (HTTP/1.1): Message Syntax and Routing", 3468 RFC 7230, DOI 10.17487/RFC7230, June 2014, 3469 . 3471 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 3472 Application Protocol (CoAP)", RFC 7252, 3473 DOI 10.17487/RFC7252, June 2014, 3474 . 3476 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 3477 Writing an IANA Considerations Section in RFCs", BCP 26, 3478 RFC 8126, DOI 10.17487/RFC8126, June 2017, 3479 . 3481 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3482 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3483 May 2017, . 3485 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 3486 DOI 10.17487/RFC8288, October 2017, 3487 . 3489 13.2. Informative References 3491 [ER] Chen, P., "The entity-relationship model--toward a unified 3492 view of data", DOI 10.1145/320434.320440, ACM Transactions 3493 on Database Systems Vol. 1, pp. 9-36, March 1976, 3494 . 3496 [I-D.bormann-t2trg-rel-impl] 3497 Bormann, C., "impl-info: A link relation type for 3498 disclosing implementation information", Work in Progress, 3499 Internet-Draft, draft-bormann-t2trg-rel-impl-02, 27 3500 September 2020, . 3503 [I-D.hartke-t2trg-coral] 3504 Hartke, K., "The Constrained RESTful Application Language 3505 (CoRAL)", Work in Progress, Internet-Draft, draft-hartke- 3506 t2trg-coral-09, 8 July 2019, . 3509 [I-D.ietf-ace-oauth-authz] 3510 Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and 3511 H. Tschofenig, "Authentication and Authorization for 3512 Constrained Environments (ACE) using the OAuth 2.0 3513 Framework (ACE-OAuth)", Work in Progress, Internet-Draft, 3514 draft-ietf-ace-oauth-authz-36, 16 November 2020, 3515 . 3518 [I-D.ietf-core-links-json] 3519 Li, K., Rahman, A., and C. Bormann, "Representing 3520 Constrained RESTful Environments (CoRE) Link Format in 3521 JSON and CBOR", Work in Progress, Internet-Draft, draft- 3522 ietf-core-links-json-10, 26 February 2018, 3523 . 3526 [I-D.ietf-core-rd-dns-sd] 3527 Stok, P., Koster, M., and C. Amsuess, "CoRE Resource 3528 Directory: DNS-SD mapping", Work in Progress, Internet- 3529 Draft, draft-ietf-core-rd-dns-sd-05, 7 July 2019, 3530 . 3533 [I-D.silverajan-core-coap-protocol-negotiation] 3534 Silverajan, B. and M. Ocak, "CoAP Protocol Negotiation", 3535 Work in Progress, Internet-Draft, draft-silverajan-core- 3536 coap-protocol-negotiation-09, 2 July 2018, 3537 . 3540 [LwM2M] Open Mobile Alliance, "Lightweight Machine to Machine 3541 Technical Specification: Transport Bindings (Candidate 3542 Version 1.1)", 12 June 2018, 3543 . 3547 [RFC3306] Haberman, B. and D. Thaler, "Unicast-Prefix-based IPv6 3548 Multicast Addresses", RFC 3306, DOI 10.17487/RFC3306, 3549 August 2002, . 3551 [RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix 3552 Reserved for Documentation", RFC 3849, 3553 DOI 10.17487/RFC3849, July 2004, 3554 . 3556 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 3557 Unique IDentifier (UUID) URN Namespace", RFC 4122, 3558 DOI 10.17487/RFC4122, July 2005, 3559 . 3561 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 3562 "Transmission of IPv6 Packets over IEEE 802.15.4 3563 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 3564 . 3566 [RFC5771] Cotton, M., Vegoda, L., and D. Meyer, "IANA Guidelines for 3567 IPv4 Multicast Address Assignments", BCP 51, RFC 5771, 3568 DOI 10.17487/RFC5771, March 2010, 3569 . 3571 [RFC6724] Thaler, D., Ed., Draves, R., Matsumoto, A., and T. Chown, 3572 "Default Address Selection for Internet Protocol Version 6 3573 (IPv6)", RFC 6724, DOI 10.17487/RFC6724, September 2012, 3574 . 3576 [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. 3577 Bormann, "Neighbor Discovery Optimization for IPv6 over 3578 Low-Power Wireless Personal Area Networks (6LoWPANs)", 3579 RFC 6775, DOI 10.17487/RFC6775, November 2012, 3580 . 3582 [RFC6874] Carpenter, B., Cheshire, S., and R. Hinden, "Representing 3583 IPv6 Zone Identifiers in Address Literals and Uniform 3584 Resource Identifiers", RFC 6874, DOI 10.17487/RFC6874, 3585 February 2013, . 3587 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 3588 Constrained-Node Networks", RFC 7228, 3589 DOI 10.17487/RFC7228, May 2014, 3590 . 3592 [RFC7641] Hartke, K., "Observing Resources in the Constrained 3593 Application Protocol (CoAP)", RFC 7641, 3594 DOI 10.17487/RFC7641, September 2015, 3595 . 3597 [RFC8106] Jeong, J., Park, S., Beloeil, L., and S. Madanapalli, 3598 "IPv6 Router Advertisement Options for DNS Configuration", 3599 RFC 8106, DOI 10.17487/RFC8106, March 2017, 3600 . 3602 [RFC8132] van der Stok, P., Bormann, C., and A. Sehgal, "PATCH and 3603 FETCH Methods for the Constrained Application Protocol 3604 (CoAP)", RFC 8132, DOI 10.17487/RFC8132, April 2017, 3605 . 3607 [RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names 3608 (URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017, 3609 . 3611 [RFC8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 3612 "Object Security for Constrained RESTful Environments 3613 (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, 3614 . 3616 Appendix A. Groups Registration and Lookup 3618 The RD-Groups usage pattern allows announcing application groups 3619 inside an RD. 3621 Groups are represented by endpoint registrations. Their base address 3622 is a multicast address, and they SHOULD be entered with the endpoint 3623 type "core.rd-group". The endpoint name can also be referred to as a 3624 group name in this context. 3626 The registration is inserted into the RD by a Commissioning Tool, 3627 which might also be known as a group manager here. It performs third 3628 party registration and registration updates. 3630 The links it registers SHOULD be available on all members that join 3631 the group. Depending on the application, members that lack some 3632 resource MAY be permissible if requests to them fail gracefully. 3634 The following example shows a CT registering a group with the name 3635 "lights" which provides two resources. The directory resource path 3636 /rd is an example RD location discovered in a request similar to 3637 Figure 5. The group address in the example is constructed from 3638 [RFC3849]'s reserved 2001:db8:: prefix as a unicast-prefix based 3639 site-local address (see [RFC3306]. 3641 Req: POST coap://rd.example.com/rd?ep=lights&et=core.rd-group 3642 &base=coap://[ff35:30:2001:db8:f1::8000:1] 3643 Content-Format: 40 3644 Payload: 3645 ;rt="tag:example.com,2020:light"; 3646 if="tag:example.net,2020:actuator", 3647 ;if="tag:example.net,2020:parameter";u=K 3649 Res: 2.01 Created 3650 Location-Path: /rd/12 3652 Figure 27: Example registration of a group 3654 In this example, the group manager can easily permit devices that 3655 have no writable color-temperature to join, as they would still 3656 respond to brightness changing commands. Had the group instead 3657 contained a single resource that sets brightness and color 3658 temperature atomically, endpoints would need to support both 3659 properties. 3661 The resources of a group can be looked up like any other resource, 3662 and the group registrations (along with any additional registration 3663 parameters) can be looked up using the endpoint lookup interface. 3665 The following example shows a client performing an endpoint lookup 3666 for all groups. 3668 Req: GET /rd-lookup/ep?et=core.rd-group 3670 Res: 2.05 Content 3671 Payload: 3672 ;ep=lights&et=core.rd-group; 3673 base="coap://[ff35:30:2001:f1:db8::8000:1]";rt=core.rd-ep 3675 Figure 28: Example lookup of groups 3677 The following example shows a client performing a lookup of all 3678 resources of all endpoints (groups) with et=core.rd-group. 3680 Req: GET /rd-lookup/res?et=core.rd-group 3682 Res: 2.05 Content 3683 Payload: 3684 ; 3685 rt="tag:example.com,2020:light"; 3686 if="tag:example.net,2020:actuator", 3687 ; 3688 if="tag:example.net,2020:parameter";u=K, 3690 Figure 29: Example lookup of resources inside groups 3692 Appendix B. Web links and the Resource Directory 3694 Understanding the semantics of a link-format document and its URI 3695 references is a journey through different documents ([RFC3986] 3696 defining URIs, [RFC6690] defining link-format documents based on 3697 [RFC8288] which defines Link header fields, and [RFC7252] providing 3698 the transport). This appendix summarizes the mechanisms and 3699 semantics at play from an entry in "/.well-known/core" to a resource 3700 lookup. 3702 This text is primarily aimed at people entering the field of 3703 Constrained Restful Environments from applications that previously 3704 did not use web mechanisms. 3706 B.1. A simple example 3708 Let's start this example with a very simple host, "2001:db8:f0::1". 3709 A client that follows classical CoAP Discovery ([RFC7252] Section 7), 3710 sends the following multicast request to learn about neighbours 3711 supporting resources with resource-type "temperature". 3713 The client sends a link-local multicast: 3715 Req: GET coap://[ff02::fd]:5683/.well-known/core?rt=temperature 3717 Res: 2.05 Content 3718 Payload: 3719 ;rt=temperature;ct=0 3721 Figure 30: Example of direct resource discovery 3723 where the response is sent by the server, "[2001:db8:f0::1]:5683". 3725 While the client - on the practical or implementation side - can just 3726 go ahead and create a new request to "[2001:db8:f0::1]:5683" with 3727 Uri-Path: "sensors" and "temp", the full resolution steps for 3728 insertion into and retrieval from the RD without any shortcuts are: 3730 B.1.1. Resolving the URIs 3732 The client parses the single returned record. The link's target 3733 (sometimes called "href") is ""/sensors/temp"", which is a relative 3734 URI that needs resolving. The base URI 3735 is used to resolve the 3736 reference /sensors/temp against. 3738 The Base URI of the requested resource can be composed from the 3739 options of the CoAP GET request by following the steps of [RFC7252] 3740 section 6.5 (with an addition at the end of 8.2) into 3741 ""coap://[2001:db8:f0::1]/.well-known/core"". 3743 Because ""/sensors/temp"" starts with a single slash, the record's 3744 target is resolved by replacing the path ""/.well-known/core"" from 3745 the Base URI (section 5.2 [RFC3986]) with the relative target URI 3746 ""/sensors/temp"" into ""coap://[2001:db8:f0::1]/sensors/temp"". 3748 B.1.2. Interpreting attributes and relations 3750 Some more information but the record's target can be obtained from 3751 the payload: the resource type of the target is "temperature", and 3752 its content format is text/plain (ct=0). 3754 A relation in a web link is a three-part statement that specifies a 3755 named relation between the so-called "context resource" and the 3756 target resource, like "_This page_ has _its table of contents_ at _/ 3757 toc.html_". In link format documents, there is an implicit "host 3758 relation" specified with default parameter: rel="hosts". 3760 In our example, the context resource of the link is implied to be 3761 "coap:://[2001:db8:f0::1]" by the default value of the anchor (see 3762 Appendix B.4). A full English expression of the "host relation" is: 3764 '"coap://[2001:db8:f0::1]" is hosting the resource 3765 "coap://[2001:db8:f0::1]/sensors/temp", which is of the resource type 3766 "temperature" and can be accessed using the text/plain content 3767 format.' 3769 B.2. A slightly more complex example 3771 Omitting the "rt=temperature" filter, the discovery query would have 3772 given some more records in the payload: 3774 Req: GET coap://[ff02::fd]:5683/.well-known/core 3776 Res: 2.05 Content 3777 Payload: 3778 ;rt=temperature;ct=0, 3779 ;rt=light-lux;ct=0, 3780 ;anchor="/sensors/temp";rel=alternate, 3781 ;anchor="/sensors/temp"; 3782 rel=describedby 3784 Figure 31: Extended example of direct resource discovery 3786 Parsing the third record, the client encounters the "anchor" 3787 parameter. It is a URI relative to the Base URI of the request and 3788 is thus resolved to ""coap://[2001:db8:f0::1]/sensors/temp"". That 3789 is the context resource of the link, so the "rel" statement is not 3790 about the target and the Base URI any more, but about the target and 3791 the resolved URI. Thus, the third record could be read as 3792 ""coap://[2001:db8:f0::1]/sensors/temp" has an alternate 3793 representation at "coap://[2001:db8:f0::1]/t"". 3795 Following the same resolution steps, the fourth record can be read as 3796 ""coap://[2001:db8:f0::1]/sensors/temp" is described by 3797 "http://www.example.com/sensors/t123"". 3799 B.3. Enter the Resource Directory 3801 The RD tries to carry the semantics obtainable by classical CoAP 3802 discovery over to the resource lookup interface as faithfully as 3803 possible. 3805 For the following queries, we will assume that the simple host has 3806 used Simple Registration to register at the RD that was announced to 3807 it, sending this request from its UDP port "[2001:db8:f0::1]:6553": 3809 Req: POST coap://[2001:db8:f01::ff]/.well-known/rd?ep=simple-host1 3811 Res: 2.04 Changed 3813 Figure 32: Example of a simple registration 3815 The RD would have accepted the registration, and queried the simple 3816 host's "/.well-known/core" by itself. As a result, the host is 3817 registered as an endpoint in the RD with the name "simple-host1". 3818 The registration is active for 90000 seconds, and the endpoint 3819 registration Base URI is ""coap://[2001:db8:f0::1]"" following the 3820 resolution steps described in Appendix B.1.1. It should be remarked 3821 that the Base URI constructed that way always yields a URI of the 3822 form: scheme://authority without path suffix. 3824 If the client now queries the RD as it would previously have issued a 3825 multicast request, it would go through the RD discovery steps by 3826 fetching "coap://[2001:db8:f0::ff]/.well-known/core?rt=core.rd- 3827 lookup-res", obtain "coap://[2001:db8:f0::ff]/rd-lookup/res" as the 3828 resource lookup endpoint, and ask it for all temperature resources: 3830 Req: GET coap://[2001:db8:f0::ff]/rd-lookup/res?rt=temperature 3832 Res: 2.05 Content 3833 Payload: 3834 ;rt=temperature;ct=0 3836 Figure 33: Example exchange performing resource lookup 3838 This is not _literally_ the same response that it would have received 3839 from a multicast request, but it contains the equivalent statement: 3841 '"coap://[2001:db8:f0::1]" is hosting the resource 3842 "coap://[2001:db8:f0::1]/sensors/temp", which is of the resource type 3843 "temperature" and can be accessed using the text/plain content 3844 format.' 3846 To complete the examples, the client could also query all resources 3847 hosted at the endpoint with the known endpoint name "simple-host1": 3849 Req: GET coap://[2001:db8:f0::ff]/rd-lookup/res?ep=simple-host1 3851 Res: 2.05 Content 3852 Payload: 3853 ;rt=temperature;ct=0, 3854 ;rt=light-lux;ct=0, 3855 ; 3856 anchor="coap://[2001:db8:f0::1]/sensors/temp";rel=alternate, 3857 ; 3858 anchor="coap://[2001:db8:f0::1]/sensors/temp";rel=describedby 3860 Figure 34: Extended example exchange performing resource lookup 3862 All the target and anchor references are already in absolute form 3863 there, which don't need to be resolved any further. 3865 Had the simple host done an equivalent full registration with a base= 3866 parameter (e.g. "?ep=simple-host1&base=coap+tcp://simple- 3867 host1.example.com"), that context would have been used to resolve the 3868 relative anchor values instead, giving 3870 ;rt=temperature;ct=0 3872 Figure 35: Example payload of a response to a resource lookup 3873 with a dedicated base URI 3875 and analogous records. 3877 B.4. A note on differences between link-format and Link header fields 3879 While link-format and Link header fields look very similar and are 3880 based on the same model of typed links, there are some differences 3881 between [RFC6690] and [RFC8288]. When implementing an RD or 3882 interacting with an RD, care must be taken to follow the [RFC6690] 3883 behavior whenever application/link-format representations are used. 3885 * "Default value of anchor": Both under [RFC6690] and {{RFC8288}, 3886 relative references in the term inside the angle brackets (the 3887 target) and the anchor attribute are resolved against the relevant 3888 base URI (which usually is the URI used to retrieve the entity), 3889 and independent of each other. 3891 When, in an [RFC8288] Link header, the anchor attribute is absent, 3892 the link's context is the URI of the selected representation (and 3893 usually equal to the base URI). 3895 In [RFC6690] links, if the anchor attribute is absent, the default 3896 value is the Origin of (for all relevant cases: the URI reference 3897 "/" resolved against) the link's target. 3899 * There is no percent encoding in link-format documents. 3901 A link-format document is a UTF-8 encoded string of Unicode 3902 characters and does not have percent encoding, while Link header 3903 fields are practically ASCII strings that use percent encoding for 3904 non-ASCII characters, stating the encoding explicitly when 3905 required. 3907 For example, while a Link header field in a page about a Swedish 3908 city might read 3910 Link: ;rel=live-environment-data 3912 a link-format document from the same source might describe the 3913 link as 3915 ;rel=live-environment-data 3917 Appendix C. Limited Link Format 3919 The CoRE Link Format as described in [RFC6690] has been interpreted 3920 differently by implementers, and a strict implementation rules out 3921 some use cases of an RD (e.g. base values with path components in 3922 combination with absent anchors). 3924 This appendix describes a subset of link format documents called 3925 Limited Link Format. The one rule herein is not very limiting in 3926 practice - all examples in RFC6690, and all deployments the authors 3927 are aware of already stick to them - but ease the implementation of 3928 RD servers. 3930 It is applicable to representations in the application/link-format 3931 media type, and any other media types that inherit [RFC6690] 3932 Section 2.1. 3934 A link format representation is in Limited Link format if, for each 3935 link in it, the following applies: 3937 All URI references either follow the URI or the path-absolute ABNF 3938 rule of RFC3986 (i.e. target and anchor each either start with a 3939 scheme or with a single slash). 3941 Authors' Addresses 3943 Christian Amsüss (editor) 3944 Hollandstr. 12/4 3945 1020 3946 Austria 3948 Phone: +43-664-9790639 3949 Email: christian@amsuess.com 3951 Zach Shelby 3952 ARM 3953 150 Rose Orchard 3954 San Jose, 95134 3955 United States of America 3957 Phone: +1-408-203-9434 3958 Email: zach.shelby@arm.com 3960 Michael Koster 3961 SmartThings 3962 665 Clyde Avenue 3963 Mountain View, 94043 3964 United States of America 3966 Phone: +1-707-502-5136 3967 Email: Michael.Koster@smartthings.com 3969 Carsten Bormann 3970 Universitaet Bremen TZI 3971 Postfach 330440 3972 D-28359 Bremen 3973 Germany 3975 Phone: +49-421-218-63921 3976 Email: cabo@tzi.org 3977 Peter van der Stok 3978 consultant 3980 Phone: +31-492474673 (Netherlands), +33-966015248 (France) 3981 Email: consultancy@vanderstok.org 3982 URI: www.vanderstok.org