diff --git a/WD.html b/WD.html index d6c022d..027d902 100644 --- a/WD.html +++ b/WD.html @@ -43,57 +43,6 @@ [data-md] > :last-child { margin-bottom: 0; } - - + + +
This section describes the status of this document at the time of - its publication. Other documents may supersede this document. A list of - current W3C publications and the latest revision of this technical report - can be found in the W3C technical reports - index at http://www.w3.org/TR/.
-This document was published by the Web Application Security Working Group as a Working Draft. This document is intended to become a W3C Recommendation.
-The (archived) public mailing list public-webappsec@w3.org (see instructions) - is preferred for discussion of this specification. - When sending e-mail, - please put the text “secure-contexts” in the subject, - preferably like this: - “[secure-contexts] …summary of comment…”
-Publication as a Working Draft does not imply endorsement by the W3C - Membership. This is a draft document and may be updated, replaced or - obsoleted by other documents at any time. It is inappropriate to cite this - document as other than work in progress.
-This document was produced by the Web Application Security Working Group.
-This document was produced by a group operating under - the 5 February 2004 W3C Patent Policy. - W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; - that page also includes instructions for disclosing a patent. - An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
-This document is governed by the 1 September 2015 W3C Process Document.
A settings object is considered a secure context#secure-contextReferenced in:1.1. Top-level Documents (2)1.2. Framed Documents (2) (3)1.3. Web Workers (2) (3) (4)1.4. Shared Workers (2) (3) (4)1.5. Service Workers (2) (3)2. Framework (2)2.2.1. Shared Workers (2) (3)2.2.2. Feature Detection (2)3.1. - Is settings object a secure context? 4.2. Ancestral Risk4.3. Risks associated with non-secure contexts (2)5.1. Incomplete Isolation6. Privacy Considerations7.3. Restricting New Features (2) (3)7.4. Restricting Legacy Features (2) (3)7.4.1. Example: Geolocation (2) if +
A settings object is considered a secure context if
the algorithm in §3.1 Is settings object a secure context? returns "Secure
". The settings
object is otherwise non-secure.
Likewise, a global object is considered a secure context if its relevant settings object is a secure context.
@@ -714,21 +763,21 @@interface ExampleFeature { +interface ExampleFeature { // This call will succeed in all contexts. - Promise <double> calculateNotSoSecretResult(); + Promise <double> calculateNotSoSecretResult(); // This operation will not be exposed to a non-secure context. - [SecureContext] Promise<double> calculateSecretResult(); + [SecureContext] Promise<double> calculateSecretResult(); // The same applies here: the operation will not be exposed to a non-secure context. - [SecureContext] boolean getSecretBoolean(); + [SecureContext] boolean getSecretBoolean(); }; -[SecureContext] -interface SecureFeature { +[SecureContext] +interface SecureFeature { // This interface will not be exposed to non-secure contexts. - Promise<any> doAmazingThing(); + Promise<any> doAmazingThing(); };
If the result of executing §3.1 Is settings object a secure context? on the incumbent
+ If the result of executing §3.1 Is settings object a secure context? on the current
settings object does not match the result of executing the same
algorithm on worker global scope’s relevant settings
object, then throw a SecurityError
exception, and abort
@@ -758,12 +807,12 @@ secure contexts
, a simple boolean attribute is added to the
global object:
partial interface Window { - readonly attribute boolean isSecureContext#dom-window-issecurecontextReferenced in:2.2.2. Feature Detection; +partial interface Window { + readonly attribute boolean isSecureContext; }; -partial interface WorkerGlobalScope { - readonly attribute boolean isSecureContext#dom-workerglobalscope-issecurecontextReferenced in:2.2.2. Feature Detection; +partial interface WorkerGlobalScope { + readonly attribute boolean isSecureContext; };Both
@@ -829,7 +878,7 @@Window
'sisSecureContext
andWorkerGlobalScope
'sisSecureContext
attributes' getters returntrue
if the relevant settings object for the getter’s global object is a secure context, andfalse
otherwise.Secure".
A potentially trustworthy origin#potentially-trustworthy-originReferenced in:1.2. Framed Documents1.3. Web Workers is one which a user agent +
A potentially trustworthy origin is one which a user agent can generally trust as delivering data securely.
This algorithms considers certain hosts, scheme, and origins as potentially trustworthy, even though they might not be authenticated and encrypted in the @@ -1003,11 +1052,11 @@
When writing a specification for new features, we recommend that authors and editors guard sensitive APIs with checks against secure contexts. For example, something like the following might be a good approach:
-Authors should also ensure that sensitive APIs are only exposed to secure
- contexts by guarding them with the [SecureContext]
attribute:
Authors could alternatively ensure that sensitive APIs are only exposed to secure contexts by guarding them with the [SecureContext]
attribute:
[SecureContext] -interface SensitiveFeature { - Promise<double> getTheSecretDouble(); +[SecureContext] +interface SensitiveFeature { + Promise<double> getTheSecretDouble(); }; // Or: -interface AnotherSensitiveFeature { - [SecureContext] void doThatPowerfulThing(); +interface AnotherSensitiveFeature { + [SecureContext] void doThatPowerfulThing(); };
Modify the specification to include
checks against secure context before executing the algorithms for getCurrentPosition()
and watchPosition()
.
If the incumbent settings object is not a secure context, +
If the current settings object is not a secure context,
then the algorithm should be aborted, and the errorCallback
invoked with a code
of PERMISSION_DENIED
.
The user agent should announce clear intentions to disable the API for @@ -1170,8 +1218,8 @@
partial interface Window { - readonly attribute boolean isSecureContext; +partial interface Window { + readonly attribute boolean isSecureContext; }; -partial interface WorkerGlobalScope { - readonly attribute boolean isSecureContext; +partial interface WorkerGlobalScope { + readonly attribute boolean isSecureContext; };+ + + +