Bug 159071 - Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly to UIProcess
Summary: Send canAuthenticateAgainstProtectionSpace calls from NetworkProcess directly...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 14:50 PDT by Alex Christensen
Modified: 2016-07-06 17:39 PDT (History)
5 users (show)

See Also:


Attachments
Patch (62.35 KB, patch)
2016-06-23 17:02 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (62.60 KB, patch)
2016-06-23 17:12 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (62.64 KB, patch)
2016-06-23 17:33 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (1.00 MB, application/zip)
2016-06-23 18:22 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (974.23 KB, application/zip)
2016-06-23 18:22 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-yosemite (1.65 MB, application/zip)
2016-06-23 18:42 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews124 for ios-simulator-wk2 (1.82 MB, application/zip)
2016-06-23 21:37 PDT, Build Bot
no flags Details
Patch (39.83 KB, patch)
2016-06-24 15:18 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (39.78 KB, patch)
2016-06-24 15:34 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (800.03 KB, application/zip)
2016-06-24 16:21 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (924.86 KB, application/zip)
2016-06-24 16:26 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (654.61 KB, application/zip)
2016-06-24 16:31 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.42 MB, application/zip)
2016-06-24 16:32 PDT, Build Bot
no flags Details
Patch (45.22 KB, patch)
2016-06-27 13:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (45.18 KB, patch)
2016-06-27 13:30 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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