Bug 187831 - [macOS] Relax WebKit sandbox to permit proper App Store behavior
Summary: [macOS] Relax WebKit sandbox to permit proper App Store behavior
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-19 17:11 PDT by Brent Fulgham
Modified: 2018-07-20 10:45 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.70 KB, patch)
2018-07-19 17:14 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (1.95 KB, patch)
2018-07-20 10:25 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2018-07-19 17:11:48 PDT
The Mac App Store is unable to perform some gift card redemption tasks on Mojave due to missing sandbox permissions:

1. We need to allow TCC checking in the plugin process so that the user can permit the camera to be activated.
2. We need to allow connections to com.apple.assertiond.processassertionconnection.
3. We need to allow commerce kit preferences to be read in the WebContent process.

This patch adds those permissions.
Comment 1 Brent Fulgham 2018-07-19 17:12:44 PDT
<rdar://problem/42047455>
Comment 2 Brent Fulgham 2018-07-19 17:14:39 PDT
Created attachment 345406 [details]
Patch
Comment 3 Alexey Proskuryakov 2018-07-19 17:52:11 PDT
Comment on attachment 345406 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345406&action=review

> Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:370
> +    (global-name "com.apple.assertiond.processassertionconnection")

Is this part of this particular fix?

> Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:395
> +    (global-name "com.apple.tccd")

Do we want this here, or specifically in com.apple.appstore.CodeRedeemerNetscapePlugin.sb?
Comment 4 Brent Fulgham 2018-07-20 08:50:23 PDT
(In reply to Alexey Proskuryakov from comment #3)
> Comment on attachment 345406 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345406&action=review
> 
> > Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:370
> > +    (global-name "com.apple.assertiond.processassertionconnection")
> 
> Is this part of this particular fix?

Yes -- this was on the advice of the sandboxing team (this is apparently needed for many services).

> > Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:395
> > +    (global-name "com.apple.tccd")
> 
> Do we want this here, or specifically in
> com.apple.appstore.CodeRedeemerNetscapePlugin.sb?

I think making it possible for any plugin to talk to the TCC service is good, since anything that wants to request camera/microphone access needs TCC to give it permission.
Comment 5 Alexey Proskuryakov 2018-07-20 09:48:00 PDT
Comment on attachment 345406 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345406&action=review

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:476
> +        "com.apple.commerce" ;; <rdar://problem/42047455>

Please explain in that radar why this is needed.
Comment 6 Alexey Proskuryakov 2018-07-20 09:49:00 PDT
> I think making it possible for any plugin to talk to the TCC service is good, since anything that wants to request camera/microphone access needs TCC to give it permission.

Is camera/microphone broken in Flash right now? If so, then the fix is much bigger than what its title implies. And if not, then something strange is going on.
Comment 7 Brent Fulgham 2018-07-20 10:20:25 PDT
(In reply to Alexey Proskuryakov from comment #5)
> Comment on attachment 345406 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=345406&action=review
> 
> > Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:476
> > +        "com.apple.commerce" ;; <rdar://problem/42047455>
> 
> Please explain in that radar why this is needed.

I just spoke with the store folks and they don't think this is needed. I'll remove it from the patch.
Comment 8 Brent Fulgham 2018-07-20 10:25:22 PDT
Created attachment 345456 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2018-07-20 10:45:45 PDT
Comment on attachment 345456 [details]
Patch for landing

Clearing flags on attachment: 345456

Committed r234054: <https://trac.webkit.org/changeset/234054>
Comment 10 WebKit Commit Bot 2018-07-20 10:45:47 PDT
All reviewed patches have been landed.  Closing bug.