Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TAO definition #197

Merged
merged 8 commits into from
Feb 11, 2019
Merged

Conversation

yoavweiss
Copy link
Contributor

@yoavweiss yoavweiss commented Jan 11, 2019

Supersedes #172 and improves on #196 by aligning with the CORS model, even if in a handwavy way for now.


Preview | Diff

@yoavweiss yoavweiss requested review from npm1 and annevk January 11, 2019 12:56
@@ -518,8 +515,7 @@ <h3>The <dfn>PerformanceResourceTiming</dfn> Interface</h3>
<a data-cite="HTML#or-equivalent" data-lt=
'HTTP response codes equivalence'>equivalent</a> when <a data-cite=
"FETCH#concept-fetch" data-lt='fetch'>fetching</a> the resource and
<strong>all</strong> the redirects or equivalent pass the <a>timing
allow check</a> algorithm.</li>
the resource passes the <a>timing allow check</a> algorithm.</li>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the "all the redirects" reference as it is now implied by passing TAO

@@ -933,8 +916,8 @@ <h3>Cross-origin Resources</h3>
<a data-cite=
"PERFORMANCE-TIMELINE-2#performance-timeline">Performance
Timeline</a>. If the <a>timing allow check</a> algorithm fails for
a <a>cross-origin</a> resource, these attributes of its
<a>PerformanceResourceTiming</a> object MUST be set to zero:
a resource, these attributes of its <a>PerformanceResourceTiming</a>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the "cross-origin" wording, as we want the check to run on same-origin resources as well

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@npm1 npm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops forgot to submit the other comment

index.html Outdated
of the <a>current document</a>'s <a
data-cite="DOM#concept-document-origin">origin</a>, nor a
wildcard ("<code>*</code>"), and <var>tainted</var> is
true, return <code>fail</code>.</p></li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the point of this variable. We do need to check any cross-origins but what happens if we have a redirect from the cross-origin to the original origin (same-origin)? Then we'd need to include ourselves in the TAO header list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so (either ourselves or '*')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why is this needed for TAO? This would require websites to whitelist themselves, which does not seem like what we want.

index.html Outdated
<li><p>If the resource's <a>Request</a>'s <a
data-cite="FETCH#concept-request-window">window</a> is not an <a
data-cite="HTML/webapppapis.html#environment-settings-object">environment
settings object</a>, set tainted to true</p></li>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annevk - can you double check that this part makes sense? Added it to avoid trying to look at the origin of a client that's not a settings object

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using https://fetch.spec.whatwg.org/#concept-request-origin for comparisons.

@yoavweiss yoavweiss changed the title Improve TAO definition to better align with the CORS model Improve TAO definition Feb 11, 2019
index.html Outdated
@@ -958,7 +940,7 @@ <h4><code>Timing-Allow-Origin</code> Response Header</h4>
Timing-Allow-Origin = 1#( <a data-cite=
"FETCH#origin-header">origin-or-null</a> / <a data-cite=
"FETCH#http-new-header-syntax">wildcard</a> )
</pre>
</pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my preview this is showing the content has changed to a bunch of lines instead of a single line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted that change and still see it in the diff... Preview seems fine though

index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@npm1 npm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants