SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
Building and Managing IoT Apps
with Lightweight M2M
Virtual IoT Meetup - Sept. 10, 2015
Julien Vermillard – Sierra Wireless
Building and Managing IoT Apps
with Lightweight M2M
Virtual IoT Meetup - Sept. 10, 2015
Julien Vermillard – Sierra Wireless
Agenda
● From M2M to Web-of -Things
● Device management 101
● Intro to Lightweight M2M
● Security with LwM2M
○ End-to-End vs Gateways
○ Secrets & Access control
● Get started with Leshan & Wakaama
Machine-to-Machine
Server
Machine A Machine B Machine C
Internet-of-Things
Web-of-Things
/walk
/hand/left/raise
/eye/picture
/on
/red
/green
/blue
/mtbf
/on
/on
/buttons
/buttons/1/push
/bat-level
/engine/status
/position
/fuel
/CO2
/noise
/lights/on
Conquering the last mile
Low power networks plugged to the Internet
● 6LowPAN
● Bluetooth Smart 4.2
● Thread
IPv6 MTU: 1280 bytes, 6LowPAN: ~100 bytes
TCP, HTTP,MQTT doesn’t fit
CoAP: a new protocol for the IoT
Class 1 devices
~100KiB Flash
~10KiB RAM
~$1
Low-power networks
<100Bytes packets
CoAP in a nutshell
RESTful protocol designed from scratch
URIs, Internet Media Types
GET, POST, PUT, DELETE
Transparent mapping to HTTP
Additional features for M2M scenarios
Observe
CoAP: Constrained Application Protocol
Binary protocol
- Low parsing complexity
- Small message size
Options
- Binary HTTP-like headers
0 – 8 Bytes Token
Exchange handle for client
4-byte Base Header
Version | Type | T-len | Code | ID
Options
Location, Max-Age, ETag, …
Marker
0xFF
Payload
Representation
Device management?
Secure, monitor, manage a fleet of devices
● Configure the device
● Update the firmware (and maybe the app)
● Monitor and gather connectivity statistics
Device management
You don't know yet what hardware will power
your IoT projects on the field,
But you MUST be able to do device management
in a consistent way without vendor lock
OMA Lightweight M2M
An API on top of CoAP
Lightweight M2M
REST API for:
Security, Device, Server
Connectivity monitoring, Connectivity statistics
Location, Firmware Upgrade, Software management,
Swipe & Lock
But objects have a numerical identifier
Lightweight M2M - CoAP URLs
/{object}/{instance}/{resource}
Examples:
● "/6/0" the whole location object (binary record)
● "/6/0/1" only the longitude (degree)
Example: Object Device
Manufacturer
Model number
Serial number
Firmware version
Reboot
Factory reset
Power sources
Power V/A
Battery level
Memory free
Error code
Current time
UTC offset
Timezone
Also with applicative objects
You can define your own objects
Discoverable using CoAP Link Format
IPSO Alliance Smart Objects:
accelerometer, temperature, sensors,...
Demo!
Security with LwM2M
DTLS and secret management
Authentication and encryption
Based on DTLS 1.2 (TLS for Datagrams)
Focus on AES & Elliptic Curve Cryptography (ECC)
AES Hardware acceleration in IoT oriented SoC
Works on Low Power networks (~100bytes MTU)
TLS_PSK_WITH_AES_128_CCM_8
Pre-Shared-Key:
password for session authentication
AES 128bits (or 256) - Counter CBC Mode:
encryption and integrity (AEAD cipher)
8 bytes for integrity in place of CCM usual 16
What? :D
PSK: No certificates, just password
CCM8: compactness
Full DTLS-PSK-CCM8 handshake in ~1030 bytes
Ex: HTTPS TLS handshake ~6000bytes
More security: TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
ECDHE: Perfect Forward Secrecy (PFS)
Someone rob your private key: he can’t decrypt
past communications
ECDSA: use public key in place of password
You can use X.509 certificates (like HTTPS)
Security with gateways
public network
Sensor network
(ex: Zigbee)
Gateway:
collect data and
push to cloud
cable, 4G, etc..
Secure transportLow or no security
Security with gateways
public network
Sensor network
(ex: Zigbee)
cable, 4G, etc..
Attack gateway
get access to
all the network
Local wireless
sniffing
Other gateway architecture flaws
Complexity: mixing IP and non IP networks
Lack of flexibility compared to end-to-end IP
Hard to scale vs IP routing
End-to-end security
public network
Low power nodes:
security starts here
Sensor network
(ex: Thread)
Router
cable, 4G, etc..
See only encrypted communication
Not your Achilles heel
At scale?
You will have a fleet of device
They needs secrets (key, password, etc..)
Unique across devices
You need to be able to change those secrets
You will probably don’t trust your factory
Lightweight M2M Bootstrap
Flash bootstrap
credentials
I only have bootstrap
credentials or I can’t
reach final server
Lightweight M2M Bootstrap
Lightweight M2M Bootstrap
Give me key
and my
server(s)
Bootstrap Server
Lightweight M2M Bootstrap
New key and
server(s) URLs
and ACL
Bootstrap Server
Lightweight M2M Bootstrap
Registration
Bootstrap Server
Registration
Home Automation
Server
Device Manag.
Server
Access Control Lists
Define which operation on a given object for a
given server
One server for Over-The-Air upgrade:
“/5/”+“/9/” read, write, exec
One server for application, maybe with:
“/5” read only
Hands-On!
Getting started with Leshan & Wakaama
Leshan
Java library for implementing servers & clients
Friendly for any Java developer
Simple (no framework, few dependencies)
But also a Web UI for discovering and testing
Build using “mvn install”
Based on Californium and Scandium
Public sandbox
http://leshan.eclipse.org
Bleeding edge: deployed on master commit
IPv4 and IPv6
Press “CoAP messages” for low-level traces
Wakaama
A C client and server implementation of LwM2M
Not a shared library (.so/.dll)
Embedded friendly but using malloc/free
Plug your own IP stack and DTLS implementation
Wakaama features
Register, registration update, deregister
Read, write resources
Read, write, create, delete object instances
TLV or plain text
Observe
Wakaama internals
core :
internals.h liblwm2m.c liblwm2m.h
list.c management.c objects.c observe.c
packet.c registration.c tlv.c transaction.c
uri.c utils.c
core/er-coap-13 :
er-coap-13.c er-coap-13.h
Tinydtls
Eclipse Proposal
“Support session multiplexing in single-threaded
applications and thus targets specifically on
embedded systems.”
Examples for Linux, or Contiki OS
TLS_PSK_WITH_AES_128_CCM_8
TLS_ECDHE_ECDSA_WITH_AES128_CCM_8
In real hardware?
Spark Core:
Cortex-M3 STM32,
RAM/ROM 20/128k, 72MHz
WiFi
Arduino Mega
AVR, ATmega2560,
RAM/ROM 8/256k, 16MHz
Ethernet
Thank you!
Questions?
http://eclipse.org/leshan
@vrmvrm
jvermillard@sierrawireless.com

Contenu connexe

En vedette

OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOpen Mobile Alliance
 
Hands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanHands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanJulien Vermillard
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?Julien Vermillard
 
Vehicle To Vehicle Communication System
Vehicle To Vehicle Communication SystemVehicle To Vehicle Communication System
Vehicle To Vehicle Communication SystemMonaco Motors
 
The 5 elements of IoT security
The 5 elements of IoT securityThe 5 elements of IoT security
The 5 elements of IoT securityJulien Vermillard
 

En vedette (7)

OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse FoundationOMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
OMA LwM2M Workshop - Julien Vermillard, OMA LwM2M Projects in Eclipse Foundation
 
VANET, Security and Trust
VANET, Security and TrustVANET, Security and Trust
VANET, Security and Trust
 
Hands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanHands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse Leshan
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
 
Vehicle To Vehicle Communication System
Vehicle To Vehicle Communication SystemVehicle To Vehicle Communication System
Vehicle To Vehicle Communication System
 
Introduction to VANET
Introduction to VANETIntroduction to VANET
Introduction to VANET
 
The 5 elements of IoT security
The 5 elements of IoT securityThe 5 elements of IoT security
The 5 elements of IoT security
 

Dernier

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Building and managing iot applications with Lightweight M2M