libdmclient An Open Source implementation of OMA-DM David Navarro - - PowerPoint PPT Presentation

libdmclient
SMART_READER_LITE
LIVE PREVIEW

libdmclient An Open Source implementation of OMA-DM David Navarro - - PowerPoint PPT Presentation

libdmclient An Open Source implementation of OMA-DM David Navarro FOSDEM 2013 What is Device Management ? Technologies which allow authorized third-parties to remotely perform management operations on an end-user device. Use cases


slide-1
SLIDE 1

libdmclient An Open Source implementation of OMA-DM

David Navarro

FOSDEM 2013

slide-2
SLIDE 2

2

  • Applications settings provisioning
  • Connectivity management
  • Software and Firmware update
  • Device lock and wipe
  • Device capabilities access

control (e.g. disable camera)

  • Diagnostic and monitoring
  • and more…

What is Device Management ?

  • Technologies which allow authorized third-parties to remotely perform

management operations on an end-user device.

  • Use cases are:
  • OMA-DM is the device management standard in the mobile phone

industry.

slide-3
SLIDE 3

3

OMA-DM Presentation

  • Defined by the Open Mobile Alliance
  • Current version is 1.2. Version 1.3 is finalized.
  • Client-Server protocol.
  • Mutual authentication.
  • Exchange of SyncML packets over http(s)
slide-4
SLIDE 4

4

OMA-DM Protocol Overview

  • Server sends SyncML commands on device’s standardized node
  • URIs. (e.g. ./DevInfo/DevId or ./LAWMO/Operations/PartiallyLock)
  • Commands are GET, ADD, REPLACE, DELETE and EXEC.
  • The nodes collection is called the DM tree.
  • Access Control List
slide-5
SLIDE 5

5

Example: Changing the Browser HomePage 1/3

.

BMO HomePage Name URL 1 Name URL … Favorites Orange http://www.orange.co.uk Home | libdmclient https://01.org/libdmclient

slide-6
SLIDE 6

6

Example: Changing the Browser HomePage 2/3

. . .

<Replace> <CmdID>4</CmdID> <Item> <Target> <LocURI>./BMO/HomePage/URL</LocURI> </Target> <Data>https://www.orange.fr</Data> </Item> </Replace>

. . .

. . .

< Status> <CmdRef>4</CmdRef> <Cmd>Replace</Cmd> <Data>200</Data> </Status>

. . .

slide-7
SLIDE 7

7

Example: Changing the Browser HomePage 3/3

.

BMO HomePage Name URL 1 Name URL … Favorites Orange https://www.orange.fr Home | libdmclient https://01.org/libdmclient

slide-8
SLIDE 8

8

OMA-DM Management Objects

  • Nodes are grouped in Management Objects.
  • Each MO is an interface for a functionality.
  • Three MOs are mandatory:
  • DevInfo
  • DevDetail
  • DmAcc
slide-9
SLIDE 9

9

OMA DM Session Overview

DM Client DM Server

Package 0: Push message Package 1: client initialization with credentials and device information Package 2: server initialization with credentials and initial DM commands Package 3: client response to server commands

User

Dialog User’s input

Push Server

Package n: more DM commands Package n+1: client response to server commands

slide-10
SLIDE 10

10

Introducing libdmclient

  • Implementation of the client-side of OMA-DM 1.2
  • Encodes and decodes OMA-DM packets.
  • Dispatchs DM commands to plugins.

https://01.org/libdmclient

slide-11
SLIDE 11

11

Characteristics

  • Designed for Linux
  • Written in C
  • Single threaded
  • No file system access
  • Dependencies:
  • libxml2
  • libwbxml
slide-12
SLIDE 12

12

libdmclient Usage Overview

The application takes care of:

  • communication with the DM server
  • reception of the push notification
  • User Interface

Application libdmclient Plugin Plugin Plugin

slide-13
SLIDE 13

13

Usage Flow

libdmclient Application Messaging http Push Server DM Server

Push notification notification session_init() session_start() DM packet get_next_packet() DM packet DM packet DM packet DM packet process_reply() session_close() Session pointer

slide-14
SLIDE 14

14

libdmclient Plugins

  • Handle operations on a subpart of the DM tree.

.

DevInfo DevDetail DmAcc Vendor Intel DevId Man Mod …

slide-15
SLIDE 15

15

libdmclient Plugins

  • Defined by a base URI and

several callbacks.

  • Loading mechanisms:
  • API
  • shared libraries

typedef struct { char * base_uri;

  • madm_mo_init_fn initFunc;
  • madm_mo_close_fn closeFunc;
  • madm_mo_is_node_fn isNodeFunc;
  • madm_mo_find_urn_fn findURNFunc;
  • madm_mo_get_fn getFunc;
  • madm_mo_set_fn setFunc;
  • madm_mo_get_ACL_fn getACLFunc;
  • madm_mo_set_ACL_fn setACLFunc;
  • madm_mo_rename_fn renameFunc;
  • madm_mo_delete_fn deleteFunc;
  • madm_mo_exec_fn execFunc;

} omadm_mo_interface_t;

slide-16
SLIDE 16

16

libdmclient Plugins example

application

DM packet

  • madmclient_process_reply

./Vendor/Intel plugin

isNodeFunc

libdmclient

GET ./Vendor/Intel/version getACLFunc permission check getFunc store result

  • madmclient_get_next_packet

compose reply DM packet

DM server

slide-17
SLIDE 17

17

Component View

SyncML RTK dmtree momgr credentials callbacks libmd5-rfc

  • madmclient

libxml2 libwbxml plugins application libdmclient package0

slide-18
SLIDE 18

18

Session Data Structure

  • In memory
  • Opaque pointer used in APIs
  • Contains all required data
  • state variables
  • plugins tree
  • list of reply elements
  • SyncML RTK handle

session

slide-19
SLIDE 19

19

session

  • madmclient_process_reply
  • madmclient

./Vendor/Intel plugin

DM packet DM packet

callbacks SyncML RTK momgr

get callback isNodeFunc decoding

dmtree

get check URI find plugin getACLFunc check ACL getFunc result compose store result

slide-20
SLIDE 20

20

session

  • madmclient_get_next_packet
  • madmclient

start message

SyncML RTK

get element DM packet add element end message get server URL

slide-21
SLIDE 21

21

set state to STATE_SERVER_INIT

session

  • madmclient_session_start_on alert
  • madmclient

DMAcc plugin

set server ID

dmtree credentials

get server account

momgr

get plugin get node values account details store account store ID check ID payload decoding server ID

package0

payload

slide-22
SLIDE 22

22

Current Status

  • IOP with Funambol DM server
  • Support of GET, ADD, REPLACE and DELETE
  • test material includes:
  • command-line application
  • hard-coded DevDetail, DevInfo and DMAcc
  • storage plugins (in memory and SQLite)
slide-23
SLIDE 23

23

TODOs

  • Support OMA-DM 1.3
  • EXEC support
  • Plugin management rework
  • Bootstrapping
  • SyncML RTK strip
  • Logs
  • Yocto integration

https://01.org/libdmclient

slide-24
SLIDE 24