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.
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:
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:
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.
What is the correct granularity of security decisions presented to user? Perhaps this should be stated in policy. What is the linkage to application logic?
This issue is whether the user is presented with a single security decision that covers multiple operations, or independent prompts for individual operations. Blanket authorization for an application to use multiple APIs, as often as required, eliminates run-time prompts but also may leave the user without the context required to make a meaningful security decision. Also, a user may not be prepared to give blanket approval for a certain operation but may instead wish to give permission in specific circumstances only.
Different permission granularities have advantages for different use cases so the requirement might be to support different granularities for different cases.
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.
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.
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.
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.
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.
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.