71
71
< h1 class ="p-name no-ref " id ="title "> Confinement with Origin Web Labels</ h1 >
72
72
73
73
< h2 class ="no-num no-toc no-ref heading settled " id ="subtitle "> < span class ="content "> Editor’s Draft,
74
- < time class ="dt-updated " datetime ="2015-09-05 " > 5 September 2015</ time > </ span > </ h2 >
74
+ < time class ="dt-updated " datetime ="2015-09-09 " > 9 September 2015</ time > </ span > </ h2 >
75
75
76
76
< div data-fill-with ="spec-metadata ">
77
77
< dl >
@@ -319,18 +319,18 @@ <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </s
319
319
320
320
< p > This document specifies an extension to the current model called
321
321
Confinement with Origin Web Labels (COWL). COWL provides authors
322
- with APIs for specifying access control policies on data, including
323
- content, in terms of < a data-link-type ="dfn " href ="#origin-label "> origin labels</ a > . These policies are
324
- enforced in a mandatory fashion, transitively, even once code has
325
- access to the data. For example, with COWL, the author of
326
- < code > https://example.com</ code > can specify that a password is
327
- confidential to < code > https://example.com</ code > (and thus should
328
- only be disclosed to < code > https://example.com</ code > ) before
329
- sharing it with a third-party password strength checking service. In
330
- turn, COWL ensures that the third-party service, which necessarily
331
- computes on the sensitive password, is confined and respects the
332
- policy on the password: COWL disallows it from disclosing the
333
- password to any < a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc6454#section-3.2 "> origin</ a > other than
322
+ with APIs for specifying (mandatory) access control policies on
323
+ data, including content, in terms of < a data-link-type ="dfn " href ="#origin-label "> origin labels</ a > . These
324
+ policies are enforced in a mandatory fashion, transitively, even
325
+ once code has access to the data. For example, with COWL, the
326
+ author of < code > https://example.com</ code > can specify that a
327
+ password is confidential to < code > https://example.com</ code > (and
328
+ thus should only be disclosed to < code > https://example.com</ code > )
329
+ before sharing it with a third-party password strength checking
330
+ service. In turn, COWL ensures that the third-party service, which
331
+ necessarily computes on the sensitive password, is confined and
332
+ respects the policy on the password: COWL disallows it from
333
+ disclosing the password to any < a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc6454#section-3.2 "> origin</ a > other than
334
334
< code > https://example.com</ code > .</ p >
335
335
336
336
@@ -358,11 +358,11 @@ <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </s
358
358
359
359
< p > COWL is intended to be used as a defense-in-depth mechanism that can
360
360
restrict how untrusted—buggy but not malicious—code
361
- sensitive data. Given the complexities of browser implementations
362
- and presence of covert channels, malicious code may be able to
363
- exfiltrate data. Authors should still use discretionary access
364
- control mechanisms, such as CSP and CORS, to restrict access to the
365
- data in the first place.</ p >
361
+ handles sensitive data. Given the complexities of browser
362
+ implementations and presence of covert channels, malicious code may
363
+ be able to exfiltrate data. Authors should still use discretionary
364
+ access control mechanisms, such as CSP and CORS, to restrict access
365
+ to the data in the first place.</ p >
366
366
367
367
368
368
< section >
@@ -766,15 +766,16 @@ <h3 class="heading settled" data-level="2.1" id="key-concepts-labels"><span clas
766
766
767
767
768
768
769
- < div class ="example " id ="example-6618ece2 "> < a class ="self-link " href ="#example-6618ece2 "> </ a >
769
+ < div class ="example " id ="example-b7c7efed "> < a class ="self-link " href ="#example-b7c7efed "> </ a >
770
770
The integrity label
771
771
< code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://a.com").or("https://b.com")</ code > ,
772
772
when associated with a context, restricts the context to
773
773
receiving data from (a context or server) that is at least as
774
774
trustworthy as < code > https://a.com</ code > or
775
775
< code > https://b.com</ code > . This context label ensures that
776
- the code running in the context can only be influenced by
777
- < code > https://a.com</ code > and < code > https://b.com</ code > .
776
+ the code running in the context can only be influenced by data
777
+ which either < code > https://a.com</ code > or
778
+ < code > https://b.com</ code > endorse.
778
779
</ div >
779
780
780
781
@@ -873,7 +874,7 @@ <h3 class="heading settled" data-level="2.2" id="key-concepts-privileges"><span
873
874
< li data-md ="">
874
875
< p > A < dfn data-dfn-type ="dfn " data-noexport ="" id ="privilege "> privilege< a class ="self-link " href ="#privilege "> </ a > </ dfn > is an unforgeable object that corresponds
875
876
to a < a data-link-type ="dfn " href ="#label "> label</ a > . Privileges are associated with contexts and
876
- reflect the authority of the context .</ p >
877
+ reflect their authority.</ p >
877
878
878
879
879
880
@@ -885,8 +886,8 @@ <h3 class="heading settled" data-level="2.2" id="key-concepts-privileges"><span
885
886
886
887
887
888
888
- < div class ="example " id ="example-e8c74689 "> < a class ="self-link " href ="#example-e8c74689 "> </ a >
889
- Consider a context whose
889
+ < div class ="example " id ="example-c90a85dd "> < a class ="self-link " href ="#example-c90a85dd "> </ a >
890
+ Consider a context from < code > https://a.com </ code > whose
890
891
< a data-link-type ="dfn " href ="#current-confidentiality-label "> current confidentiality label</ a > is < code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://a.com").and("https://b.com")</ code > .
891
892
This label confines the context to only communicating with
892
893
entities whose labels are at least as restricting as this
@@ -897,17 +898,17 @@ <h3 class="heading settled" data-level="2.2" id="key-concepts-privileges"><span
897
898
from communicating with < code > https://a.com</ code > .
898
899
899
900
900
- < p > But, suppose that the context’s < a data-link-type ="dfn " href ="#current-privilege "> current privilege</ a > corresponds
901
- to < code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://a.com")</ code > , as
902
- would be the case for an
903
- < code > https://a.com </ code > context. Then, the context would be able to
904
- bypass some of the restrictions imposed by the context label.
905
- Specifically, the context would be able to communicate with
906
- < code > https://b.com</ code > ; the privilege confers it the
907
- right to declassify < code > https://a.com</ code > data to
908
- < code > https://b.com</ code > . Indeed, when taking this privilege into
909
- consideration, the < a data-link-type ="dfn " href ="#effective-confidentiality-label "> effective confidentiality label</ a > of
910
- the context is < code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://b.com")</ code > .</ p >
901
+ < p > But, suppose that the context’s < a data-link-type ="dfn " href ="#current-privilege "> current privilege</ a >
902
+ corresponds to < code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://a.com")</ code >
903
+ (afterall, the context originated from < code > https://a.com </ code > ).
904
+ Then, the context would be able to bypass some of the
905
+ restrictions imposed by the context label. Specifically, the
906
+ context would be able to communicate with
907
+ < code > https://b.com</ code > ; the privilege confers it the right
908
+ to declassify < code > https://a.com</ code > data to
909
+ < code > https://b.com</ code > . Indeed, when taking this privilege
910
+ into consideration, the < a data-link-type ="dfn " href ="#effective-confidentiality-label "> effective confidentiality label</ a >
911
+ of the context is < code > < a class ="idl-code " data-link-type ="interface " href ="#label0 "> Label</ a > ("https://b.com")</ code > .</ p >
911
912
912
913
913
914
@@ -920,7 +921,7 @@ <h3 class="heading settled" data-level="2.2" id="key-concepts-privileges"><span
920
921
921
922
< div class ="note " role ="note ">
922
923
To be flexible, COWL uses the context privilege to remove
923
- (the safe) restrictions imposed by the < a data-link-type ="dfn " href ="#context-labels "> context label</ a > .
924
+ certain restrictions imposed by the < a data-link-type ="dfn " href ="#context-labels "> context label</ a > .
924
925
To avoid accidentally leaking sensitive context data,
925
926
authors should use < a class ="idl-code " data-link-type ="interface " href ="#labeledobject "> LabeledObject</ a > s.
926
927
</ div >
@@ -1051,7 +1052,7 @@ <h2 class="heading settled" data-level="3" id="framework"><span class="secno">3.
1051
1052
The COWL framework provides a JavaScript
1052
1053
< a class ="idl-code " data-link-type ="interface " href ="#privilege0 "> Privilege</ a > interface for operating on and minting
1053
1054
new < a data-link-type ="dfn " href ="#privilege "> privileges</ a > . The < a class ="idl-code " data-link-type ="interface " href ="#cowl "> COWL</ a > JavaScript
1054
- interface and < code > Sec-COWL</ code > HTTP response header can be used
1055
+ interface and < code > Sec-COWL</ code > HTTP response header can be
1055
1056
used to explicitly control the authority of a context by setting
1056
1057
the < a data-link-type ="dfn " href ="#context-privilege "> context privilege</ a > .
1057
1058
@@ -1317,7 +1318,7 @@ <h4 class="heading settled" data-level="3.1.2" id="labe-methods"><span class="se
1317
1318
1318
1319
< li data-md ="">
1319
1320
< p > For each < a data-link-type ="dfn " href ="#disjunction-set "> disjunction set</ a > < var > dset</ var > in the
1320
- < a data-link-type ="dfn " href ="#label-set "> label set</ a > of the < a data-link-type ="dfn " href ="#label "> label</ a > this method was invoked on:</ p >
1321
+ < a data-link-type ="dfn " href ="#label-set "> label set</ a > of the < a data-link-type ="dfn " href ="#label "> label</ a > , this method was invoked on:</ p >
1321
1322
1322
1323
1323
1324
@@ -1409,6 +1410,14 @@ <h4 class="heading settled" data-level="3.1.2" id="labe-methods"><span class="se
1409
1410
let < var > origin</ var > be a < a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc6454#section-2.3 "> globally unique identifier</ a > .</ p >
1410
1411
1411
1412
1413
+
1414
+ < div class ="note " role ="note ">
1415
+ Much like < a data-link-type ="functionish " href ="#dom-privilege-freshprivilege "> FreshPrivilege()</ a > ,
1416
+ < code > "unique"</ code > is used to create a label
1417
+ component that is globally unique.
1418
+ </ div >
1419
+
1420
+
1412
1421
1413
1422
< li data-md ="">
1414
1423
< p > Else, if < var > str</ var > is < code > "self"</ code > and < var > self</ var > is not null,
@@ -2710,9 +2719,10 @@ <h3 class="heading settled" data-level="3.5" id="header"><span class="secno">3.5
2710
2719
2711
2720
2712
2721
2713
- < pre > < dfn data-dfn-type ="dfn " data-noexport ="" id ="label_set "> label-set< a class ="self-link " href ="#label_set "> </ a > </ dfn > = "[" < a data-link-type ="dfn " href ="#disjunction_set "> disjunction-set</ a > *( "," [ < a data-link-type ="dfn " href ="#disjunction_set "> disjunction-set</ a > ] ) "]"
2722
+ < pre > < dfn data-dfn-type ="dfn " data-noexport ="" id ="label_set "> label-set< a class ="self-link " href ="#label_set "> </ a > </ dfn > = "[" < a data-link-type ="dfn " href ="#disjunction_set "> disjunction-set</ a > *( "," [ < a data-link-type ="dfn " href ="#disjunction_set "> disjunction-set</ a > ] ) "]" / < a data-link-type =" dfn " href =" #empty_label " > empty-label </ a >
2714
2723
< dfn data-dfn-type ="dfn " data-noexport ="" id ="disjunction_set "> disjunction-set< a class ="self-link " href ="#disjunction_set "> </ a > </ dfn > = "[" [ < a data-link-type ="dfn " href ="#source_expression "> source-expression</ a > *( "," [ < a data-link-type ="dfn " href ="#source_expression "> source-expression</ a > ] ) ] "]"
2715
2724
< dfn data-dfn-type ="dfn " data-noexport ="" id ="source_expression "> source-expression< a class ="self-link " href ="#source_expression "> </ a > </ dfn > = "'self'" / < a data-link-type ="dfn " href ="https://www.w3.org/TR/CSP2/#source-list-syntax "> host-source</ a >
2725
+ < dfn data-dfn-type ="dfn " data-noexport ="" id ="empty_label "> empty-label< a class ="self-link " href ="#empty_label "> </ a > </ dfn > = "[" *< a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc5234#appendix-B.1 "> WSP</ a > "[" *< a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc5234#appendix-B.1 "> WSP</ a > "]" *< a data-link-type ="dfn " href ="https://tools.ietf.org/html/rfc5234#appendix-B.1 "> WSP</ a > "]"
2716
2726
</ pre >
2717
2727
2718
2728
@@ -2755,8 +2765,8 @@ <h4 class="heading settled" data-level="3.5.1" id="request-header"><span class="
2755
2765
2756
2766
2757
2767
2758
- < div class ="example " id ="example-89644cdc "> < a class ="self-link " href ="#example-89644cdc "> </ a >
2759
- Request header from an < code > http://a.com</ code > page that has
2768
+ < div class ="example " id ="example-da414d56 "> < a class ="self-link " href ="#example-da414d56 "> </ a >
2769
+ Request header from a < code > http://a.com</ code > page that has
2760
2770
read data sensitive to < code > http://b.com</ code > .
2761
2771
2762
2772
< pre > < code > Sec-COWL: < a data-link-type ="dfn " href ="#ctx_confidentiality "> ctx-confidentiality</ a > [ ['https://b.com'] ];
@@ -2977,6 +2987,18 @@ <h4 class="heading settled" data-level="3.6.1" id="sending-labeled-objects"><spa
2977
2987
User agents MUST ensure that all < a data-link-type ="dfn " href ="#protected-object "> protected object</ a > s can be
2978
2988
serialized at the time of creating < a class ="idl-code " data-link-type ="interface " href ="#labeledobject "> LabeledObject</ a > s.</ p >
2979
2989
2990
+
2991
+
2992
+ < div class ="note " role ="note ">
2993
+ This algorithm does not check if the integrity label of
2994
+ the object subsumes the server’s integrity label. It is
2995
+ the server’s responsibility to ensure that untrustworthy
2996
+ data does not affect its computation in an unsafe way.
2997
+ Indeed, the only reason for checking the confidentiality
2998
+ labels is because the user agent has no way to ensure that
2999
+ the server will respect the confidentiality of the data.
3000
+ </ div >
3001
+
2980
3002
</ ol >
2981
3003
2982
3004
@@ -3233,7 +3255,7 @@ <h5 class="heading settled" data-level="3.6.2.1" id="labeledobject-xhr-receive-e
3233
3255
3234
3256
{
3235
3257
"confidentiality": [[]],
3236
- "integrity": [["https://validator .com"]],
3258
+ "integrity": [["https://provider .com"]],
3237
3259
"object": ...
3238
3260
}
3239
3261
</ code > </ pre >
@@ -4060,9 +4082,13 @@ <h3 class="heading settled" data-level="4.8" id="should-block-fetch"><span class
4060
4082
</ ol > </ ol >
4061
4083
4062
4084
4063
- < p class ="note " role ="note "> Note, the integrity label of the current context is not
4064
- used in this algorithm since, conceptually, the integrity label of
4065
- a server is the < a data-link-type ="dfn " href ="#empty-label "> empty label</ a > and, thus, always subsumed.</ p >
4085
+ < p class ="note " role ="note "> Note, the integrity label of the current context is not used in
4086
+ this algorithm since, conceptually, the integrity label of a
4087
+ server is the < a data-link-type ="dfn " href ="#empty-label "> empty label</ a > and, thus, always subsumed.
4088
+ Server operators should check the
4089
+ < a href ="#request-header "> < code > Sec-COWL</ code > </ a > request header
4090
+ to ensure untrustworthy data does not affect the computation in an
4091
+ unsafe way.</ p >
4066
4092
4067
4093
4068
4094
</ section >
@@ -4788,6 +4814,7 @@ <h3 class="no-num heading settled" id="index-defined-here"><span class="content"
4788
4814
< li > effective confidentiality label, < a href ="#effective-confidentiality-label "> 2.2</ a >
4789
4815
< li > effective integrity label, < a href ="#effective-integrity-label "> 2.2</ a >
4790
4816
< li > empty label, < a href ="#empty-label "> 3.1</ a >
4817
+ < li > empty-label, < a href ="#empty_label "> 3.5</ a >
4791
4818
< li > empty privilege, < a href ="#empty-privilege "> 3.2</ a >
4792
4819
< li > enable(), < a href ="#dom-cowl-enable "> 3.3.2</ a >
4793
4820
< li > equals(other), < a href ="#dom-label-equalsother "> 3.1.2</ a >
0 commit comments