Earp: Principled Storage, Sharing, and Protection for Mobile Apps - - PowerPoint PPT Presentation

earp principled storage sharing and protection for mobile
SMART_READER_LITE
LIVE PREVIEW

Earp: Principled Storage, Sharing, and Protection for Mobile Apps - - PowerPoint PPT Presentation

Earp: Principled Storage, Sharing, and Protection for Mobile Apps Yuanzhong Xu , Tyler Hunt, Youngjin Kwon, Martin Georgiev, Vitaly Shmatikov , Emmett Witchel UT !Austin, ! Cornell !Tech Santa !Clara, !CA, !3/18/2016 Desktop


slide-1
SLIDE 1

Earp: Principled Storage, Sharing, and Protection for Mobile Apps

Yuanzhong Xu, Tyler Hunt, Youngjin Kwon, Martin Georgiev,


Vitaly Shmatikov†, Emmett Witchel

UT !Austin, !†Cornell !Tech


Santa !Clara, !CA, !3/18/2016

slide-2
SLIDE 2

Desktop era

OS

Files

  • Applications mostly

work individually

  • They rely on the OS to

store and exchange data, in the form of files

2

slide-3
SLIDE 3

Data protection in desktop era

OS

Files

OS protects data:

  • File ownership and

permissions

  • App processes hold file

handles (file descriptors)

access control checks

file handle

3

slide-4
SLIDE 4

Mobile era

OS (Platform)

  • Apps interact with each
  • ther as much as with

the platform — an app “ecosystem”

  • “Hub” apps provide

services to other apps

storage user login contacts, calendar, media collections

4

slide-5
SLIDE 5

Data protection in mobile platforms

OS (Platform)

storage user login contacts, calendar, media collections

  • Apps check

interactions

access control checks

Check what apps have access to what data

access control checks

  • Platform checks file

access

5

slide-6
SLIDE 6

No principled solution for app-level checks

Different high-level semantics: not just files!

  • Different data models —

how data structures represent semantics

  • Different protection

requirements

  • Developers have to write

ad hoc checks

contact info photo album calendar events

6

access control checks

slide-7
SLIDE 7

DB rows

Example: implement a photo manager

Photo files Thumbnails

  • Organize photos with albums
  • Maintain metadata in database
  • Keep indexes to files
  • 1. Design a data model

How would a developer write ad hoc checks?

7

slide-8
SLIDE 8

DB rows Photo files Thumbnails

public

  • 2. Define protection requirements
  • Each app can have its own

private photos and albums

  • Apps share some public

photos and albums

How would a developer write ad hoc checks?

Example: implement a photo manager

8

slide-9
SLIDE 9

DB rows Photo files

  • 3. Implement the protection
  • Implement fine-grained permissions


— ACL columns in DB, append WHERE clauses in queries

  • Protect files


— permission bits not enough for many apps

Transfer via IPC, no direct file access…

  • How to change permissions?

What is the API?

  • What if we want a group of

apps to access photos?

  • How to hide location info

about a photo?

Thumbnails

How would a developer write ad hoc checks?

Problem: ad hoc checks are hard, error-prone Example: implement a photo manager

9

slide-10
SLIDE 10

Specifications

Reality: all-or-nothing “protection”

  • Developers give up fine-grained

protection…

  • Let apps have access to either all
  • r none of the photos!
  • Violates the principle of least

privilege

DB rows Photo files Thumbnails

10

slide-11
SLIDE 11
  • iOS: Snapchat automatically saves photos to shared gallery
  • Android: Dropbox stores files in public external storage
  • Firefox OS: email attachments copied to public SD card when
  • pened
  • Mistakes in network-based authentication protocols (OAuth):
  • Sun et al. CCS ’12, Viennot et al. SIGMETRICS ’14

Reality: apps have insufficient protection

slide-12
SLIDE 12

Specifications

Ideally: separate specification from enforcement

DB rows Photo files Thumbnails

public

  • App specifies data model with

protection requirement

OS (Platform)

Enforcement

access control checks

  • Platform enforces protection,


no ad hoc checks in apps

12

slide-13
SLIDE 13

Specifications

Problem: semantic gap in existing platforms

OS (Platform)

? ? ?

Enforcement DB rows Photo files Thumbnails

public

access control checks

13

Highly structured
 app-level data Unstructured byte streams

13

No visibility to structures

slide-14
SLIDE 14

Specifications

Platform needs to understand structured data

DB rows Photo files Thumbnails

public

OS (Platform)

Enforcement

access control checks

Highly structured
 app-level data Platform-level structured abstraction & protection

14

slide-15
SLIDE 15
  • 3. Platform enforces protection for the app

desc

  • 4. Uniform API: subset descriptor


— capability handle, representing an access control view (but more than just a DB view)

Relational

Earp

  • 1. Make relational model

a platform-level abstraction

App

  • 2. Integrate protection

requirements with the data model — annotated relational schema

specify

Platform

15

slide-16
SLIDE 16

Unify storage and inter-app services

Platform App

No need for OAuth

desc Relational

16

  • r

Virtual table Virtual table Virtual tables

Service callbacks

function add () {…}; function list() {…}; …

Proxy

Database

16

slide-17
SLIDE 17

database/service

  • pen

Subset descriptors are flexible

desc

downgrade: add more restrictions e.g., exclude some sensitive rows/columns

desc

transfer: (temporarily) delegate access to another app

desc

17

slide-18
SLIDE 18

Operations:

  • View photos directly
  • View photos in an album
  • Search photos with a certain tag

Photo manager example revisited

textual tags photos albums

  • bjects in different tables

FILE-type column

18

slide-19
SLIDE 19

Photo manager example revisited

textual tags photos albums

  • bjects in different tables

public

Protection requirements:

  • Each app has its own private

photos and albums

  • Apps share public photos and

albums

19

slide-20
SLIDE 20

Specify protection in data model #1

textual tags photos albums

Per-object permissions (per-row ACLs)

20

slide-21
SLIDE 21

Fine-grained permissions are insufficient

Problem with permissions only: sharing collections of data.

textual tags photos albums

Share this album? Need to transitively updating ACLs of many objects!

  • Complicated permission management
  • Consistency challenge

21

slide-22
SLIDE 22

textual tags photos albums

Specify protection in data model #2

confers access confers access

Capability relationships:

Cross-table relationships can confer access rights, in one direction (red arrows).

22

  • Avoid transitively updating ACLs
  • Achieve flexible access control

with simple ACLs

slide-23
SLIDE 23

Data model is specified. Let the platform enforce protection!

Done!

23

slide-24
SLIDE 24

But there is an efficiency challenge

textual tags photos albums

confers access confers access

Capability relationships make
 access rights on one object may depend on other objects Cross-table checks for every access?

24

slide-25
SLIDE 25
  • E.g., derive fine-grained

descriptors based on query results Solution: “buffer” computed access rights in descriptors

Minimize cross-table checks with descriptors

d0

25

successful query proves access

d1 d2

Directly allow access to the photo

d3

slide-26
SLIDE 26

database

  • Simple high-level APIs that hide

details about descriptors

  • Automates descriptor creation and

management

Making it simpler to use

desc

  • bject graph

APIs

26

slide-27
SLIDE 27

Implementation: browser-based platform

A modified Firefox OS:

  • Apps written purely in Web

code (HTML5, JavaScript)

  • Structured APIs implemented

in the platform (browser) Paper discusses ways to apply Earp innovations to Android

Browser runtime (platform)

App sandbox

APP in JavaScript

API for structured data Earp reference monitor JavaScript Engine DOM SQLite databases services

  • bject graph library

27

slide-28
SLIDE 28

List of Earp apps

Local apps

  • Photo manager
  • Contacts
  • Access control based on

categories and data fields

  • Email
  • Temporary, restricted access

to attachments Proxies for remote services

  • Egg-based social service
  • Google Drive
  • Per-app private folders

28

slide-29
SLIDE 29

Expressive access control can be efficient

Microbenchmarks: mostly

  • utperforms baseline (Firefox OS)
  • Earp apps directly use SQLite, and

access control is efficient

  • Firefox OS apps use IndexedDB

(built on top of SQLite)

29

slide-30
SLIDE 30

Expressive access control can be efficient

Macrobenchmarks for remote services

  • Local proxies add 2% - 8%

latency

Elgg read Elgg write Google Drive write Google Drive read

local latency: app<->proxy remote latecy: proxy<->remote

30

slide-31
SLIDE 31

Conclusion

  • Inconsistent data abstractions in existing platforms
  • App: inter-related, structured data objects
  • Platform: unstructured byte streams
  • Earp provides structured data as a platform-level abstraction
  • Principled storage, sharing, and protection

31