Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Issue 1844053003: CREDENTIAL: Rework the integration with Fetch (1/2) (Closed)

Created:
4 years, 8 months ago by Mike West
Modified:
4 years, 8 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-bindings_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, nhiroki, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CREDENTIAL: Introduce an "attached credential" to requests. The spec has been updated after some discussion with Mozilla about the interaction between PasswordCredential objects and Service Workers. Details are at [1], the TL;DR is that we'll now pass PasswordCredential objects in as the RequestInit dictionary 'credentials' member. This will produce a Request object whose visible 'credentials' attribute is 'password', and which carries a hidden PasswordCredential around for serialization when we hit the network. The current patch does the first part of the work, refactoring the integration between modules/credentialmanager and modules/fetch. It stops when the WebURLRequest is handed over to //content for processing. Currently, this means that the credentials are visible in the Request body that's presented to Service Workers. This isn't where we want to end up, but it maintains the status quo while presenting developers with the new interface, so it seems like a good place for this first patch to stop. [1]: https://w3c.github.io/webappsec-credential-management/#fetch-integration BUG=599597 Committed: https://crrev.com/5dc4a153d1ddc9b7083427fe2705cd1199795038 Cr-Commit-Position: refs/heads/master@{#385390}

Patch Set 1 #

Total comments: 6

Patch Set 2 : horo@ #

Total comments: 4

Patch Set 3 : Rebase. #

Patch Set 4 : ? #

Total comments: 4

Patch Set 5 : EncodedFormData #

Patch Set 6 : debug #

Patch Set 7 : PHP #

Total comments: 8

Patch Set 8 : clear attachedcredentials #

Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -65 lines) Patch
M content/child/web_url_request_util.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_types.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html View 1 2 3 4 5 6 7 9 chunks +88 lines, -19 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-redirect.html View 1 2 3 6 1 chunk +35 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/redirect-to-echo-post.php View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/DictionaryHelperForModules.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Body.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Body.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/FetchManager.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/FetchRequestData.h View 1 2 3 4 5 6 7 5 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp View 1 2 3 4 5 6 7 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Request.h View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Request.cpp View 1 2 3 4 5 chunks +24 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/RequestInit.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/RequestInit.cpp View 1 2 3 4 6 chunks +23 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebURLRequest.cpp View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.cpp View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebURLRequest.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 31 (8 generated)
Mike West
Hello, horo@, philipj@, and tyoshino@! Y'all had excellent comments on https://codereview.chromium.org/1446963002 way back when. I ...
4 years, 8 months ago (2016-03-31 19:45:38 UTC) #2
Mike West
Second piece up at https://codereview.chromium.org/1847383003/#ps1.
4 years, 8 months ago (2016-04-01 11:49:01 UTC) #3
Mike West
jochen@: Can you stamp the //content changes? They're small (3 fairly uninteresting lines).
4 years, 8 months ago (2016-04-01 12:28:01 UTC) #6
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-01 12:42:46 UTC) #7
horo
https://codereview.chromium.org/1844053003/diff/1/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/1/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode39 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:39: Please test req.clone(). var c = new PasswordCredential({ id: ...
4 years, 8 months ago (2016-04-04 05:26:00 UTC) #8
Mike West
Thank you! I think this patchset addresses your concerns. https://codereview.chromium.org/1844053003/diff/1/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/1/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode39 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:39: ...
4 years, 8 months ago (2016-04-04 08:04:20 UTC) #9
horo
https://codereview.chromium.org/1844053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode20 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:20: clone.text().then(t => assert_equals(t, "")); You have to return the ...
4 years, 8 months ago (2016-04-04 08:54:04 UTC) #10
Mike West
https://codereview.chromium.org/1844053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode20 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:20: clone.text().then(t => assert_equals(t, "")); On 2016/04/04 at 08:54:04, horo ...
4 years, 8 months ago (2016-04-04 10:12:12 UTC) #12
Mike West
On 2016/04/04 at 10:12:12, Mike West (OOO through 31st) wrote: > https://codereview.chromium.org/1844053003/diff/20001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html > File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html ...
4 years, 8 months ago (2016-04-04 12:59:04 UTC) #13
horo
https://codereview.chromium.org/1844053003/diff/80001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/80001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode44 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:44: fetch(clone) You have to return the promise. Line 44 ...
4 years, 8 months ago (2016-04-04 14:13:04 UTC) #14
Mike West
On 2016/04/04 at 14:13:04, horo wrote: > https://codereview.chromium.org/1844053003/diff/80001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html > File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): > > https://codereview.chromium.org/1844053003/diff/80001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode44 ...
4 years, 8 months ago (2016-04-05 04:16:09 UTC) #15
horo
What should happen when credentials is overridden? var c = new PasswordCredential({id: 'id', password: 'pass'}); ...
4 years, 8 months ago (2016-04-05 07:24:36 UTC) #16
horo
+yhirano@ as a Stream master :)
4 years, 8 months ago (2016-04-05 07:25:41 UTC) #18
Mike West
Thank you, horo@. This is a lot more complicated than I thought, and I appreciate ...
4 years, 8 months ago (2016-04-05 10:20:56 UTC) #19
Mike West
On 2016/04/05 at 04:16:09, Mike West (OOO through 31st) wrote: > Does the patch look ...
4 years, 8 months ago (2016-04-05 13:03:20 UTC) #20
horo
https://codereview.chromium.org/1844053003/diff/140001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/140001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode19 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:19: r.text().then(t => assert_equals(t, "")); Line 19 20 must be: ...
4 years, 8 months ago (2016-04-06 03:39:48 UTC) #21
Mike West
Thanks! https://codereview.chromium.org/1844053003/diff/140001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html File third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html (right): https://codereview.chromium.org/1844053003/diff/140001/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html#newcode19 third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html:19: r.text().then(t => assert_equals(t, "")); On 2016/04/06 at 03:39:48, ...
4 years, 8 months ago (2016-04-06 05:43:13 UTC) #22
horo
lgtm
4 years, 8 months ago (2016-04-06 06:17:47 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1844053003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1844053003/160001
4 years, 8 months ago (2016-04-06 06:54:53 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 8 months ago (2016-04-06 07:07:55 UTC) #27
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/5dc4a153d1ddc9b7083427fe2705cd1199795038 Cr-Commit-Position: refs/heads/master@{#385390}
4 years, 8 months ago (2016-04-06 07:09:00 UTC) #29
tyoshino (SeeGerritForStatus)
I'll try to take a look this and the 2/2 tomorrow. Sorry for delay.
4 years, 8 months ago (2016-04-07 15:09:55 UTC) #30
tyoshino (SeeGerritForStatus)
4 years, 8 months ago (2016-04-12 16:25:28 UTC) #31
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698