You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: draft-ietf-core-coap-pubsub.md
+20-13
Original file line number
Diff line number
Diff line change
@@ -39,20 +39,20 @@ normative:
39
39
RFC8516:
40
40
RFC8949:
41
41
RFC9176:
42
-
RFC8613:
43
42
RFC7641:
43
+
RFC8126:
44
44
45
45
informative:
46
-
RFC8126:
46
+
RFC8613:
47
47
RFC9052:
48
48
RFC9147:
49
49
RFC9053:
50
50
RFC9200:
51
51
RFC9338:
52
+
RFC9594:
52
53
I-D.hartke-t2trg-coral-pubsub:
53
54
I-D.ietf-ace-oscore-gm-admin:
54
55
I-D.ietf-ace-pubsub-profile:
55
-
I-D.ietf-ace-key-groupcomm:
56
56
I-D.ietf-core-interfaces:
57
57
58
58
entity:
@@ -708,7 +708,7 @@ Also, we might want to restrict the discovery part ONLY for FULLY created topics
708
708
| ^ \ ___ / | ^
709
709
Read/ | | '--> | | <--' | | Read/
710
710
Update | | Delete |___| Delete | | Update
711
-
'-'Topic Topic '-'
711
+
topic-config '-' Topic Topic '-' topic-data
712
712
DELETED
713
713
~~~~
714
714
{: #fig-life title='Lifecycle of a Topic' artwork-align="center"}
@@ -739,7 +739,7 @@ A topic-configuration with a topic-data resource must have been created in order
739
739
740
740
A client can publish data to a topic by submitting the data in a PUT request to the topic-data URI as indicated in its topic resource property. Please note that the topic-data URI is not the same as the topic-configuration URI used for configuring the topic (see {{topic-resource-representation}}).
741
741
742
-
On success, the broker returns a 2.04 (Updated) response. However, when data is published to the topic for the first time, the broker instead MUST return a 2.01 (Created) response and set the topic in the fully-created state (see {{topic-lifecycle}}).
742
+
On success, the broker returns a 2.04 (Changed) response. However, when data is published to the topic for the first time, the broker instead MUST return a 2.01 (Created) response and set the topic in the fully-created state (see {{topic-lifecycle}}).
743
743
744
744
If the request does not have an acceptable content-format, the broker returns a 4.15 (Unsupported Content-Format) response.
745
745
@@ -789,16 +789,16 @@ Example of subsequent publication:
789
789
790
790
Response:
791
791
792
-
Header: Updated (Code=2.04)
792
+
Header: Changed (Code=2.04)
793
793
~~~~
794
794
795
795
### Subscribe {#subscribe}
796
796
797
-
A client can subscribe to a topic-data by sending a CoAP GET request with the Observe set to 0 to subscribe to resource updates {{RFC7641}}.
797
+
A client can subscribe to a topic-data by sending a CoAP GET request with the CoAP Observe Option set to 0 to subscribe to resource updates {{RFC7641}}.
798
798
799
799
On success, the server hosting the topic-data resource MUST return 2.05 (Content) notifications with the data and the Observe Option. Otherwise, if no Observe Option is present the client should assume that the subscription was not successful.
800
800
801
-
If the topic is not yet in the fully created state (see {{topic-lifecycle}}) the broker SHOULD return a response code 4.04 (Not Found).
801
+
If the topic is not yet in the fully created state (see {{topic-lifecycle}}) the broker MUST return a response code 4.04 (Not Found).
802
802
803
803
<!--
804
804
TODO: After a publisher publishes to the topic-data for the first time, the topic is placed into the FULLY CREATED state.
@@ -823,7 +823,7 @@ If the 'max-subscribers' parameter has been reached, the broker must treat that
823
823
TODO Right. However, how can this work when the server hosting the topic-data resource is not the broker? The broker knows the maximum number of subscribers, but that separate server does not. Is it just up to a not-specified-here synchronization protocol between the broker and that server?
824
824
-->
825
825
826
-
Example:
826
+
Example of a successful subscription followed by one update:
827
827
828
828
~~~~
829
829
Request:
@@ -883,9 +883,16 @@ A publisher MAY delete a topic by making a CoAP DELETE request on the topic-data
883
883
884
884
On success, the broker returns a 2.02 (Deleted) response.
885
885
886
-
When a topic-data resource is deleted, the broker SHOULD also delete the topic-data parameter in the topic resource, unsubscribe all subscribers by removing them from the list of observers and return a final 4.04 (Not Found) response as per {{Section 3.2 of RFC7641}}. The topic is then set back to the half created state as per {{topic-lifecycle}}.
887
886
888
-
Example:
887
+
<!--
888
+
Q: Same question here, why is this a SHOULD (see comment above).
889
+
A: Changed to MUST but I think we could discuss it. Could the broker have reasons to keep the uri of the topic-data path for later reuse in some cases? for example the broker could also implement a different behaviour for the topic-data deletion, sending back 2.02 but keeping the resource in fully created state without returning a final 4.04 to cancel existing observations BUT still having the resource addressable to allow normal GET on it, for example for retrieving the last published/historical value/s. I am ambivalent here and would welcome guidance from others. I think MUST should not be used if there are no interoperability issues cause by using SHOULD.
890
+
-->
891
+
892
+
When a topic-data resource is deleted, the broker MUST also delete the topic-data parameter in the topic resource, unsubscribe all subscribers by removing them from the list of observers and return a final 4.04 (Not Found) response as per {{Section 3.2 of RFC7641}}. The topic is then set back to the half created state as per {{topic-lifecycle}}.
893
+
894
+
Example of a successful deletion:
895
+
889
896
890
897
~~~~
891
898
Request:
@@ -993,13 +1000,13 @@ Note that the media type application/core-pubsub+cbor MUST be used when these pa
993
1000
994
1001
The architecture presented in this document inherits the security considerations from CoAP {{RFC7252}} and Observe {{RFC7641}}, as well as from Web Linking {{RFC8288}}, Link-Format {{RFC6690}}, and the CoRE Resource Directory {{RFC9176}}.
995
1002
996
-
Communications between each client and the broker MUST be secured, e.g., by using OSCORE {{RFC8613}} or DTLS {{RFC9147}}. Security considerations for the used secure communication protocols apply too.
1003
+
Communications between each client and the broker are RECOMMENDED to be secured, e.g., by using OSCORE {{RFC8613}} or DTLS {{RFC9147}}. Security considerations for the used secure communication protocols apply too.
997
1004
998
1005
The content published on a topic by a publisher client SHOULD be protected end-to-end between the publisher and all the subscribers to that topic. In such a case, it MUST be possible to assert source authentication of the published data. This can be achieved at the application layer, e.g., by using COSE {{RFC9052}}, {{RFC9053}}, {{RFC9338}}.
999
1006
1000
1007
Access control of clients at the broker MAY be enforced for performing discovery operation, and SHOULD be enforced in a fine-grained fashion for operations related to the creation, update, and deletion of topic resources, as well as for operations on topic-data resources such as publication on and subscription to topics. This prevents rogue clients to, among other things, repeatedly create topics at the broker or publish (large) contents, which may result in Denial of Service against the broker and the active subscribers.
1001
1008
1002
-
Building on {{I-D.ietf-ace-key-groupcomm}}, its application profile for publish-subscribe communication with CoAP {{I-D.ietf-ace-pubsub-profile}} provides a security model that can be used in the architecture presented in this document, in order to enable secure communication between the different parties as well as secure, authorized operations of publishers and subscribers that fulfill the requirements above.
1009
+
Building on {{RFC9594}}, its application profile for publish-subscribe communication with CoAP {{I-D.ietf-ace-pubsub-profile}} provides a security model that can be used in the architecture presented in this document, in order to enable secure communication between the different parties as well as secure, authorized operations of publishers and subscribers that fulfill the requirements above.
1003
1010
1004
1011
In particular, the application profile above relies on the ACE framework for Authentication and Authorization in Constrained Environments (ACE) {{RFC9200}} and defines a method to: authorize publishers and subscribers to perform operations at the broker, with fine-grained access control; authorize publishers and subscribers to obtain the keying material required to take part to a topic managed by the broker; protect published data end-to-end between its publisher and all the subscribers to the targeted topic, ensuring confidentiality, integrity, and source authentication of the published content end-to-end. That approach can be extended to enforce authorization and fine-grained access control for administrator clients that are intended to create, update, and delete topic-configurations at the broker.
0 commit comments