DTLS
Is there an example on how to use it with DTLS (if supported?) Thanks
Not really. The problem with the use of DTLS is that the underlying COAP library (node-coap) should support it before. There is an open discussion about that issue here. It references also some discussiones here, as it also depends on Node's features regarding DTLS. I would follow those threads and try to help if I have any spare time left.
There seems to be a fork of node-coap implementing dtls: https://github.com/neustar/node-coap-dtls and also dtls in pure JS https://github.com/Rantanen/node-dtls
I implemented CoAP/DTLS in LWM2M/CoAP for university project. In my Git in the FIGUARDIAN branch has the security implementation in LWM2M/CoAP and SSL/TLS in the NGSI request in the IoT Agent.
In a partnership between the FiwareLab at Escola Politécnica da USP (Universidade de São Paulo) and FATEC SCS (Faculdade de Tecnologia de São Caetano do Sul), in Brazil, we figured out a way to implement a DTLS solution as described in this repository: https://github.com/m4n3dw0lf/SecureFiware with a PoC and documentations/guides about this security implementation and other security measures/analysis in the Fiware environment.
We modified the lwm2m-node-lib and the lightweightm2m-iotagent source code in 2 forks to support DTLS and to be simple to configure with the .js configuration file of the LWM2M IoTA, but we are now handling with npm-shrinkwrap issues and some refactoring to open the pull requests, the links of the forks:
-
https://github.com/m4n3dw0lf/lwm2m-node-lib
-
https://github.com/m4n3dw0lf/lightweightm2m-iotagent
The contacts can be found in the SecureFiware repository, if any of you guys wants to discuss or propose improvements in the implementations.
Maybe the best way to discuss implementation is to cast PRs in the respective repositories. That way, accurate in-line feedback can be provided.
CC: @dcalvoalonso
I`m working on purejs DTLS implementation https://github.com/nodertc/dtls. Ready for experiments and feedback.