chromeos_smart_card_connector
chromeos_smart_card_connector copied to clipboard
Permission dialog should be automatically closed and resolved when the managed policy gets updated
trafficstars
Currently, when the managed policy gets updated, it has no influence on the previous requests that are blocked waiting for user decision (i.e. until it presses "Allow" or "Block").
Instead, if the updated managed policy contains values that correspond to the previously attempted permission requests, they should become immediately resolved by the Connector app.
P.S. This issue produces problems mostly when running on the login screen: it may be that the applications will be installed and started before the actual value for the managed policy is received.
Some pointers:
- Documentation regarding the dialog and the "force_allowed_client_app_ids" policy: docs/connector-app-api.md#permissions-for-the-pcsc-api-consumers
- Code that decides whether to show the dialog or use the policy is at //third_party/pcsc-lite/naclport/server_clients_management/src/permissions_checking/checker.js (specifically, see the
check()method). - The actual code that shows the dialog is at user-prompting-checker.js in the same directory.
- The actual code that reads the policy value (via the
chrome.storage.local.get()API) is at managed-registry.js in the same directory. That code already supports listening for the update notifications (see thechrome.storage.onChanged.addListener()call); so the bug is only about this update notification not being delivered to the code that shows the dialog.