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

Issue 2456053004: Validate origins when generating subdomain tokens (Closed)

Created:
4 years, 1 month ago by chasej
Modified:
3 years, 12 months ago
CC:
chromium-reviews, iclelland+watch_chromuim.org, chasej+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Validate origins when generating subdomain tokens Subdomain tokens will match against any subdomains of the given origin. This relaxed matching should not be applied when subdomains represent separate logical sites (e.g. <user>.github.io). Thus, subdomain tokens are not to be issued for such domains. For more detail, see the last question in the Origin Trials developer guide: https://github.com/jpchase/OriginTrials/blob/gh-pages/developer-guide.md This CL adds a utility to validate that a origin is not found in the Public Suffix List. The token generation script will now call the utility to check the origin, only for subdomain tokens. The utility is used when the generation script is manually run by the origin trials team to issue tokens. The intent is to automate the origin checks, to reduce the number of manual steps in issuing tokens. BUG=658856 Committed: https://crrev.com/6205808cb4e9c61264e4aa48676e2f5833a61326 Cr-Commit-Position: refs/heads/master@{#440554}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 19

Patch Set 3 : Address comments #

Total comments: 6

Patch Set 4 : Address more comments #

Patch Set 5 : Fix Windows compile error #

Total comments: 6

Patch Set 6 : Address build comments #

Patch Set 7 : Rebase #

Patch Set 8 : Treat IP addresses as invalid #

Total comments: 3

Patch Set 9 : Use stdout for utility output #

Patch Set 10 : Rebase #

Patch Set 11 : Fix Android bot failures #

Patch Set 12 : Fix android_cronet build error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -7 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M build/config/linux/gconf/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download
M tools/origin_trials/generate_token.py View 1 2 3 4 5 6 7 6 chunks +39 lines, -0 lines 0 comments Download
A tools/origin_trials/validate_subdomain_origin/BUILD.gn View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
A tools/origin_trials/validate_subdomain_origin/DEPS View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
A tools/origin_trials/validate_subdomain_origin/test_validate.py View 1 2 3 4 5 6 7 1 chunk +100 lines, -0 lines 0 comments Download
A tools/origin_trials/validate_subdomain_origin/validate_subdomain_origin.cc View 1 2 3 4 5 6 7 8 1 chunk +173 lines, -0 lines 0 comments Download
M url/features.gni View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 80 (51 generated)
chasej
iclelland, please take a look.
4 years, 1 month ago (2016-10-28 18:22:54 UTC) #8
chasej
iclelland, please take a look.
4 years, 1 month ago (2016-11-02 14:24:53 UTC) #11
iclelland
Sorry for the delay; this looks pretty good. I've left a few questions in comments. ...
4 years, 1 month ago (2016-11-02 15:25:47 UTC) #12
iclelland
https://codereview.chromium.org/2456053004/diff/20001/tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc File tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc (right): https://codereview.chromium.org/2456053004/diff/20001/tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc#newcode56 tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc:56: if (base::StartsWith(origin, "http", On 2016/11/02 15:25:47, iclelland wrote: > ...
4 years, 1 month ago (2016-11-02 15:28:55 UTC) #13
chasej
iclelland, please take another look. I've addressed most of the comments. There is one outstanding, ...
4 years, 1 month ago (2016-11-03 19:23:40 UTC) #14
iclelland
https://codereview.chromium.org/2456053004/diff/20001/tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc File tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc (right): https://codereview.chromium.org/2456053004/diff/20001/tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc#newcode56 tools/origin_trials/validate_subdomain_origin/check_subdomain_origin.cc:56: if (base::StartsWith(origin, "http", On 2016/11/03 19:23:40, chasej wrote: > ...
4 years, 1 month ago (2016-11-03 19:47:55 UTC) #15
chasej
iclelland, please take a look. I've removed the check for valid urls. Instead, the help ...
4 years, 1 month ago (2016-11-03 21:13:10 UTC) #18
iclelland
lgtm
4 years, 1 month ago (2016-11-04 17:20:56 UTC) #23
chasej
agrieve, please take a look at BUILD.gn. I wasn't sure exactly where I should add ...
4 years, 1 month ago (2016-11-04 17:58:53 UTC) #27
agrieve
lgtm /w nits https://codereview.chromium.org/2456053004/diff/80001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2456053004/diff/80001/BUILD.gn#newcode273 BUILD.gn:273: "//tools/origin_trials/validate_subdomain_origin", I'm guessing there's not GYP ...
4 years, 1 month ago (2016-11-04 18:06:33 UTC) #28
chasej
agrieve, thanks for the review. I did have one followup question below. https://codereview.chromium.org/2456053004/diff/80001/BUILD.gn File BUILD.gn ...
4 years, 1 month ago (2016-11-04 19:26:36 UTC) #29
chasej
On 2016/11/04 17:58:53, chasej wrote: > agrieve, please take a look at BUILD.gn. I wasn't ...
4 years, 1 month ago (2016-11-10 16:49:38 UTC) #30
Randy Smith (Not in Mondays)
On 2016/11/10 16:49:38, chasej wrote: > On 2016/11/04 17:58:53, chasej wrote: > > agrieve, please ...
4 years, 1 month ago (2016-11-10 17:02:21 UTC) #31
Randy Smith (Not in Mondays)
On 2016/11/10 17:02:21, Randy Smith - Not in Mondays wrote: > On 2016/11/10 16:49:38, chasej ...
4 years, 1 month ago (2016-11-10 18:45:07 UTC) #32
chasej
iclelland, please take one more look. I've changed the logic so that IP addresses are ...
4 years, 1 month ago (2016-11-10 18:47:51 UTC) #35
Ryan Sleevi
I'm a little nervous about introducing any new dependencies on the Public Suffix List, both ...
4 years, 1 month ago (2016-11-10 19:21:38 UTC) #39
Ryan Sleevi
https://codereview.chromium.org/2456053004/diff/140001/tools/origin_trials/validate_subdomain_origin/validate_subdomain_origin.cc File tools/origin_trials/validate_subdomain_origin/validate_subdomain_origin.cc (right): https://codereview.chromium.org/2456053004/diff/140001/tools/origin_trials/validate_subdomain_origin/validate_subdomain_origin.cc#newcode32 tools/origin_trials/validate_subdomain_origin/validate_subdomain_origin.cc:32: static const char kOptionQuiet[] = "quiet"; Why not simply ...
4 years, 1 month ago (2016-11-10 19:25:19 UTC) #40
iclelland
New changes lgtm, thanks https://codereview.chromium.org/2456053004/diff/140001/tools/origin_trials/validate_subdomain_origin/test_validate.py File tools/origin_trials/validate_subdomain_origin/test_validate.py (right): https://codereview.chromium.org/2456053004/diff/140001/tools/origin_trials/validate_subdomain_origin/test_validate.py#newcode30 tools/origin_trials/validate_subdomain_origin/test_validate.py:30: '10.0.0.1': STATUS_IP_ADDRESS, May as well ...
4 years, 1 month ago (2016-11-10 19:46:29 UTC) #42
chasej
On 2016/11/10 19:21:38, Ryan Sleevi wrote: > I'm a little nervous about introducing any new ...
4 years, 1 month ago (2016-11-10 20:21:05 UTC) #44
Ryan Sleevi
On 2016/11/10 20:21:05, chasej wrote: > Using the public suffix list was seen as convenient ...
4 years, 1 month ago (2016-11-10 20:39:16 UTC) #45
chasej
On 2016/11/10 20:39:16, Ryan Sleevi wrote: > On 2016/11/10 20:21:05, chasej wrote: > > Using ...
4 years, 1 month ago (2016-11-11 15:34:40 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456053004/160001
4 years, 1 month ago (2016-11-11 19:54:40 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/162860) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 1 month ago (2016-11-11 20:00:09 UTC) #51
chasej
brettw@chromium.org: Please review changes in url/features.gni. This CL adds a utility for use in the ...
4 years ago (2016-12-19 21:09:37 UTC) #66
brettw
url/ lgtm
3 years, 12 months ago (2016-12-22 22:48:28 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2456053004/240001
3 years, 12 months ago (2016-12-23 00:16:12 UTC) #74
commit-bot: I haz the power
Committed patchset #12 (id:240001)
3 years, 12 months ago (2016-12-23 00:21:31 UTC) #77
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/6205808cb4e9c61264e4aa48676e2f5833a61326 Cr-Commit-Position: refs/heads/master@{#440554}
3 years, 12 months ago (2016-12-23 00:23:33 UTC) #79
amineer
3 years, 12 months ago (2016-12-24 17:35:50 UTC) #80
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:240001) has been created in
https://codereview.chromium.org/2605563003/ by amineer@chromium.org.

The reason for reverting is: Breaks official Android builds, see
https://bugs.chromium.org/p/chromium/issues/detail?id=676894.

Powered by Google App Engine
This is Rietveld 408576698