RESOLVED FIXED 179018
rwt should allow service worker to load localhost HTTPS resources with any certificate
https://bugs.webkit.org/show_bug.cgi?id=179018
Summary rwt should allow service worker to load localhost HTTPS resources with any ce...
youenn fablet
Reported 2017-10-30 09:55:54 PDT
rwt should allow service worker to load localhost HTTPS resources with any certificate
Attachments
Patch (17.39 KB, patch)
2017-10-30 09:59 PDT, youenn fablet
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (1016.12 KB, application/zip)
2017-10-30 11:23 PDT, Build Bot
no flags
Patch (10.07 KB, patch)
2017-10-30 16:44 PDT, youenn fablet
no flags
Archive of layout-test-results from ews122 for ios-simulator-wk2 (1022.80 KB, application/zip)
2017-10-30 18:06 PDT, Build Bot
no flags
Patch (10.35 KB, patch)
2017-10-31 09:30 PDT, youenn fablet
no flags
Tess that can be unskipped for me locally with certificate fix (129.53 KB, patch)
2017-10-31 10:03 PDT, Chris Dumez
no flags
Patch (143.13 KB, patch)
2017-10-31 10:49 PDT, youenn fablet
no flags
Patch (148.39 KB, patch)
2017-10-31 12:53 PDT, youenn fablet
no flags
Patch for landing (147.48 KB, patch)
2017-10-31 13:50 PDT, youenn fablet
no flags
Patch (149.08 KB, patch)
2017-10-31 14:23 PDT, Chris Dumez
no flags
youenn fablet
Comment 1 2017-10-30 09:59:42 PDT
Build Bot
Comment 2 2017-10-30 11:23:40 PDT
Comment on attachment 325358 [details] Patch Attachment 325358 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5041249 New failing tests: http/tests/workers/service/service-worker-fetch.https.html
Build Bot
Comment 3 2017-10-30 11:23:41 PDT
Created attachment 325361 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Chris Dumez
Comment 4 2017-10-30 13:31:55 PDT
Comment on attachment 325358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325358&action=review > Source/WebKit/UIProcess/WebProcessPool.cpp:1394 > +#if ENABLE(SERVICE_WORKERS) ah ah ah You have an extra S at the end of WORKER so this code does nothing :D
Chris Dumez
Comment 5 2017-10-30 13:32:29 PDT
Comment on attachment 325358 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325358&action=review >> Source/WebKit/UIProcess/WebProcessPool.cpp:1394 >> +#if ENABLE(SERVICE_WORKERS) > > ah ah ah You have an extra S at the end of WORKER so this code does nothing :D I made the same mistake twice already!
Alex Christensen
Comment 6 2017-10-30 14:54:04 PDT
Comment on attachment 325358 [details] Patch Please don't add this or anything like it to WKContext/WKProcessPool. Just respond to the challenge. We're also trying to remove the step of canAuthenticateAgainstProtectionSpace. This would be a strange step in the wrong direction.
Chris Dumez
Comment 7 2017-10-30 14:56:50 PDT
(In reply to Alex Christensen from comment #6) > Comment on attachment 325358 [details] > Patch > > Please don't add this or anything like it to WKContext/WKProcessPool. Just > respond to the challenge. > We're also trying to remove the step of > canAuthenticateAgainstProtectionSpace. This would be a strange step in the > wrong direction. Challenge is per page, no? A ServiceWorker is not associated with a page.
Alex Christensen
Comment 8 2017-10-30 15:29:18 PDT
A delegate should probably be per-WebsiteDataStore
youenn fablet
Comment 9 2017-10-30 16:44:35 PDT
Build Bot
Comment 10 2017-10-30 18:06:17 PDT
Comment on attachment 325388 [details] Patch Attachment 325388 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/5044523 New failing tests: http/tests/workers/service/service-worker-fetch.https.html
Build Bot
Comment 11 2017-10-30 18:06:19 PDT
Created attachment 325395 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Chris Dumez
Comment 12 2017-10-31 09:25:18 PDT
Comment on attachment 325388 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325388&action=review > Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:61 > + challenge->useCredential(nullptr); Here is what WKTR is doing in this case: if (WKProtectionSpaceGetAuthenticationScheme(protectionSpace) == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) { // Any non-empty credential signals to accept the server trust. Since the cross-platform API // doesn't expose a way to create a credential from server trust, we use a password credential. WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone)); WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get()); return; } I believe the parameter should not be nullptr. You need to construct credentials as WKTR does.
youenn fablet
Comment 13 2017-10-31 09:30:11 PDT
Chris Dumez
Comment 14 2017-10-31 09:38:54 PDT
Comment on attachment 325451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325451&action=review > Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:69 > + ASSERT_NOT_REACHED(); I don't think it is a valid assertion. What prevents regular HTTP authentication to happen in a service worker? Also, I think we should deal with the challenge either way (either cancel or probably better, do the default behavior).
Chris Dumez
Comment 15 2017-10-31 10:03:16 PDT
Created attachment 325455 [details] Tess that can be unskipped for me locally with certificate fix
youenn fablet
Comment 16 2017-10-31 10:10:35 PDT
Comment on attachment 325451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325451&action=review >> Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:69 >> + ASSERT_NOT_REACHED(); > > I don't think it is a valid assertion. What prevents regular HTTP authentication to happen in a service worker? > Also, I think we should deal with the challenge either way (either cancel or probably better, do the default behavior). I will replace it with notImplemented so that it is clear that things are missing here and that we should really delegate this to the app.
youenn fablet
Comment 17 2017-10-31 10:49:42 PDT
youenn fablet
Comment 18 2017-10-31 12:53:31 PDT
Chris Dumez
Comment 19 2017-10-31 13:40:54 PDT
Comment on attachment 325474 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325474&action=review r=me > LayoutTests/TestExpectations:140 > webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ] Will likely need rebaselining now that this was fixed.
youenn fablet
Comment 20 2017-10-31 13:42:03 PDT
> > LayoutTests/TestExpectations:140 > > webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ] > > Will likely need rebaselining now that this was fixed. Let's follow up once it is landed.
WebKit Commit Bot
Comment 21 2017-10-31 13:42:48 PDT
Comment on attachment 325474 [details] Patch Rejecting attachment 325474 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 325474, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: eb-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Chris Dumez']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/5054351
Chris Dumez
Comment 22 2017-10-31 13:42:48 PDT
(In reply to youenn fablet from comment #20) > > > LayoutTests/TestExpectations:140 > > > webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ] > > > > Will likely need rebaselining now that this was fixed. > > Let's follow up once it is landed. My point is that it will likely conflict and not land. But let's see if you're lucky.
Chris Dumez
Comment 23 2017-10-31 13:43:02 PDT
(In reply to Chris Dumez from comment #22) > (In reply to youenn fablet from comment #20) > > > > LayoutTests/TestExpectations:140 > > > > webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ] > > > > > > Will likely need rebaselining now that this was fixed. > > > > Let's follow up once it is landed. > > My point is that it will likely conflict and not land. But let's see if > you're lucky. Well, surprise :D
youenn fablet
Comment 24 2017-10-31 13:50:35 PDT
Created attachment 325485 [details] Patch for landing
Chris Dumez
Comment 25 2017-10-31 13:58:28 PDT
Comment on attachment 325485 [details] Patch for landing You did not unskip the tests under imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/ :(
Chris Dumez
Comment 26 2017-10-31 14:23:07 PDT
WebKit Commit Bot
Comment 27 2017-10-31 15:11:52 PDT
Comment on attachment 325495 [details] Patch Clearing flags on attachment: 325495 Committed r224250: <https://trac.webkit.org/changeset/224250>
WebKit Commit Bot
Comment 28 2017-10-31 15:11:54 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 29 2017-11-15 12:36:20 PST
Note You need to log in before you can comment on or make changes to this bug.