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

Issue 2411803002: Support subdomain matching in trial tokens (Closed)

Created:
4 years, 2 months ago by chasej
Modified:
4 years, 2 months ago
Reviewers:
iclelland, estark
CC:
chromium-reviews, iclelland+watch_chromuim.org, jam, darin-cc_chromium.org, chasej+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support subdomain matching in trial tokens This CL adds support for subdomain trial tokens, such that a properly issued token will enable a trial for multiple subdomains, rather than a single specified origin. In bug 653349, it was proposed to use a leading "*" to indicate a wildcard token (e.g. *.example.com). In this implementation, an explicit flag was added to the token format. The explicit flag keeping the token parsing simple, by keeping the url::Origin as the representation of the origin, and avoiding custom string parsing. BUG=653349 Committed: https://crrev.com/4f0cb8e9b16a270d0a7fd313f161b4c2c9a0df29 Cr-Commit-Position: refs/heads/master@{#425168}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Update token generation script #

Patch Set 3 : Change to subdomain naming #

Patch Set 4 : One more change for rename #

Patch Set 5 : Rebase #

Patch Set 6 : Add fuzzer data for subdomain tokens #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -22 lines) Patch
M content/common/origin_trials/trial_token.h View 1 2 3 4 3 chunks +10 lines, -6 lines 0 comments Download
M content/common/origin_trials/trial_token.cc View 1 2 3 chunks +16 lines, -1 line 1 comment Download
M content/common/origin_trials/trial_token_unittest.cc View 1 2 10 chunks +125 lines, -2 lines 0 comments Download
A content/test/data/fuzzer_corpus/origin_trial_token_data/24 View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A + content/test/data/fuzzer_corpus/origin_trial_token_data/25 View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A content/test/data/fuzzer_corpus/origin_trial_token_data/26 View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A + content/test/data/fuzzer_corpus/origin_trial_token_data/27 View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M content/test/data/fuzzer_dictionaries/origin_trial_token_fuzzer.dict View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tools/origin_trials/generate_token.py View 1 2 6 chunks +31 lines, -11 lines 3 comments Download

Messages

Total messages: 31 (20 generated)
iclelland
lgtm https://codereview.chromium.org/2411803002/diff/1/content/common/origin_trials/trial_token.h File content/common/origin_trials/trial_token.h (right): https://codereview.chromium.org/2411803002/diff/1/content/common/origin_trials/trial_token.h#newcode96 content/common/origin_trials/trial_token.h:96: bool is_wildcard_origin_; Bikeshed: Would this be better named ...
4 years, 2 months ago (2016-10-12 04:18:16 UTC) #7
chasej
iclelland, please take another look. I've changed to use the "subdomain" naming, instead of "wildcard". ...
4 years, 2 months ago (2016-10-13 15:36:19 UTC) #18
iclelland
Thanks - still lgtm! One question about whether we ever need to mint a token ...
4 years, 2 months ago (2016-10-13 15:51:24 UTC) #19
chasej
https://codereview.chromium.org/2411803002/diff/100001/tools/origin_trials/generate_token.py File tools/origin_trials/generate_token.py (right): https://codereview.chromium.org/2411803002/diff/100001/tools/origin_trials/generate_token.py#newcode93 tools/origin_trials/generate_token.py:93: if is_subdomain is not None: On 2016/10/13 15:51:23, iclelland ...
4 years, 2 months ago (2016-10-13 16:05:43 UTC) #20
iclelland
https://codereview.chromium.org/2411803002/diff/100001/tools/origin_trials/generate_token.py File tools/origin_trials/generate_token.py (right): https://codereview.chromium.org/2411803002/diff/100001/tools/origin_trials/generate_token.py#newcode93 tools/origin_trials/generate_token.py:93: if is_subdomain is not None: On 2016/10/13 16:05:42, chasej ...
4 years, 2 months ago (2016-10-13 16:06:47 UTC) #21
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/2411803002/100001
4 years, 2 months ago (2016-10-13 20:35:49 UTC) #23
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-13 21:33:00 UTC) #25
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/4f0cb8e9b16a270d0a7fd313f161b4c2c9a0df29 Cr-Commit-Position: refs/heads/master@{#425168}
4 years, 2 months ago (2016-10-13 21:35:20 UTC) #27
chasej
estark, please take a look. The linked bug provides context, but this an extension to ...
4 years, 2 months ago (2016-10-17 20:36:45 UTC) #29
estark
lgtm with a question https://codereview.chromium.org/2411803002/diff/100001/content/common/origin_trials/trial_token.cc File content/common/origin_trials/trial_token.cc (right): https://codereview.chromium.org/2411803002/diff/100001/content/common/origin_trials/trial_token.cc#newcode185 content/common/origin_trials/trial_token.cc:185: origin.DomainIs(origin_.host()) && Is token issuance ...
4 years, 2 months ago (2016-10-18 19:48:54 UTC) #30
chasej
4 years, 2 months ago (2016-10-18 20:10:49 UTC) #31
Message was sent while issue was closed.
On 2016/10/18 19:48:54, estark wrote:
> lgtm with a question
> 
>
https://codereview.chromium.org/2411803002/diff/100001/content/common/origin_...
> File content/common/origin_trials/trial_token.cc (right):
> 
>
https://codereview.chromium.org/2411803002/diff/100001/content/common/origin_...
> content/common/origin_trials/trial_token.cc:185:
origin.DomainIs(origin_.host())
> &&
> Is token issuance restricted by the Public Suffix List? That is, is it
possible
> to get a token for, say, github.io or appspot.com?

Yes, token issuance will be restricted. The registration process is being
updated so it will not allow tokens for domains on the Public Suffix List.

Powered by Google App Engine
This is Rietveld 408576698