Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify consequences of new DTLS Session #177

Closed
boaks opened this issue Dec 16, 2016 · 7 comments
Closed

Clarify consequences of new DTLS Session #177

boaks opened this issue Dec 16, 2016 · 7 comments
Assignees

Comments

@boaks
Copy link

boaks commented Dec 16, 2016

OMA-TS-LightweightM2M-V1_0-20161123-D, 8.2.4

When a new DTLS Session is started, or in NoSec mode when the LWM2M Client IP address changes, the Client MUST register again to the LWM2M Server.

Please describe the behaviour, when a DTLS session is established and the client doesn't send a registration. Should othe messages be ignored? Denied?

@sbernard31
Copy link

IMHO, this sentence should be removed from the spec.
We should not linked registration lifetime to DTLS session lifetime (see discussion here)

@dnav
Copy link
Member

dnav commented Dec 19, 2016

@boaks: which other messages ? If a client is not registered, the LWM2M messages it sends are ignored.

@sbernard31 : I agree the LWM2M registration should be independant of the DTLS session. However, the CoAP specification expects all operations (especially observation) to be contained in the same DTLS session.

@sbernard31
Copy link

@dnav even more, the spec say same connection and same epoch. (which means no session resumption, no renegotiation)
In theory, this means that CoAP observe just doesn't work in IP changing environment (like IPv4+NAT).
In practice, I'm not sure there is so much CoAP implementation we really do this check.
In Californium we add it recently and we will change it to be less strict than the spec or at least make it configurable.

@boaks
Copy link
Author

boaks commented Dec 19, 2016

@dnav: which other messages ? If a client is not registered, the LWM2M messages it sends are ignored.

Yes, your right, if a client is not registered, it is not that difficult.
But to be precise, “the LWM2M messages it sends are ignored.” is from my experience not true. Sending an “update” registration is usually answered by “4.04 Not found” instead of being ignored.

And unfortunately the reality (at least in my experience) offers some more surprise.
E.g. :

  • Device establish DTLS session
  • Devise registers (successful)
  • Device establish a new DTLS session (caused by errors)
  • Device violates the spec and doesn’t register instead it update the registration.

So, with your premise “client is not registered”, a new DTLS session must “deregister” the client (I hope, the used DTLS libraries will offer such callbacks). But that should then be specified in the TS (at least in my opinion).

And if too many find out, that their DTLS library doesn't support that callback, then the "check" for "update" should be defined also.

@hannestschofenig
Copy link

When you guys write that the "lifetime of the LWM2M registration should be independent of the DTLS session" what aspects are you specifically concerned about?

It might also be useful to clarify what you mean by DTLS session lifetime?

@sbernard31
Copy link

My concerns explained here:
"We should not couple this concept. For security purpose the TLS spec advice to define session lifetime to 24h. With this constraint, thats means that most of the time a registration will live only for 24h ... or Users will extend TLS session lifetime for a bad reason ...."

About DTLS session lifetime : https://tools.ietf.org/html/rfc5246#appendix-F.1.4

@hannestschofenig
Copy link

In LwM2M v1.1 we will have to re-evaluate the relationship between the transport and the communication security mechanism. In general, I agree that the lifetime of the LwM2M registration should be independent of the lifetime of various TLS/DTLS security credentials. As pointed out in the discussion I believe there is an item that needs to be brought to the attention to the CORE working group as well (since the CoAP specification seems to be incorrect).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants