220 likes | 458 Views
Firefox OS Security. Paul Theriault, Sept 2013. Firefox OS Components. Gaia - User interface Gecko – Browser Runtime Gonk – underlying Linux OS, firmware etc Third-party Apps - HTML/JS/CSS Apps. Gaia. Collection of web apps which run all UI https :// github.com /mozilla-b2g/ gaia. Gecko.
E N D
Firefox OS Security • Paul Theriault, Sept 2013
Firefox OS Components • Gaia - User interface • Gecko – Browser Runtime • Gonk – underlying Linux OS, firmware etc • Third-party Apps - HTML/JS/CSS Apps
Gaia • Collection of web apps which run all UI • https://github.com/mozilla-b2g/gaia
Gecko • Web APIs navigator.telephony.dial('5551234') navigator.mozTCPSocket.open("www.mozilla.org", 80); • Gaia Glue (see shell.js) • GonkGlue (communication with daemons etc)
Gonk • Lower-level operating system • Linux kernel and HAL (Hardware Abstraction Layer) • Open-source lbs: libusb, bluez ... • Android libs: GPS, camera ...
Firefox OS Web Apps • HTML, JavaScript, CSS • Defined by location of manifest file • Has to be installed • Can be hosted remotely or in a local package
Challenge #1 Make the web trusted.
Types vs Permissions • Regular Content : Geolocation, Fullscreen • Web apps Sensor API, Alarm API • Privileged apps : Camera API, Alarm API, TCP Socket, Contacts API, Device Storage API, Browser API, WiFi Information API, MobileNetwork API • Certified : Background services, WebSMS, WebTelephony, WebBluetooth, MobileConnection API, PowerManagementAPI, Push Notifications API, Settings API, Permissions API, FM Radio Full list
CSP • Content Security Policy • https://developer.mozilla.org/Apps/CSP • No Remote scripts (include them in your app) • No dynamic script (onclick=“”, eval, Function(), etc) • No remote styles
Web Activities • Provides a mechanism for web apps to access restricted APIs, by asking other apps to get data on their behalf • Also use for user-mediated inter-app communication Full list of activities
Challenge #2 Give users control, while protecting them.
Permission Checks • Permission checks performed at first API use • User has context of activity • Can install the app without granting permissions • Can change their mind later
Permission types Explicit permissions • Location, contacts, images ,audio, video etc. Implicit permissions • TCPSocket, mobilenetwork, systemXHR, alarms etc.
Challenge #3 Protect apps from each other.
Getting Started • Getting started with apps • http://buildingfirefoxos.com • https://hacks.mozilla.org/ • Tablet Contribution Program
Questions Security overviewhttps://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Security_model Email: pauljt@mozilla.com