KBU2
Android Expert
App/Extension Permission Messages Model
State of App Permissions in Chrome
Currently, permission messages for apps are displayed in four places in Chrome:
The App Info dialog also displays a list of files the app has access to and allows the user to revoke access to these files. Soon, it will also soon be possible to revoke access to USB devices from this list, and later other permissions such as oauth certificates. However, there is currently no way to revoke optional permissions.
We want to allow a way for users to revoke optional permissions from outside the app (for now, from the App Info dialog), but this is not currently possible given the state of our permission messages system. Permissions and their messages have been added haphazardly over time as the Chrome apps platform has grown, but no model has been put in place to prevent ambiguities from arising or to enforce permissions to follow a consistent design.
Although we don’t currently have an ‘ideal’ permissions system we want to work towards, this work aims to place an important foundation that prevents apps from forming permission messages that are unrevocable. This will at least allow us to safely implement revocation of optional permissions, and hopefully prevent more serious problems from arising in the future.
Goal
We want to allow an app’s optional permission messages to be individually revocable. A simple way to achieve this would be to have one message per permission, but we want to separate the concept of a ‘permission’ (at a system level) from a ‘message’ (user level) to allow messages to be meaningful and comprehensible. Our goal is to create messages that describe exactly what access an app has, in a way that is meaningful and comprehensible to a user, and still allow granular revocation.
There are 3 main goals of our permission system:
Example of bad permission messages
This app can:
Example of good permission messages
This app can:
Current model
There are three rules being used to generate permission messages:
but some permissions have no messages
e.g. sessions → (no message)
but these messages may not necessarily have messages on their own
e.g. sessions → (no message)
Problems with the current model
However, if tabs is granted first, the first prompt says Read your browsing history and the second prompt says Read your browsing history on all your signed-in devices.
In this case, the first flow has two prompts while the second has only one, even though they are for granting the same permissions.
This makes for a confusing experience - the user rejected the permission request but the app still retained part of that permission.
This is an inconsistent user experience - if a user revokes a permission, only that permission message should change, and not others.
Proposed model
To fix these issues, we propose the following model for representing permissions.
This avoids the problem we have currently, which is that permissions can only be revoked once they ‘appear’ in a message (and this only happens when other permissions are present).
Components
The model contains the following components:
By default, all permissions with a message have at least one coalescing rule, which maps the permission to its own message (and has the lowest precedence).
Examples
Example 1: ‘background’ permissions
The permissions are:
The rules are, in order of precedence:
Permissions (• Required ◦ Optional)
Messages
Required permissions
New optional permission
Prompt
Example 2: history and tabs permissions
The permissions are:
The rules are, in order of precedence:
Permissions (• Required ◦ Optional)
Messages
Required permissions
New optional permission
Prompt
Future Work
Subset/Superset Permissions
Some permissions have messages that make them direct subsets/supersets of eachother. For example, the tabs permission has the message Can read your browsing history and the history permission has the message Can read and change your browsing history, so the tabs permission message is a subset of history. Under the new model, it’s straightforward to add a coalescing rule that combines history and tabs into the single message. However, coalescing does not happen across the required/optional boundary, so both messages still appear if one is optional and one is required (as seen in Example (2)).
To fix this, we could consider adding ‘subsumption rules’. This would only apply in the special case where a superset permission is required, and a subset permission is optional. Here, the optional permission would be granted for free (no prompt) and would not appear in the list of optional permissions (it would be ‘hidden’). For example, if history is a required permission and tabs is optional, the message Can read and change your browsing history would appear in the required section and nothing would appear in the optional section (since the user has already given enough approval for the app to have the tabs permission).
We can actually already handle the reverse case, where the subset permission is required and the superset is optional (likely the more common case). Using the ‘affected permissions’ component, we can ensure that both messages appear on the prompt when the optional permission is requested. For example, if tabs is a required permission, when history is requested, the prompt would ask if the app can Read and change your browsing history and say at the bottom “Be aware the app can:” Read your browsing history. Then, if the user rejects this prompt, it would be clear that they are only revoking the changes between the two messages (since the one at the bottom is clearly not part of the request). Similarly, on the revocation screen, both permissions would be listed in their separate sections, so it is clear that revoking the one in the optional section would leave the other in the required section.
Other Permissions in Chrome
Chrome has other permissions systems, including website permissions (allowing websites to access your camera, location, etc) which can be accessed from the Page Info dialog (clicking the lock icon in the omnibox). Although inventing a perfect system to represent permissions is difficult, perhaps some of the principles from this design can be applied to other permission systems in Chrome, to prevent the same problems from occurring. As long as a model is in place from the start that prevents haphazardly-added permissions from causing the same problems as we have currently, developers can continue to add new permissions without breaking the revocation model.
State of App Permissions in Chrome
Currently, permission messages for apps are displayed in four places in Chrome:
- At install time, where the user is asked to accept the required permissions before installing the app, or when re-enabling the app after it’s been disabled
- When an app has been updated and disabled automatically since it requests additional permissions, and the user is asked to accept all of the apps permissions in its new state to re-enable the app
- When optional permissions are requested, asking the user to accept/deny the new permission
- If denied, the app can re-ask the user for the permission at any time
- If accepted, the permission is permanently accepted (unless revoked elsewhere)
- If denied, the app can re-ask the user for the permission at any time
- In the App Info dialog, which can be accessed by right-clicking on an app in the App List and selecting ‘App Info’
The App Info dialog also displays a list of files the app has access to and allows the user to revoke access to these files. Soon, it will also soon be possible to revoke access to USB devices from this list, and later other permissions such as oauth certificates. However, there is currently no way to revoke optional permissions.
We want to allow a way for users to revoke optional permissions from outside the app (for now, from the App Info dialog), but this is not currently possible given the state of our permission messages system. Permissions and their messages have been added haphazardly over time as the Chrome apps platform has grown, but no model has been put in place to prevent ambiguities from arising or to enforce permissions to follow a consistent design.
Although we don’t currently have an ‘ideal’ permissions system we want to work towards, this work aims to place an important foundation that prevents apps from forming permission messages that are unrevocable. This will at least allow us to safely implement revocation of optional permissions, and hopefully prevent more serious problems from arising in the future.
Goal
We want to allow an app’s optional permission messages to be individually revocable. A simple way to achieve this would be to have one message per permission, but we want to separate the concept of a ‘permission’ (at a system level) from a ‘message’ (user level) to allow messages to be meaningful and comprehensible. Our goal is to create messages that describe exactly what access an app has, in a way that is meaningful and comprehensible to a user, and still allow granular revocation.
There are 3 main goals of our permission system:
- Allow users to distinguish between required (install-time) and optional (requested at run-time) permissions
- Display permissions in a clear and comprehensible way
- Allow revocation of optional permissions at a level that makes sense to users
Example of bad permission messages
This app can:
- Access your camera
- Can run in the background
- Can read files you select
- Can write to files you select
- Can access all your devices
Example of good permission messages
This app can:
- Read and write to files you select
- Access your USB, Bluetooth and Serial devices
- Perform any of the above across all your signed-in devices
Current model
There are three rules being used to generate permission messages:
- A permission can be assigned a single message
but some permissions have no messages
e.g. sessions → (no message)
- If an app has a group of specific permissions, those messages merge (‘coalesce’) into a single message
but these messages may not necessarily have messages on their own
e.g. sessions → (no message)
- If an app has one permission and another one of lower precedence, only display the message for the one of higher precedence
Problems with the current model
- If two permissions (at least one of which is optional) are granted in a certain order, the number of prompts they receive may be different.
However, if tabs is granted first, the first prompt says Read your browsing history and the second prompt says Read your browsing history on all your signed-in devices.
In this case, the first flow has two prompts while the second has only one, even though they are for granting the same permissions.
- New permission messages can be modified by existing permissions, which means a user may be prompted with a permission message that has been combined with an existing one. Even if they reject it, the app still has all other permissions that made up the message, even if they are optional.
This makes for a confusing experience - the user rejected the permission request but the app still retained part of that permission.
- Since there is no single model for representing the way permissions are coalesced, it is difficult to determine which permissions contribute to a final permission message. This makes individual revocation almost impossible, since there is no easy way to ‘go back’ from a message to find its component permissions.
- Since some permissions can ‘modify’ other permissions, when revoking a message, it is ambiguous whether a permission should be revoked if it appears in more than one message.
This is an inconsistent user experience - if a user revokes a permission, only that permission message should change, and not others.
- When a ‘modifier’ permission (such as background) appears in the list of optional permissions, it may modify the messages of some required permissions. It is ambiguous as to whether to display the combined message if both of these permissions are present but some are required and some are optional.
Proposed model
To fix these issues, we propose the following model for representing permissions.
- Related permissions can be coalesced into a single message. For example, the message Access your USB and Bluetooth devices contains both the usb and bluetooth permissions. This allows for comprehensible permission messages that satisfy goal (2) of our system.
- Required and optional permissions cannot be coalesced together. Coalescing of messages only happens within each set of permissions, but not across the boundary. This satisfies goal (1).
- If a permission message can be coalesced with certain other permissions, it must have its own message when these other permissions are absent.
This avoids the problem we have currently, which is that permissions can only be revoked once they ‘appear’ in a message (and this only happens when other permissions are present).
- A permission can only appear in at most one permission message. This means that, when revoking a permission message, it is never ambiguous which permissions to revoke, and revoking one permission message will not affect any other messages.
- When an optional permission message is revoked, all permissions that contributed to that message are revoked. Due to rule (4), no other permission messages are affected by this revocation.
- A permission may display a different message if another permission is present, but still only represent the one permission. For example, the background permission may appear as Can run in the background when no other relevant permissions are present; but if you have the camera permission, background can then appear at the bottom of the list as Can perform any of the above in the background.
- When displaying a confirmation prompt for a new permission, also display any other permissions that may affect the user’s decision. For example, when requesting the background permission, if the user already has the camera permission, add a note at the bottom of the prompt to say Be aware that you have already granted the following permissions, where it would list Can access your camera. Similarly, if this occurred in the other order (the user already had the camera permission and was now requesting background), the note at the bottom of the prompt would say Can perform any of the above in the background.
Components
The model contains the following components:
- Coalescing rules - these are rules that map from a set of permissions to a single message. If all of the permissions in the rule exist, the given message is displayed.
By default, all permissions with a message have at least one coalescing rule, which maps the permission to its own message (and has the lowest precedence).
- Affected permissions - these are rules that state which other permissions could be affected by a given permission. If at least one of the ‘affected’ permissions is present, the ‘affectee’ permission may display a different message. These permissions may also appear on the permissions confirmation prompt.
Examples
Example 1: ‘background’ permissions
The permissions are:
- camera - gives access to your camera
- mic - gives access to your mic
- background - lets the app run in the background
The rules are, in order of precedence:
- Affected permission: background, camera or mic, Can perform any of the above in the background
- Coalescing rule: background, Can run in the background
- Coalescing rule: camera, Can access your camera
- Coalescing rule: mic, Can access your mic
Permissions (• Required ◦ Optional)
Messages
- background
- Can run in the background
- background
- otherpermission
- Can run in the background
- Other permission message
- camera
- background
- Can access your camera
- Can perform any of the above in the background
- camera
- mic
- background
- Can access your camera
- Can access your mic
- Can perform any of the above in the background
Required permissions
New optional permission
Prompt
- background
- otherpermission
- camera
- Access your camera
- Perform any of the above in the background
- camera
- otherpermission
- background
- Run in the background
- Access your camera
Example 2: history and tabs permissions
The permissions are:
- tabs - gives read access to your history
- history - gives read-write access to your history
- sessions - lets you access browser sessions across devices
The rules are, in order of precedence:
- Affected permission: sessions, tabs or history, Can perform any of the above on all your signed-in devices
- Coalescing rule: history and tabs, Can read and change your browsing history
- Coalescing rule: history, Can read and change your browsing history
- Coalescing rule: tabs, Can read your browsing history
- Coalescing rule: sessions, Can access your data across all your signed-in devices
Permissions (• Required ◦ Optional)
Messages
- tabs
- Can read your browsing history
- tabs
- history
- Can read and change your browsing history
- tabs
- sessions
- Can read your browsing history
- Can perform any of the above on all your signed-in devices
- tabs
- history
- sessions
- Can read and change your browsing history
- Can perform any of the above on all your signed-in devices
- history
- tabs
- sessions
- Can read and change your browsing history
- Can read your browsing history
- Can perform any of the above on all your signed-in devices
Required permissions
New optional permission
Prompt
- tabs
- history
- sessions
- Run across all your signed-in devices
- Read and change your browsing history
- sessions
- tabs
- Read your browsing history
- Perform any of the above across all your signed-in devices
- tabs
- history
- Read and change your browsing history
- Read your browsing history
- tabs
- sessions
- history
- Read and change your browsing history
- Read your browsing history
- Perform any of the above across all your signed-in devices
Future Work
Subset/Superset Permissions
Some permissions have messages that make them direct subsets/supersets of eachother. For example, the tabs permission has the message Can read your browsing history and the history permission has the message Can read and change your browsing history, so the tabs permission message is a subset of history. Under the new model, it’s straightforward to add a coalescing rule that combines history and tabs into the single message. However, coalescing does not happen across the required/optional boundary, so both messages still appear if one is optional and one is required (as seen in Example (2)).
To fix this, we could consider adding ‘subsumption rules’. This would only apply in the special case where a superset permission is required, and a subset permission is optional. Here, the optional permission would be granted for free (no prompt) and would not appear in the list of optional permissions (it would be ‘hidden’). For example, if history is a required permission and tabs is optional, the message Can read and change your browsing history would appear in the required section and nothing would appear in the optional section (since the user has already given enough approval for the app to have the tabs permission).
We can actually already handle the reverse case, where the subset permission is required and the superset is optional (likely the more common case). Using the ‘affected permissions’ component, we can ensure that both messages appear on the prompt when the optional permission is requested. For example, if tabs is a required permission, when history is requested, the prompt would ask if the app can Read and change your browsing history and say at the bottom “Be aware the app can:” Read your browsing history. Then, if the user rejects this prompt, it would be clear that they are only revoking the changes between the two messages (since the one at the bottom is clearly not part of the request). Similarly, on the revocation screen, both permissions would be listed in their separate sections, so it is clear that revoking the one in the optional section would leave the other in the required section.
Other Permissions in Chrome
Chrome has other permissions systems, including website permissions (allowing websites to access your camera, location, etc) which can be accessed from the Page Info dialog (clicking the lock icon in the omnibox). Although inventing a perfect system to represent permissions is difficult, perhaps some of the principles from this design can be applied to other permission systems in Chrome, to prevent the same problems from occurring. As long as a model is in place from the start that prevents haphazardly-added permissions from causing the same problems as we have currently, developers can continue to add new permissions without breaking the revocation model.