Closed kFYatek closed 5 years ago
We are looking into this issue by finding out who has attempted to implement this part of the specification. Reading through your description I do, however, also notice the challenge in developing an interoperable solution.
DM WG needs to discuss this topic based on feedback.
Comments provided by DM Working Group:
“PSK identity should be from resource 3, resource 7 is not related to DTLS it is purely related to SMS For harmonization of keys for UDP and TCP would be looked in LwM2M v1.1, there are no negative comments at this stage in the group.”
Does that mean that SMS Security Mode == 1 (DTLS PSK) is unusable when UDP Security Mode is set to anything else than 0 (PSK)?
DM provided the following comment:
I'm sorry, but your interpretation does not seem to make much sense. Here is my reasoning:
Hence, I still strongly think that it is undebatable that for "US" and "UQS" Binding settings, both the UDP and SMS transports shall be configured within the same Security instance. If you can demonstrate otherwise, then please provide a detailed example (e.g. in the style of the spec's Appendx F) of how the contents of Security and Server objects should look like.
My personal perspective on this issue.
The way to find out whether the security object refers to the SMS or to the UDP binding is via the content of the LwM2M Server URI.
Regarding the bootstrap server limitation in LwM2M v1.0 it is true that currently we only support one bootstrap server.
The way to find out whether the security object refers to the SMS or to the UDP binding is via the content of the LwM2M Server URI.
How should a URI for SMS transport look like, then?
Note that Resource definitions table in section E.1 says that
The format of the CoAP URI is defined in Section 6 of RFC 7252.
and the relevant RFC section contains the wording:
If the host component is provided as an IP-literal or IPv4address, then the CoAP server can be reached at that IP address. If host is a registered name, then that name is considered an indirect identifier and the endpoint might use a name resolution service, such as DNS, to find the address of that host. The host MUST NOT be empty; if a URI is received with a missing authority or an empty host, then it MUST be considered invalid. The port subcomponent indicates the UDP port at which the CoAP server is located. If it is empty or not given, then the default port 5683 is assumed.
This does not seem to allow any means of specifying an address for a non-IP transport.
Using RFC 5724 URIs would make some sense, although there seem to be several problems and incoherences with that approach:
The support for DTLS over SMS is currently implemented in our client as follows:
While this is obviously a non-standard extension, I personally think it is a good idea. These resources are also used for configuring SMS security in the Secure Packet Structure mode (SMS Security Mode 2), and the two modes are mutually exclusive, so there is no conflict. It also seems to be in the spirit how the UDP security resources are defined, as resources 3 and 5 have slightly different semantics for PSK, RPK and certificate modes.
I have already shared this opinion with @mojanm during the TestFest, who seemed to agree with my argumentation.
The SMS Secured mode for the Device End-point is defined to use DTLS encapsulated in SMS PDUs. Section 7.2.2.1.4, "DTLS supported authentication modes considerations", presents concerns related to various authentication modes and concludes that:
Section E.1, which defines the "LWM2M Security" Object, reinstates this standpoint in the description of Resource 6, "SMS Security Mode":
For proper operation of a DTLS client, two pieces of authentication data are necessary: the secret key and the key identity.
I assume that the DTLS secret key for SMS Security Mode 1 should be configured in the resource 8, "SMS Binding Secret Key(s)". However, there seem to be no resource to configure the identity (similar to resource 3 used for UDP binding).
Without resolving this problem, proper conforming implementation of the DTLS (Device terminated) SMS Security mode seems to be impossible.