Bug 159071

Summary: Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, beidson, buildbot, commit-queue, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews107 for mac-yosemite-wk2
none
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews113 for mac-yosemite
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Patch
none
Patch
none
Archive of layout-test-results from ews102 for mac-yosemite
none
Archive of layout-test-results from ews106 for mac-yosemite-wk2
none
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
Archive of layout-test-results from ews114 for mac-yosemite
none
Patch
none
Patch none

Description Alex Christensen 2016-06-23 14:50:35 PDT
Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
Comment 1 Alex Christensen 2016-06-23 17:02:36 PDT
Created attachment 281943 [details]
Patch
Comment 2 Alex Christensen 2016-06-23 17:12:39 PDT
Created attachment 281944 [details]
Patch
Comment 3 Alex Christensen 2016-06-23 17:33:59 PDT
Created attachment 281945 [details]
Patch
Comment 4 Build Bot 2016-06-23 18:22:09 PDT
Comment on attachment 281945 [details]
Patch

Attachment 281945 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1558030

New failing tests:
http/tests/xmlhttprequest/basic-auth-responseURL.html
http/tests/xmlhttprequest/cross-origin-no-authorization.html
http/tests/xmlhttprequest/basic-auth-credentials-escaping.html
http/tests/media/video-auth.html
http/tests/xmlhttprequest/basic-auth-default.html
http/tests/security/credentials-in-referer.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html
http/tests/xmlhttprequest/re-login.html
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
http/tests/xmlhttprequest/basic-auth.html
http/tests/xmlhttprequest/logout.html
http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
http/tests/xmlhttprequest/redirect-credentials-responseURL.html
http/tests/xmlhttprequest/failed-auth.html
http/tests/xmlhttprequest/re-login-async.html
http/tests/xmlhttprequest/basic-auth-nouser.html
http/tests/xmlhttprequest/remember-bad-password.html
http/tests/ssl/iframe-upgrade.https.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
http/tests/xmlhttprequest/cross-origin-authorization.html
Comment 5 Build Bot 2016-06-23 18:22:12 PDT
Created attachment 281950 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-06-23 18:22:41 PDT
Comment on attachment 281945 [details]
Patch

Attachment 281945 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1558009

New failing tests:
http/tests/security/mixedcontent-geolocation-block-insecure-content.html
http/tests/cache/history-navigation-no-resource-revalidation.html
http/tests/xmlhttprequest/logout.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https.html
http/tests/xmlhttprequest/cross-origin-no-credential-prompt.html
http/tests/xmlhttprequest/sync-delegate-callbacks.html
http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html
http/tests/misc/dns-prefetch-control.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https.html
http/tests/xmlhttprequest/access-control-preflight-credential-sync.html
http/tests/xmlhttprequest/cross-origin-no-authorization.html
http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
http/tests/misc/webtiming-ssl.php
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html
http/tests/appcache/different-https-origin-resource-main.html
http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html
http/tests/xmlhttprequest/access-control-preflight-credential-async.html
Comment 7 Build Bot 2016-06-23 18:22:44 PDT
Created attachment 281951 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 8 Build Bot 2016-06-23 18:42:05 PDT
Comment on attachment 281945 [details]
Patch

Attachment 281945 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1558039

New failing tests:
http/tests/security/mixedcontent-geolocation-block-insecure-content.html
http/tests/cache/history-navigation-no-resource-revalidation.html
http/tests/xmlhttprequest/logout.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/form-upgrade.html
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https.html
http/tests/xmlhttprequest/cross-origin-no-credential-prompt.html
http/tests/xmlhttprequest/sync-delegate-callbacks.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html
http/tests/misc/dns-prefetch-control.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https.html
http/tests/xmlhttprequest/access-control-preflight-credential-sync.html
http/tests/xmlhttprequest/cross-origin-no-authorization.html
http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
http/tests/misc/webtiming-ssl.php
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html
http/tests/appcache/different-https-origin-resource-main.html
http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html
http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html
http/tests/xmlhttprequest/access-control-preflight-credential-async.html
Comment 9 Build Bot 2016-06-23 18:42:07 PDT
Created attachment 281952 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 10 Brady Eidson 2016-06-23 19:08:18 PDT
Comment on attachment 281945 [details]
Patch

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

Test's are still a mess, but this seems fine once you clean all that up.

> Source/WebKit2/NetworkProcess/NetworkProcess.h:26
> -#ifndef NetworkProcess_h
> -#define NetworkProcess_h
> +#pragma once

I'm a sucker for pragma once'ing

> Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:207
> +    // WebKit2 asks the UIProcess directly instead of going through the ResourceLoader in the WebProcess.

Maybe "The WebKit 2 Networking process asks the UIProcess directly, so the WebContent process should never receive this callback."
Comment 11 Alexey Proskuryakov 2016-06-23 19:24:55 PDT
Does bundle client need these?
Comment 12 Alex Christensen 2016-06-23 19:33:34 PDT
(In reply to comment #11)
> Does bundle client need these?

The InjectedBundleClient?  I don't think so.

I think we might have some inconsistent calling of canAuthenticateAgainstProtectionSpace.  The tests might become flaky once we record these calls.  I'll look into it more.
Comment 13 Build Bot 2016-06-23 21:37:39 PDT
Comment on attachment 281945 [details]
Patch

Attachment 281945 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1558888

New failing tests:
http/tests/xmlhttprequest/basic-auth-responseURL.html
http/tests/xmlhttprequest/basic-auth-credentials-escaping.html
http/tests/security/credentials-in-referer.html
http/tests/xmlhttprequest/basic-auth-default.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-audio-video-in-main-frame.html
http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
http/tests/navigation/https-in-page-cache.html
http/tests/xmlhttprequest/re-login-async.html
http/tests/xmlhttprequest/re-login.html
http/tests/xmlhttprequest/logout.html
http/tests/xmlhttprequest/redirect-credentials-responseURL.html
http/tests/xmlhttprequest/failed-auth.html
imported/w3c/web-platform-tests/fetch/api/credentials/authentication-basic.html
http/tests/xmlhttprequest/basic-auth-nouser.html
http/tests/xmlhttprequest/remember-bad-password.html
http/tests/xmlhttprequest/basic-auth.html
Comment 14 Build Bot 2016-06-23 21:37:42 PDT
Created attachment 281957 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 15 Alex Christensen 2016-06-24 00:51:22 PDT
Yep, the canAuthenticateAgainstProtectionSpace callback logging is wildly flaky, but needed in this case.  I'm going to add a testRunner function to enable the logging of canAuthenticateAgainstProtectionSpace callbacks just for the new test.
Comment 16 Alex Christensen 2016-06-24 15:18:46 PDT
Created attachment 282019 [details]
Patch
Comment 17 Alex Christensen 2016-06-24 15:34:43 PDT
Created attachment 282020 [details]
Patch
Comment 18 Build Bot 2016-06-24 16:21:10 PDT
Comment on attachment 282020 [details]
Patch

Attachment 282020 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1564682

New failing tests:
http/tests/xmlhttprequest/sync-delegate-callbacks.html
Comment 19 Build Bot 2016-06-24 16:21:13 PDT
Created attachment 282025 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 20 Build Bot 2016-06-24 16:26:07 PDT
Comment on attachment 282020 [details]
Patch

Attachment 282020 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1564691

New failing tests:
http/tests/xmlhttprequest/sync-delegate-callbacks.html
Comment 21 Build Bot 2016-06-24 16:26:10 PDT
Created attachment 282026 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 22 Build Bot 2016-06-24 16:31:34 PDT
Comment on attachment 282020 [details]
Patch

Attachment 282020 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1564694

New failing tests:
http/tests/xmlhttprequest/sync-delegate-callbacks.html
Comment 23 Build Bot 2016-06-24 16:31:38 PDT
Created attachment 282027 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 24 Build Bot 2016-06-24 16:32:19 PDT
Comment on attachment 282020 [details]
Patch

Attachment 282020 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1564692

New failing tests:
http/tests/xmlhttprequest/sync-delegate-callbacks.html
Comment 25 Build Bot 2016-06-24 16:32:22 PDT
Created attachment 282029 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 26 Alex Christensen 2016-06-27 13:17:23 PDT
Created attachment 282161 [details]
Patch
Comment 27 Alex Christensen 2016-06-27 13:30:47 PDT
Created attachment 282163 [details]
Patch
Comment 28 WebKit Commit Bot 2016-06-27 13:59:46 PDT
Comment on attachment 282163 [details]
Patch

Clearing flags on attachment: 282163

Committed r202511: <http://trac.webkit.org/changeset/202511>
Comment 29 WebKit Commit Bot 2016-06-27 13:59:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 30 Alex Christensen 2016-06-27 17:36:41 PDT
Tests reverted in https://trac.webkit.org/changeset/202525
I need to find a different way to test this.  Current thoughts are:
1. Asynchronously reset the NSURLSessions between tests.  All the other resetting state is synchronous, but that might not be necessary.
2. Run this test in a process that is guaranteed to be the first test that process has used so there are no cached https connections.
Comment 31 Alex Christensen 2016-07-06 17:39:30 PDT
rdar://problem/26788138