This document defines Device API Access Control Requirements and the corresponding use cases.
This document is expected to be further updated based on both Working Group input and public comments. The Working Group anticipates to eventually publish a stabilized version of this document as a W3C Working Group Note.

Introduction

The DAP working group is defining APIs designed to enable application access to device resources, including personal contact information such as calendar and contacts information, system information such as network information, and other information. Much of this information is sensitive and potentially misused. For this reason the DAP working group charter explicitly calls out the need to control access to this information, such as through the use of policy.

The management of security policies and revocation mechanisms are out of scope.

The approach taken in this document is to simplify the possible interactions by considering three related use cases:

They are related because requirements for the un-managed web may also apply to trusted widgets, and those various requirements may also apply to delegated authority, likewise trusted widget requirements may apply to delegated authority case. Each level may add additional requirements. For example, the requirement for minimal user-dialogs may apply to all, while requirements on interoperable policy languages may only apply to the delegated authority case.

Un-managed Web Browser and Untrusted Widgets

Use Case Overview

The un-managed web browser Device API use case is the one where a web page invokes the Device API as part of the page code, such as Javascript.

This case cannot assume a policy framework that is accepted and managed for all parts of the web.

As a result any device API available to such web pages must observe these two requirements:

  1. If no user-interaction is involved, use of the API must be safe.
  2. If not safe, then user consent is required for each use of the API. This consent should appear as a part of the task specific workflow, thus not necessarily appear as a permission dialog.

A user may wish to establish a policy configuration (through explicit configuration of preferences, and remembered decisions) and there is the option of reusing this configuration across multiple devices. A user with multiple devices may wish for their security preferences to be consistent (or to at least have the option of consistency) across those devices. Rather than have to manually configure the preferences on each device, it should be possible for there to be a seamless security experience across devices, e.g. by switching SIM card between devices and as a result automatically applying a policy resident on the SIM card or synchronizing with a network-based policy management system. A specific case is the case where a user wishes to transfer a configuration from an old device to a new device. To be consistent with the delegated authority case a similar mechanism for remembering state might be appropriate.

An un-trusted widget (i.e. unsigned widget or widget signed by an unknown or untrusted authority) should be treated in the same manner as an un-managed web browser, since the risks are the same.

In summary:

Requirements

Prompts should be eliminated whenever possible. Many prompts do not provide any meaningful security because:

If prompts are shown and dismissed as a matter of routine, then the user is less inclined to take any security decision seriously, which further undermines the effectiveness of a user-driven access control system.

It is important to note that modal prompts (i.e. prompts that block all other user interaction until dismissed) seriously compromise the user experience. Modal security prompts SHOULD be avoided.

Any prompt or dialog that requests a user security decision at runtime (e.g. at the time a sensitive action is attempted) can be non-modal if the API that initiates it is asynchronous. DAP APIs MUST be designed so that all operations that could potentially trigger a prompt are asynchronous.

If user decisions are themselves expressible in the policy language, then they can be "remembered" by adding a policy-set and/or rule to the policy. Similarly, user configuration settings should be possible in the policy language. This means that the policy document is not just a way of creating an initial policy configuration, but can be the sole and complete representation of the access control configuration at any time.

Issues

Trusted Widget

Use Case Overview

The trusted Widget Device API use case is where a signed widget that has been signed by a party the device trusts is delivered to a device (this implies signature verification and trust chain validation). In this case the entire widget can be trusted as an application would be, so if installed should have a set of privileges associated with a trusted software.

Thus a trusted widget should be able to use all safe APIs that could be used in the web case, but may also be able to use additional APIs that are not safe, such as APIs that do not require specific user consent in each case. However this list must be carefully controlled.

A trusted widget might have explicit policy in which case it can be treated the same as in the delegated authority case below, or it may not have explicit policy, but additional API functionality may in general be allowed due to the trust. In this case user acceptance of the entire widget, similar to application install, may be appropriate.

Requirements

Delegated Authority

Use Case Overview

The Delegated Authority Device API use case includes the use of explicit and interoperable policy definitions to control the use of an extensive set of APIs, save and unsafe. Such rules may be used in the case of a trusted widget or the web case with clients that support it. It may be deployed by an Enterprise or a Mobile Operator, to give two examples.

This can be viewed as delegation of authority for access control policy to an external service provider. This external service provider provides advice on the trustworthiness of specific applications, and determines an access control policy that embodies that advice. The advice may be based on a knowledgebase of known trustworthy and/or malicious applications, or algorithms for detecting malicious behavior, or both. The policy defined by the external authority may be updated regularly in response to new information on known threats.

This use-case mirrors current practice with products such as virus scanners or other malware detectors.

In summary:

In determining the policy, the policy authority has the opportunity to define a policy that supports a specific objective - such as to limit access to APIs to only those web applications that are themselves distributed by the policy authority (e.g. to control its exposure to the financial risk of abuse of device APIs).

Requirements

Note that separation of the security framework from policy statements can be achieved using declarative policy statements.

Policy Examples

This section provides specific examples of statements or rules that may be expressed in a policy.

Example web site policy cases:

Example widget policy cases:

Issues

Whether requirements are needed specifying need to define capabilities in addition to features deferred since this is a higher level document at this time.

Define features, capabilities as URIs, strings, both

Features defined according to CRUD, one feature for Create, Read, Update, Delete?

Feature parameters to avoid explosion of capabilities and features? e.g. file open with either read or write parameter. ( see discussions in minutes of October 7 call )

Security and Privacy Threats

This section outlines some threats related to the Device APIs.

The landscape that is being created is the enablement of cross-platform, cross-device, easy to develop, highly functional applications based on browser technology that has been proven repeatedly to be untrustworthy - a perfect recipe for evil. Will this meet all the criteria for really successful malware on mobile devices for example?

Up until now the measures taken by the mobile industry have proven highly successful in ensuring no major malware incident has affected the industry. There have been attempts: the MMS-spreading Commwarrior is probably the most infamous, along with the Spyware tool, Flexispy. An additional factor in ensuring the success of mobile security has been the fact that mobile platforms have been too fragmented and complex, therefore not representing an attractive target so far. Existing modus operandi from technology-related attacks can provide indicators as to the types of attack and abuse that can be expected on widgets and web applications as device APIs are opened up.

Abuse Case AC1: Premium Rate Abuse

A widget that seems benign but is actually spewing out SMSs to premium rate numbers without the user’s knowledge. This could be modified from an original safe widget such as a game. For the malware author, the key piece to solve is to dupe the user into thinking that the SMS capability is something that is part of the original application. Examples of this have been seen in the past, created from games and this model could be used for ‘diallers’ too (which plagued the desktop world in the days of dial-up networking). There have been recent warnings about this kind of abuse from security firms.

Abuse Case AC2: Privacy Breach

An application that gains access to locations, contacts and gallery, silently uploading the data in the background to a site owned by the attacker. This is something that has been a clear goal for attackers already. There have been numerous high-profile examples in the past in the mobile world. Celebrities such as Paris Hilton, Miley Cyrus and Lindsay Lohan have all had private pictures, phone numbers and voicemails stolen from devices or networks in clear breach of their privacy. There has been embarrassment for teachers who had their pictures and videos copied by the children in their class and spread around school. The most high-profile case in the UK of a mobile related privacy breach was that of the News of the World's use of voicemail hacking to gain access to private information about Royalty. The Royal editor, Clive Goodman was jailed for four months and the editor, Andy Coulson resigned over this blatant privacy breach. Given the appetite for breaching privacy, users need to be safe in the knowledge that their personal data will not leak in any way.

Abuse Case AC3: Integrity Breach

A widget that replaces the voicemail number with a premium rate number instead? There are number of reasons why an attacker would want to breach the integrity of the device. Simply changing the telephone number of the voicemail that is stored on the device could be enough to make an attacker a lot of money. Users usually have a shortcut key to their voicemail and may not notice for a long time that anything is wrong. A more sinister use could be to plant evidence on a device. Pictures, files and even criminal contacts could potentially be anonymously planted all without the user's consent or knowledge. Proving innocence could suddenly become very difficult. There are also a number of reasons why somebody would want to steal data. The contents of corporate e-mails would be very interesting to a competitor, as would sabotaging data stored in spreadsheets and presentations on the target phone.

Abuse Case AC4: Phishing

Widgets contain web content making it is easy to duplicate and masquerade as something legitimate… perhaps a bank?

In January 2010, Google removed a number of applications from the Android Market which were supposed to be banking applications for a number of different banks worldwide. It is unclear whether these applications were intentional phishing applications. The removal was based on a breach of terms and conditions surrounding copyright. The episode however highlighted the phishing potential. Widgets contain web content, therefore it is very easy to duplicate the look and feel of something that the user trusts and proceed to abuse that trust either by stealing credentials or by manipulating money transfers.

These are of course just examples to consider in relation to how we would manage the policies for device APIs and are of course not exhaustive. Alongside the device-API specific examples above, we still need to consider traditional web threats which pose a significant risk and lots of other types of attack which should be considered in a formal threat model.

Acknowledgements

The editors would like to extend special thanks to Nokia, OMTP BONDI, and PhoneGap for providing the foundation of the working group's requirements discussion.