index.html
48.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html lang="en" dir="ltr">
<head>
<title>Device API Access Control Use Cases and Requirements</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style type="text/css">
.story {
margin: 1em 0em 0em;
padding: 1em;
border: 2px solid #cfd9f6;
background: #e2f0ff;
}
.story::before {
content: "Story";
display: block;
width: 150px;
margin: -1.5em 0 0.5em 0;
font-weight: bold;
border: 1px solid #cfd9f6;
background: #fff;
padding: 3px 1em;
}
</style>
<!-- <script src='../ReSpec.js/js/respec.js' class='remove'></script> -->
<style type="text/css">
/*****************************************************************
* ReSpec CSS
* Robin Berjon (robin at berjon dot com)
* v0.05 - 2009-07-31
*****************************************************************/
/* --- INLINES --- */
em.rfc2119 {
text-transform: lowercase;
font-variant: small-caps;
font-style: normal;
color: #900;
}
h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: medium solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: medium dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
code {
color: #ff4500;
}
/* --- WEB IDL --- */
pre.idl {
border-top: 1px solid #90b8de;
border-bottom: 1px solid #90b8de;
padding: 1em;
line-height: 120%;
}
pre.idl::before {
content: "WebIDL";
display: block;
width: 150px;
background: #90b8de;
color: #fff;
font-family: initial;
padding: 3px;
font-weight: bold;
margin: -1em 0 1em -1em;
}
.idlType {
color: #ff4500;
font-weight: bold;
text-decoration: none;
}
/*.idlModule*/
/*.idlModuleID*/
/*.idlInterface*/
.idlInterfaceID {
font-weight: bold;
color: #005a9c;
}
.idlSuperclass {
font-style: italic;
color: #005a9c;
}
/*.idlAttribute*/
.idlAttrType, .idlFieldType {
color: #005a9c;
}
.idlAttrName, .idlFieldName {
color: #ff4500;
}
.idlAttrName a, .idlFieldName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlMethod*/
.idlMethType {
color: #005a9c;
}
.idlMethName {
color: #ff4500;
}
.idlMethName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlParam*/
.idlParamType {
color: #005a9c;
}
.idlParamName {
font-style: italic;
}
.extAttr {
color: #666;
}
/*.idlConst*/
.idlConstType {
color: #005a9c;
}
.idlConstName {
color: #ff4500;
}
.idlConstName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlException*/
.idlExceptionID {
font-weight: bold;
color: #c00;
}
.idlTypedefID, .idlTypedefType {
color: #005a9c;
}
.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
color: #c00;
font-weight: normal;
}
.excName a {
font-family: monospace;
}
.idlRaises a.idlType, .excName a.idlType {
border-bottom: 1px dotted #c00;
}
.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
width: 45px;
text-align: center;
}
.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
.idlImplements a {
font-weight: bold;
}
dl.attributes, dl.methods, dl.constants, dl.fields {
margin-left: 2em;
}
.attributes dt, .methods dt, .constants dt, .fields dt {
font-weight: normal;
}
.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
font-weight: bold;
color: #000;
font-family: monospace;
}
.attributes dt code, .fields dt code {
background: #ffffd2;
}
.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
color: #005a9c;
background: transparent;
font-family: inherit;
font-weight: normal;
font-style: italic;
}
.methods dt code {
background: #d9e6f8;
}
.constants dt code {
background: #ddffd2;
}
.attributes dd, .methods dd, .constants dd, .fields dd {
margin-bottom: 1em;
}
table.parameters, table.exceptions {
border-spacing: 0;
border-collapse: collapse;
margin: 0.5em 0;
width: 100%;
}
table.parameters { border-bottom: 1px solid #90b8de; }
table.exceptions { border-bottom: 1px solid #deb890; }
.parameters th, .exceptions th {
color: #fff;
padding: 3px 5px;
text-align: left;
font-family: initial;
font-weight: normal;
text-shadow: #666 1px 1px 0;
}
.parameters th { background: #90b8de; }
.exceptions th { background: #deb890; }
.parameters td, .exceptions td {
padding: 3px 10px;
border-top: 1px solid #ddd;
vertical-align: top;
}
.parameters tr:first-child td, .exceptions tr:first-child td {
border-top: none;
}
.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
width: 100px;
}
.parameters td.prmType {
width: 120px;
}
table.exceptions table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}
/* --- TOC --- */
.toc a {
text-decoration: none;
}
a .secno {
color: #000;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd, .section dl.eldef dd {
margin-bottom: 0;
}
/* --- EXAMPLES --- */
pre.example {
border-top: 1px solid #ff4500;
border-bottom: 1px solid #ff4500;
padding: 1em;
margin-top: 1em;
}
pre.example::before {
content: "Example";
display: block;
width: 150px;
background: #ff4500;
color: #fff;
font-family: initial;
padding: 3px;
font-weight: bold;
margin: -1em 0 1em -1em;
}
/* --- EDITORIAL NOTES --- */
.issue {
padding: 1em;
margin: 1em 0em 0em;
border: 1px solid #f00;
background: #ffc;
}
.issue::before {
content: "Issue";
display: block;
width: 150px;
margin: -1.5em 0 0.5em 0;
font-weight: bold;
border: 1px solid #f00;
background: #fff;
padding: 3px 1em;
}
.note {
margin: 1em 0em 0em;
padding: 1em;
border: 2px solid #cff6d9;
background: #e2fff0;
}
.note::before {
content: "Note";
display: block;
width: 150px;
margin: -1.5em 0 0.5em 0;
font-weight: bold;
border: 1px solid #cff6d9;
background: #fff;
padding: 3px 1em;
}
/* --- Best Practices --- */
div.practice {
border: solid #bebebe 1px;
margin: 2em 1em 1em 2em;
}
span.practicelab {
margin: 1.5em 0.5em 1em 1em;
font-weight: bold;
font-style: italic;
}
span.practicelab { background: #dfffff; }
span.practicelab {
position: relative;
padding: 0 0.5em;
top: -1.5em;
}
p.practicedesc {
margin: 1.5em 0.5em 1em 1em;
}
@media screen {
p.practicedesc {
position: relative;
top: -2em;
padding: 0;
margin: 1.5em 0.5em -1em 1em;
}
/* --- SYNTAX HIGHLIGHTING --- */
pre.sh_sourceCode {
background-color: white;
color: black;
font-style: normal;
font-weight: normal;
}
pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g., *, + */
pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
/* Predefined variables and functions (for instance glsl) */
pre.sh_sourceCode .sh_predef_var { color: #00008B; }
pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
/* for OOP */
pre.sh_sourceCode .sh_classname { color: teal; }
/* line numbers (not yet implemented) */
pre.sh_sourceCode .sh_linenum { display: none; }
/* Internet related */
pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
/* for ChangeLog and Log files */
pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
/* for Prolog, Perl... */
pre.sh_sourceCode .sh_variable { color: #006400; }
/* for LaTeX */
pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
pre.sh_sourceCode .sh_argument { color: #006400; }
pre.sh_sourceCode .sh_optionalargument { color: purple; }
pre.sh_sourceCode .sh_math { color: orange; }
pre.sh_sourceCode .sh_bibtex { color: blue; }
/* for diffs */
pre.sh_sourceCode .sh_oldfile { color: orange; }
pre.sh_sourceCode .sh_newfile { color: #006400; }
pre.sh_sourceCode .sh_difflines { color: blue; }
/* for css */
pre.sh_sourceCode .sh_selector { color: purple; }
pre.sh_sourceCode .sh_property { color: blue; }
pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
/* other */
pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
pre.sh_sourceCode .sh_paren { color: red; }
pre.sh_sourceCode .sh_attribute { color: #006400; }
</style><link charset="utf-8" type="text/css" rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-WG-NOTE"></head>
<body style="display: inherit;"><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a></p><h1 class="title" id="title">Device API Access Control Use Cases and Requirements</h1><h2 id="w3c-working-group-note-17-march-2011">W3C Working Group Note 17 March 2011</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2011/NOTE-dap-policy-reqs-20110317/">http://www.w3.org/TR/2011/NOTE-dap-policy-reqs-20110317/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/dap-policy-reqs/">http://www.w3.org/TR/dap-policy-reqs/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2009/dap/policy-reqs/">http://dev.w3.org/2009/dap/policy-reqs/</a></dd><dt>Previous version:</dt><dd><a href="http://www.w3.org/TR/2011/WD-dap-policy-reqs-20110118/">http://www.w3.org/TR/2011/WD-dap-policy-reqs-20110118/</a></dd><dt>Editors:</dt><dd><span>Laura Arribas</span>, <a href="http://vodafone.com/">Vodafone</a></dd>
<dd><span>Frederick Hirsch</span>, <a href="http://www.nokia.com/">Nokia</a></dd>
<dd><span>Dominique Hazaël-Massieux</span>, W3C</dd>
</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2011 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr></div>
<div class="introductory section" id="abstract"><h2>Abstract</h2>
With the emergence of numerous new APIs in Web browsers and
runtime engines, the need to control which Web sites and
applications can make use of these APIs increases. This document
describes use cases and requirements for controlling access to
these APIs.
</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p><em>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 <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
This document is not normative. The Working Group expects to evolve
this document further and will eventually publish a stable
version as a Working Group Note. This version is an update of
the previous version of his note, modified to present the material
using "user
stories" and associating requirements with those use cases. This
version also adds informative references and is revised to not
assume a specific mechanism to meet the requirements.
<p>This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs and Policy Working Group</a> as a Working Group Note. If you wish to make comments regarding this document, please send them to <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a> (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>). All feedback is welcome.</p><p>Publication as a Working Group Note 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.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a> 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 <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p></div><div class="section" id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#defs"><span class="secno">1.1 </span>Definition</a></li></ul></li><li class="tocline"><a class="tocxref" href="#interactions"><span class="secno">2. </span>Access Control Interactions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#userconsent"><span class="secno">2.1 </span>Granular User Consent</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#userconsent-story-1"><span class="secno">2.1.1 </span>User Story: Unknown restaurant Web site</a></li><li class="tocline"><a class="tocxref" href="#userconsent-story-2"><span class="secno">2.1.2 </span>User Story: Widget of unknown source using the camera</a></li><li class="tocline"><a class="tocxref" href="#userconsent-rqmts"><span class="secno">2.1.3 </span>Requirements</a></li></ul></li><li class="tocline"><a class="tocxref" href="#grouped-permissions"><span class="secno">2.2 </span>Grouped permissions</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#grouped-permissions-story1"><span class="secno">2.2.1 </span>User Story: Web application for email</a></li><li class="tocline"><a class="tocxref" href="#grouped-permissions-rqmts"><span class="secno">2.2.2 </span>Requirements</a></li></ul></li><li class="tocline"><a class="tocxref" href="#delegated-authority-case"><span class="secno">2.3 </span>Delegated Authority</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#delegated-authority-story1"><span class="secno">2.3.1 </span>User Story: Enterprise-level ban on geolocation</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#delgated-authority-story1-rqmts"><span class="secno">2.3.1.1 </span>Requirements</a></li></ul></li><li class="tocline"><a class="tocxref" href="#delegated-authority-story2"><span class="secno">2.3.2 </span>User Story: Third-party protection against malware</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#delgated-authority-story2-rqmts"><span class="secno">2.3.2.1 </span>Requirements</a></li></ul></li><li class="tocline"><a class="tocxref" href="#delegated-authority-story2a"><span class="secno">2.3.3 </span>User Story: Transfering remembered choices to another device</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#delgated-authority-story3-rqmts"><span class="secno">2.3.3.1 </span>Requirements</a></li></ul></li><li class="tocline"><a class="tocxref" href="#delegated-authority-story3"><span class="secno">2.3.4 </span>User Story: Operator-enforced usage limitations</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#delegated-authority-case-rqmts"><span class="secno">2.3.4.1 </span>Requirements</a></li></ul></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#threats"><span class="secno">A. </span>Security and Privacy Threats</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#premium-rate-abuse"><span class="secno">A.1 </span>Premium Rate Abuse</a></li><li class="tocline"><a class="tocxref" href="#privacy-breach"><span class="secno">A.2 </span>Privacy Breach</a></li><li class="tocline"><a class="tocxref" href="#integrity-breach"><span class="secno">A.3 </span>Integrity Breach</a></li><li class="tocline"><a class="tocxref" href="#phishing"><span class="secno">A.4 </span>Phishing</a></li></ul></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div> <!-- abstract -->
<div id="introduction" class="informative section">
<!--OddPage--><h2><span class="secno">1. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
<p>
Various groups have been defining APIs designed to enable
Web sites and applications access to device resources, including geolocation [<cite><a href="#bib-GEOLOCATION-API" rel="biblioentry" class="bibref">GEOLOCATION-API</a></cite>], personal information such as calendar and contacts [<cite><a href="#bib-CONTACTS-API" rel="biblioentry" class="bibref">CONTACTS-API</a></cite>],
system information [<cite><a href="#bib-SYSINFOAPI" rel="biblioentry" class="bibref">SYSINFOAPI</a></cite>] such as network information, etc. Much of this information is sensitive and can be misused.</p>
<p>This document outlines "user story" use cases
for security and access
control for device APIs and derives requirements from these
cases. Although security and access control is related to
privacy, this document does not discuss privacy specifically as
there is another document specific to privacy [<cite><a href="#bib-DAP-PRIVACY-REQS" rel="biblioentry" class="bibref">DAP-PRIVACY-REQS</a></cite>].
</p>
<div class="section" id="defs">
<h3><span class="secno">1.1 </span>Definition</h3>
<p>A <dfn id="dfn-non-safe-api">non-safe API</dfn> is an API that shares sensitive
user information or makes a commitment for the user to a
third-party (e.g. paying a fee).</p>
</div>
</div> <!-- introduction -->
<div id="interactions" class="informative section">
<!--OddPage--><h2><span class="secno">2. </span>Access Control Interactions</h2><p><em>This section is non-normative.</em></p>
<p>Three main types of interactions have been identified for
controlling access to non-safe APIS:</p>
<ul>
<li>based on granular user consent, for every first call of a sensitive API,</li>
<li>based on user consent for a set of APIs at once, packaged into a single interaction (e.g. at “installation” time),</li>
<li>or delegated by the user to a third party that sets new default interactions for APIs based on the requesting script.</li>
</ul>
<p>These interactions can be relevant both for a Web site accessed through a browser, or an installable Web application (e.g. a widget [<cite><a href="#bib-WIDGETS" rel="biblioentry" class="bibref">WIDGETS</a></cite>]) accessed through a dedicated runtime engine.</p>
<div class="section" id="userconsent">
<h3><span class="secno">2.1 </span>Granular User Consent</h3>
<div class="section" id="userconsent-story-1">
<h4><span class="secno">2.1.1 </span>User Story: Unknown restaurant Web site</h4>
<div class="story">
<p>Alice uses her browser to get more information on a restaurant her friends have told her about. The Web site of the restaurant offers to give her indications on how to come from where she stands to their location, as well as to send automatically a SMS to reserve a table for lunch.</p>
<p>Alice follows a link to the direction page, and her browser
asks her unintrusively to confirm she wants to share her current
location with the map service provider embedded in the Web
restaurant site. After considering issues related to sharing this
information, she decides to share her current location. Upon consenting to sharing her location through the browser, she gets detailed directions to the restaurant.</p>
<p>Her browser then displays a non-modal prompt asking if she wants to send an SMS to make a reservation at the restaurant. She is not interested and simply ignores the prompt.</p>
</div>
<h4 id="analysis">Analysis</h4>
<p>Access to non-safe APIs from web pages or applications with
which the user has no pre-established relationship must only be
granted after explicit user consent, and that consent needs to be
granted for each non-safe API separately. Note that it isn't
obvious whether this consent is truly informed, or that the user
understands all the issues involved. This is discussed further
elsewhere [<cite><a href="#bib-DAP-PRIVACY-REQS" rel="biblioentry" class="bibref">DAP-PRIVACY-REQS</a></cite>].</p>
<p>The user may need to gather more information before making a decision on granting access to a given API: e.g. reading the site privacy policy or getting more information on what the collected data will be used for. To make it possible for the user to make an informed decision, the user consent interactions need to be non-blocking.</p>
</div>
<div class="section" id="userconsent-story-2">
<h4><span class="secno">2.1.2 </span>User Story: Widget of unknown source using the camera</h4>
<div class="story">
<p>Bob receives from Alice a mobile widget that she says is used to create a crowd-sourced view of their city. While Bob trusts Alice, he is not sure how trustable that particular widget is.</p>
<p>He runs it in his widget runtime engine in untrusted mode; the widget is only able to take pictures when Bob explicitly press the shutter button of the phone; the geolocation of the pictures is only sent along with the pictures when Bob agrees to it.</p>
</div>
<h4 id="analysis-1">Analysis</h4>
<p>
An un-trusted widget (e.g.. unsigned widget or widget signed by an
unknown or untrusted authority) should be treated in the
same manner as an unknown web site, since the risks
are the same.</p>
<p>To make it easier for the user to understand what he is
granting access to, the access control interactions need to be as
integrated as possible as a part of the task specific workflow,
thus not necessarily appearing as a permission dialog. Relying on
the user pressing the shutter button to take a picture is more
effective than asking him if he agrees with sharing a picture.</p>
<p>Prompts should be eliminated whenever possible. Many prompts do not provide any meaningful security because:</p>
<ul>
<li>they don't provide the user with the information
needed to make an
informed security decision;</li>
<li>with modal prompts, the user is inclined simply to
dismiss the prompt and permit the operation
just because that's what's needed for the application to
continue.</li>
</ul>
<p>
If prompts are shown and dismissed as a matter of routine,
then the user is
less inclined to take any security decision seriously, which further
undermines the effectiveness of a user-driven access control system.
</p>
</div>
<div class="section" id="userconsent-rqmts">
<h4><span class="secno">2.1.3 </span>Requirements</h4>
<ul>
<li>Non-safe APIs <em title="must not" class="rfc2119">must not</em> require the usage of blocking user consent interactions (e.g. modal dialogs) while the application is running (although modal dialogs may be required for security prompts provided during application
installation or invocation).</li>
<li>As a result, non-safe APIs <em title="must" class="rfc2119">must</em> use asynchronous calls for operations that require user consent.</li>
<li>Non-safe APIs <em title="should" class="rfc2119">should</em> permit to get user consent in interactions that are well-integrated in the workflow of the underlying operation.</li>
<li>In an untrusted context, user consent for a given non-safe
API <em title="should not" class="rfc2119">should not</em> imply consent for another non-safe API.</li>
<li>when a non-safe API expose multiple non-safe operations, the API <em title="must" class="rfc2119">must</em> describe the granularity of user consent if that granularity is not part of the user workflow; the parameters to which this granularity can be applied include:<ul>
<li>separate consent for each operation, or grouped for the whole API,</li>
<li>persistent for each call in a given session,</li>
<li>persistent for each call over a period of time spanning
multiple sessions.</li>
</ul>
</li>
</ul>
</div>
</div> <!-- userconsent -->
<div class="section" id="grouped-permissions">
<h3><span class="secno">2.2 </span>Grouped permissions</h3>
<div class="section" id="grouped-permissions-story1">
<h4><span class="secno">2.2.1 </span>User Story: Web application for email</h4>
<div class="story">
<p>Alice uses a Web application as her email client, and considers it trustable.</p>
<p>Her service provider offers to use a set of advanced features that requires access to off-line storage, addressbook integration, access to a dedicated storage space on her device, and interactions through the microphone.</p>
<p>Rather than being prompted every so often to grant permission to use these features, Alice is offered to approve all these accesses in a batch, as part of an installation procedure that identifies these extra-permissions.</p>
<p>Alice follows that procedure and is no longer prompted for these permissions for this application; she still gets prompted when her email client asks for her geolocation since that permission was not part of the batch approval.</p>
</div>
<h4 id="analysis-2">Analysis</h4>
<p>Once a user has established a certain level of trust with a service provider, she is more likely to want to approve permissions as a batch rather than having to respond to prompt every so often that might slow down her work, or might make her miss an additional feature of the application.</p>
<p>Similarly, the user can be offered to validate a set of permissions in a batch when installing a widget, where the permissions can be identified through the <code>feature</code> element [<cite><a href="#bib-WIDGETS" rel="biblioentry" class="bibref">WIDGETS</a></cite>].</p>
<p>To that end, the various permissions that are bound to APIs need to identified.</p>
<p>To establish trust, a few basic parameters may be used, among which:</p>
<ul>
<li><dfn id="dfn-identity">identity</dfn> — ensuring that the privileges are granted to the application from the trusted provider itself, to avoid phishing attacks;</li>
<li><dfn id="dfn-reputation">reputation</dfn> — if others have reviewed positively an application, the user is more likely to trust it; reputation is itself linked to identity, either as a way to identify the source of the recommandation (e.g. approval from a network operator), or as a way to identify the aggregator of recommendations;</li>
<li><dfn id="dfn-context">context</dfn> — a user is more likely to trust an application that requests permissions that make sense to her use of the said application.</li>
</ul>
<p>
Identity and reputation may be established in different ways; one of the most common being
through a validated signature on the widget or application package,
with a corresponding verification of the trust chain to a trusted root.
</p>
</div>
<div class="section" id="grouped-permissions-rqmts">
<h4><span class="secno">2.2.2 </span>Requirements</h4>
<ul>
<li>Non-safe APIs <em title="should" class="rfc2119">should</em> define an identifier for the various permissions they require.</li>
<li>The security framework <em title="should" class="rfc2119">should</em> refer to these API permissions identifiers to allow grouping them in a single user consent operation.</li>
<li>when identity is checked through the use of signature in
conjunction with PKI mechanisms, the security framework <em title="must" class="rfc2119">must</em>
require the verification of the signature, and <em title="must" class="rfc2119">must</em> require
validation of the certificate chain to a known trust
root. Certificate revocation <em title="should" class="rfc2119">should</em> be considered.</li>
</ul>
</div>
</div>
<div class="section" id="delegated-authority-case">
<h3><span class="secno">2.3 </span>Delegated Authority</h3>
<p>Delegated authority use case refers to the use of
explicit and interoperable policy definitions to control the use of
an extensive set of APIs, safe and unsafe. Such rules may be used
in the context of a trusted widget or of well-identified web site, with clients that support it.</p>
<div class="section" id="delegated-authority-story1">
<h4><span class="secno">2.3.1 </span>User Story: Enterprise-level ban on geolocation</h4>
<div class="story">
<p>Bob manages the fleet of phones and laptops for ACMEcash, a cash transportation company: all the drivers have been equipped with a phone and a laptop they can use to interact with their intranet.</p>
<p>To keep the whereabouts of their employees as hidden as possible for security reasons, Bob wants to restrict all the devices distributed to employees so that they cannot use the geolocation API, except when connecting to the company intranet.</p>
<p>Bob creates a policy matching these rules, and deploys it to the phones and laptops.</p>
<p>When ACMEcash gets renamed ACMEbucks, Bob updates this policy to reflect the new domain name of the intranet.</p>
</div>
<h4 id="analysis-3">Analysis</h4>
<p>In many professional contexts, allowing access to private or sensors data available through connected devices creates an unacceptable risk.</p>
<p>In these contexts, being able to enforce and update a policy that determines who can make use of these data across devices and platforms can be a decisive aspect of the adoption of a given technology.</p>
<p>To that end, it should be possible to describe
platform-independent and declarative policies that determine which
APIs can be used from what Web site or application.</p>
<div class="section" id="delgated-authority-story1-rqmts">
<h5><span class="secno">2.3.1.1 </span>Requirements</h5>
<ul>
<li>The access control policy language <em title="must" class="rfc2119">must</em> be device-independent.</li>
<li>The access control policy language <em title="must" class="rfc2119">must</em> be declarative.</li>
</ul>
</div>
</div>
<div class="section" id="delegated-authority-story2">
<h4><span class="secno">2.3.2 </span>User Story: Third-party protection against malware</h4>
<div class="story">
<p>Alice keeps a lot of her private and sensitive data on her phone. Having heard that her friend Charlie has had troubles with a phishing attempt recently, she would like to use a service to increase her safety.</p>
<p>She subscribes to a service operated by ACMEsafe: they define and maintain a set of rules that block access to certain APIs from unknown sites, facilitate access to sites that she has identified as trustable and that can be reliably identified.</p>
<p>Both Alice’s browser and widget runtime engine follow the rules expressed in the policy defined by ACMEsafe; these rules are updated on a regular basis on the device, after having verified their proper origin by checking their digital signature.</p>
</div>
<h4 id="analysis-4">Analysis</h4>
<p>The same way anti-virus and malware tools allow users to reduce their risk of being exposed to troubles on their computers, some users may want to choose to delegate authority for access control policy to an external service provider.</p>
<p>This external service provider determines the
trustworthiness of
specific applications, and specifies an access control
policy that embodies
that advice: blanket rejection for known malware sites, user consent requested for others, and transparent approval for sites that the user has configured as trusted.</p>
<p>The policy defined by the external
authority may be updated
regularly in
response to new information on known threats.
</p>
<p>This policy needs to be integrity-protected during various points in its life-cycle.</p>
<div class="section" id="delgated-authority-story2-rqmts">
<h5><span class="secno">2.3.2.1 </span>Requirements</h5>
<ul>
<li>Integrity protection and source authentication of the access
control policy <em title="must" class="rfc2119">must</em> be
supported, not only in transit but also storage.</li>
</ul>
</div>
</div>
<div class="section" id="delegated-authority-story2a">
<h4><span class="secno">2.3.3 </span>User Story: Transfering remembered choices to another device</h4>
<div class="story">
<p>Dave has been using advanced features on the Web from his
phone for quite some time, and has thus accepted and rejected
permissions from a large number of Web sites on his
device.</p>
<p>But Dave is now looking to the brand new phone released by
ACMEdev, and would like to migrate his settings to that new phone,
which also uses a different browser.</p>
<p>Dave’s operator offers him to transfer seamlessly these
settings from one phone to other, and informs him that they can
also be used on his other connected devices.</p>
</div>
<h4 id="analysis-5">Analysis</h4>
<p>
Remembering earlier decisions and
maintaining these choices when changing devices either across vendors or
device versions has value to the user. This may also be the case when
wishing to have the same choices on multple devices. It should be
possible to transfer or share a
representation of user choices across devices at any time.
</p>
<div class="section" id="delgated-authority-story3-rqmts">
<h5><span class="secno">2.3.3.1 </span>Requirements</h5>
<ul>
<li>Access control policy <em title="must" class="rfc2119">must</em> be able to record user decisions
regarding policy configuration at an appropriate level of
granularity.</li>
<li>Access control policy <em title="must" class="rfc2119">must</em> be portable across devices and
not bound to specific devices.</li>
</ul>
</div>
</div>
<div class="section" id="delegated-authority-story3">
<h4><span class="secno">2.3.4 </span>User Story: Operator-enforced usage limitations</h4>
<div class="story">
<p>Dave has found a nice-looking widget for managing SMS and MMS messages, but is not sure if it is safe to install it.</p>
<p>He contacts his operator ACMEcom; they indicate that on their devices, only widgets that have been verified by them will be able to send SMS.</p>
<p>Dave checks the widget, sees that the only special permission it requires is access to messaging features, and feels confident that he can now install it.</p>
</div>
<h4 id="analysis-6">Analysis</h4>
<p>An initial access control configuration may be
provided by an external
authority, together with any other associated device
configuration (such as
root certificates). The configured policy may
determine access control policy
without reference to the user, or may refer certain
decisions to the user.</p>
<p>
In determining the policy, the policy authority has the
opportunity to define
a policy that supports a specific objective - such as to
limit access to APIs
to only those web applications that are themselves
distributed or verified by the policy
authority (e.g. to control its exposure to the financial
risk of abuse of device
APIs).
</p>
<div class="section" id="delegated-authority-case-rqmts">
<h5><span class="secno">2.3.4.1 </span>Requirements</h5>
<ul>
<li>It <em title="should" class="rfc2119">should</em> be possible to update portions of policy independently.</li>
<li>Access control policies <em title="may" class="rfc2119">may</em> be associated with
different authorities, including the user.</li>
</ul>
<p class="note">The management of security policies and revocation mechanisms are out of scope of the Device APIs and Policy Working Group charter.</p>
</div>
</div>
</div>
</div>
<div id="threats" class="appendix section">
<!--OddPage--><h2><span class="secno">A. </span>Security and Privacy Threats</h2>
<p>
The landscape that is being created
is the enablement of
cross-platform, cross-device, easy to develop, highly functional
applications based on browser technology. Experience with
security attacks suggests that the increase of scope and
power of the Device APIs raises the potential for attacks of
increasing significance. This section outlines some known threats.
</p>
<p>
Up until now no major malware incident
has affected the mobile industry, but risks increase as
adoption and convergence increases. There have been attempts: the
MMS-spreading Commwarrior virus is probably the most infamous, along
with the Spyware tool, Flexispy. An additional factor in
avoiding mobile security issues to date has been the fact that
mobile platforms have been too fragmented and complex
to provide an attractive target. Existing modus
operandi from technology-related attacks can provide indicators
as to the types of attack and abuse that can be expected on
widgets and web applications as device APIs are opened up
and the size of the mobile market increases.
</p>
<div class="section" id="premium-rate-abuse">
<h3><span class="secno">A.1 </span>Premium Rate Abuse</h3>
<p>A widget that seems benign but is actually spewing out
SMSs to premium rate numbers without the user’s
knowledge. This could be modified from an original safe
widget such as a game. For the malware author, the key
piece to solve is to dupe the user into thinking that the
SMS capability is something that is part of the original
application. Examples of this have been seen in the past,
created from games and this model could be used for
‘dialers’ too (which plagued the desktop world in the
days of dial-up networking). There have been recent
warnings about this kind of abuse from security firms.
</p>
</div> <!-- premium rate Abuse -->
<div class="section" id="privacy-breach">
<h3><span class="secno">A.2 </span>Privacy Breach</h3>
<p>An application that gains access to locations, contacts
and gallery, silently uploading the data in the background
to a site owned by the attacker. This is something that
has been a clear goal for attackers already. There have
been numerous high-profile examples in the past in the
mobile world. Celebrities such as Paris Hilton, Miley
Cyrus and Lindsay Lohan have all had private pictures,
phone numbers and voicemails stolen from devices or
networks in clear breach of their privacy. There has been
embarrassment for teachers who had their pictures and
videos copied by the children in their class and spread
around school. The most high-profile case in the UK of a
mobile related privacy breach was that of the News of the
World's use of voicemail hacking to gain access to private
information about Royalty. The Royal editor, Clive Goodman
was jailed for four months and the editor, Andy Coulson
resigned over this blatant privacy breach. Given the
appetite for breaching privacy, users need to be safe in
the knowledge that their personal data will not leak in
any way.
</p>
<p>
Another example is turning on the camera or audio remotely to obtain
audio, video or photo information without permission.
</p>
</div> <!-- privacy-breach -->
<div class="section" id="integrity-breach">
<h3><span class="secno">A.3 </span>Integrity Breach</h3>
<p>A widget that replaces the voicemail number with a
premium rate number instead? There are number of reasons
why an attacker would want to breach the integrity of
the device. Simply changing the telephone number of the
voicemail that is stored on the device could be enough
to make an attacker a lot of money. Users usually have a
shortcut key to their voicemail and may not notice for a
long time that anything is wrong. A more sinister use
could be to plant evidence on a device. Pictures, files
and even criminal contacts could potentially be
anonymously planted all without the user's consent or
knowledge. Proving innocence could suddenly become very
difficult.
There are also a number of reasons why somebody would want to steal
data. The contents of corporate e-mails would be very
interesting to a competitor, as would sabotaging data
stored in spreadsheets and presentations on the target
phone.
</p>
</div> <!-- integrity-breach -->
<div class="section" id="phishing">
<h3><span class="secno">A.4 </span>Phishing</h3>
<p>
Widgets contain web content making it is easy to duplicate
and masquerade as something legitimate… perhaps a bank?
</p>
<p>
In January 2010, Google removed a number of applications
from the Android Market which were supposed to be banking
applications for a number of different banks worldwide. It
is unclear whether these applications were intentional
phishing applications. The removal was based on a breach
of terms and conditions surrounding copyright. The episode
however highlighted the phishing potential. Widgets
contain web content, therefore it is very easy to
duplicate the look and feel of something that the user
trusts and proceed to abuse that trust either by stealing
credentials or by manipulating money transfers.
</p>
<p>
These are of course just examples to consider in relation to how we
would manage the policies for device APIs and are of course not
exhaustive. Alongside the device-API specific examples
above, we still
need to consider traditional web threats which pose a
significant risk
and lots of other types of attack which should be considered in a
formal threat model.
</p>
</div> <!-- phishing -->
</div> <!-- threats -->
<div id="acknowledgements" class="appendix section">
<!--OddPage--><h2><span class="secno">B. </span>Acknowledgements</h2>
<p>
The editors would like to extend special thanks to Nokia, OMTP
BONDI, and PhoneGap for providing
the foundation of the working group's requirements discussion.
</p>
</div>
<div class="appendix section" id="references"><!--OddPage--><h2><span class="secno">C. </span>References</h2><div class="section" id="normative-references"><h3><span class="secno">C.1 </span>Normative references</h3><p>No normative references.</p></div><div class="section" id="informative-references"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-CONTACTS-API">[CONTACTS-API]</dt><dd>R. Tibbett. <a href="http://dev.w3.org/2009/dap/contacts/Overview.html"><cite>Contacts API</cite></a>. 3rd August 2010. W3C Latest Editor's Draft. (Work in progress.) URL: <a href="http://dev.w3.org/2009/dap/contacts/Overview.html">http://dev.w3.org/2009/dap/contacts/Overview.html</a>
</dd><dt id="bib-DAP-PRIVACY-REQS">[DAP-PRIVACY-REQS]</dt><dd>L. Arribas, P. Byers, M. Hanclik, F Hirsch, D. Rogers. <a href="http://dev.w3.org/2009/dap/privacy-reqs/"><cite>Device API Privacy Requirements</cite></a> 17 June 2010. (Work in progress.) URL: <a href="http://dev.w3.org/2009/dap/privacy-reqs/">http://dev.w3.org/2009/dap/privacy-reqs/</a>
</dd><dt id="bib-GEOLOCATION-API">[GEOLOCATION-API]</dt><dd>Andrei Popescu. <a href="http://www.w3.org/TR/2008/WD-geolocation-API-20081222"><cite>Geolocation API Specification.</cite></a> 22 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-geolocation-API-20081222">http://www.w3.org/TR/2008/WD-geolocation-API-20081222</a>
</dd><dt id="bib-SYSINFOAPI">[SYSINFOAPI]</dt><dd>Dzung Tran, Max Froumentin, eds. <a href="http://www.w3.org/TR/2010/WD-system-info-api-20100202/"><cite>The System Information API</cite>, 2 February 2010, W3C Working Draft. (Work in Progess.) URL: </a><a href="http://www.w3.org/TR/2010/WD-system-info-api-20100202/">http://www.w3.org/TR/2010/WD-system-info-api-20100202/</a>
</dd><dt id="bib-WIDGETS">[WIDGETS]</dt><dd>Marcos Caceres. <a href="http://www.w3.org/TR/2009/CR-widgets-20091201/"><cite>Widget Packaging and Configuration.</cite></a> 01 December 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2009/CR-widgets-20091201/">http://www.w3.org/TR/2009/CR-widgets-20091201/</a>
</dd></dl></div></div></body></html>