OpenMobileAlliance / OMA_LwM2M_for_Developers

OMA LightweightM2M public resources.
http://openmobilealliance.github.io/OMA_LwM2M_for_Developers/
Other
239 stars 52 forks source link

PSK identity for DTLS over SMS #149

Closed kFYatek closed 5 years ago

kFYatek commented 8 years ago

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:

For that reason, only PSK-based authentication MUST be supported on SMS Channel using DTLS.

Section E.1, which defines the "LWM2M Security" Object, reinstates this standpoint in the description of Resource 6, "SMS Security Mode":

1: DTLS mode (Device terminated) PSK mode assumed

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.

hannestschofenig commented 8 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.

jpradocueva commented 7 years ago

DM WG needs to discuss this topic based on feedback.

jpradocueva commented 7 years ago

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.”

kFYatek commented 7 years ago

Does that mean that SMS Security Mode == 1 (DTLS PSK) is unusable when UDP Security Mode is set to anything else than 0 (PSK)?

jpradocueva commented 7 years ago

DM provided the following comment:

kFYatek commented 7 years ago

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.

hannestschofenig commented 7 years ago

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.

kFYatek commented 7 years ago

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.

dnav commented 7 years ago

How should a URI for SMS transport look like, then?

See RFC 5724

kFYatek commented 7 years ago

Using RFC 5724 URIs would make some sense, although there seem to be several problems and incoherences with that approach:

kFYatek commented 7 years ago

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.