summaryrefslogtreecommitdiffstats
path: root/components/onc/docs/onc_spec.html
blob: 56caf142d2a25b2699d5584897a7120a6320b3f4 (plain)
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
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="onc_spec.css" >
  <script src="onc_spec.js"></script>
  <title>Open Network Configuration Format</title>
</head>
<body>

<section id="root" class="not_in_toc">
  <h1>Open Network Configuration Format</h1>

<section class="not_in_toc">
  <h1>Outline</h1>
  <div id="outline"></div>
</section>

<section>
  <h1>Objective</h1>
  <p>
    We would like to create a simple, open, but complete format to describe
    multiple network configurations for WiFi, Ethernet, Cellular,
    Bluetooth/WiFi-Direct, and VPN connections in a single file format, in order
    to simplify and automate network configuration for users.
  </p>
</section>

<section>
  <h1>Background</h1>
  <p>
    Configuring networks is a painful and error-prone experience for users. It
    is a problem shared across desktop, laptop, tablet, and phone users of all
    operating system types. It is exacerbated in business and schools which
    often have complex network configurations (VPNs and 802.1X networking) that
    change often and have many connected devices. Configuration of WiFi is
    still done manually, often by administrators physically standing next to
    users working on devices. Certificate distribution is particularly painful
    which often results in admins instead using passphrases to protect networks
    or using protocols without client certificates that instead use LDAP
    passwords for authentication. Even after networks are configured, updates to
    the network configuration require another round of manual changes, and
    accidental changes by a user or malicious changes by an attacker can break
    connectivity or make connections less private or secure.
  </p>

<section>
  <h1>Overview</h1>
  <p>
    We propose a single-file format for network configuration that is
    human-readable, can describe all of the common kinds of network
    configurations, supports integrity checking, certificate and key
    provisioning, and updating. The file can be encrypted with a single
    passphrase so that upon entering the passphrase the entire configuration is
    loaded. The format can be described as an open format to enable multiple OS
    vendors to interoperate and share configuration editors.
  </p>

  <p>
    This format neither supports configuring browser settings nor allows setting
    other types of system policies.
  </p>
</section>

<section>
  <h1>Infrastructure</h1>
  <p>
    A standalone configuration editor will be created, downloadable as a Chrome
    app. This editor will allow creating, modifying, and encrypting an open
    network configuration file in a way that is intuitive for a system
    administrator.
  </p>

  <p>
    This file format may be delivered to a user and manually imported into a
    device.
  </p>

  <p>
    This file format may be created by an administrator, stored in a policy
    repository, and automatically pushed to a device.
  </p>
</section>

</section>

<section>
  <h1>Detailed Design</h1>
  <p>
    We use JSON format for the files. The fields in a JSON file are always
    case-sensitive, so the exact case of the fields in this section must be
    matched. In addition, the values that are called out as explicit constants
    must also match the case specified (e.g. WiFi must not be written as wifi,
    etc.). This document describes a minimum set of required fields and optional
    fields. Other fields may be created, however, see the
    implementation-specific fields for guidelines for these fields.
  </p>

  <p>
    The JSON consists of a top level dictionary containing
    a <span class="field">Type</span> field which must have either the
    value <span class="value">EncryptedConfiguration</span>
    or <span class="value">UnencryptedConfiguration</span>.
  </p>

  <p>
    For a description of the <span class="type">EncryptedConfiguration</span>
    type, see the section on Encrypted Configuration
    below. The <span class="type">EncryptedConfiguration</span> format encrypts
    an unencrypted JSON object.
  </p>

<section>
  <h1>GUIDs and Updating</h1>
  <p>
    This format allows for importing updated network configurations and
    certificates by providing GUIDs to each network configuration and
    certificate so they can be modified or even removed in future updates.
  </p>

  <p>
    GUIDs are non-empty strings that are meant to be stable and unique. When
    they refer to the same entity, they should be the same between ONC files. No
    two different networks or certificates should have the same GUID, similarly
    a network and certificate should not have the same GUID. A single ONC file
    should not contain the same entity twice (with the same GUID). Failing any
    of these tests indicates the ONC file is not valid.
  </p>

  <p>
    Any GUID referred to in an ONC file must be present in the same ONC file. In
    particular, it is an error to create a certificate in one ONC file and refer
    to it in a NetworkConfiguration in another ONC file and not define it there,
    even if the previous ONC file has been imported.
  </p>
</section>

<section>
  <h1>Implementation-specific fields</h1>
  <p>
    As there are many different kinds of connections and some that are not yet
    anticipated may require new fields. This format allows arbitrary other
    fields to be added.
  </p>

  <p>
    Fields and values should follow these general guidelines:
  </p>

  <ul>
    <li>
      Certificates (with and without keys) should always be placed in the
      certificate section - specifically certificate contents should not be
      placed in fields directly. Referring to certificates should be done using
      a field whose name ends in Ref and whose value is the GUID of the
      certificate, or if the certificate is not contained in this file, its
      pattern can be described using a field ending in Pattern of
      <span class="type">CertificatePattern</span> type.
    </li>
    <li>
      Fields should exist in the most-specific object in the hierarchy and
      should be named CamelCase style.
    </li>
    <li>
      Booleans and integers should be used directly instead of using a
      stringified version of the type.
    </li>
  </ul>

  <p>
    Any editor of network configuration information should allows the user to
    modify any fields that are implementation-specific. It may not be present
    directly in the UI but it should be able to import files with such settings
    and leave preserve these settings on export.
  </p>
</section>

<section>
  <h1>Unencrypted Configuration</h1>
  <p>
    When the top level <span class="field">Type</span> field
    is <span class="value">UnencryptedConfiguration</span>, the top level JSON
    has the <span class="type">UnencryptedConfiguration</span>
    type. <span class="type">UnencryptedConfiguration</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">UnencryptedConfiguration
         </span>)
        <span class="type">string</span>
      </span>
      Must be <span class="value">UnencryptedConfiguration</span>.
    </dd>

    <dt class="field">NetworkConfigurations</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of NetworkConfiguration</span>
      </span>
      Describes WiFi, Ethernet, VPN, and wireless connections.
    </dd>

    <dt class="field">Certificates</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of Certificate</span>
      </span>
      Contains certificates stored in X.509 or PKCS#12 format.
    </dd>
  </dl>

  At least one actual configuration field
  (<span class="field">NetworkConfigurations</span> or
   <span class="field">Certificates</span>) should be present, however it should
  not be considered an error if no such field is present.

<section>
  <h1>Network Configuration</h1>
  <p>
    Field <span class="field">NetworkConfigurations</span> is an array
    of <span class="type">NetworkConfiguration</span> typed
    objects. The <span class="type">NetworkConfiguration</span> type contains
    the following:
  </p>

  <dl class="field_list">
    <dt class="field">Ethernet</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">Ethernet</span>, otherwise ignored)
        <span class="type">Ethernet</span>
      </span>
      Ethernet settings.
    </dd>

    <dt class="field">GUID</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      A unique identifier for this network connection, which exists to make it
      possible to update previously imported configurations. Must be a non-empty
      string.
    </dd>

    <dt class="field">IPAddressConfigType</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored. Defaults to
        <span class="value">DHCP</span> if
        <span class="field">NameServersConfigType</span> is specified)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">DHCP</span> and
        <span class="value">Static</span>.
      </span>
      Determines whether the IP Address configuration is statically configured,
      see <span class="field">StaticIPConfig</span>, or automatically configured
      using DHCP.
    </dd>

    <dt class="field">NameServersConfigType</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored. Defaults to
        <span class="value">DHCP</span> if
        <span class="field">IPAddressConfigType</span> is specified)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">DHCP</span> and
        <span class="value">Static</span>.
      </span>
      Determines whether the NameServers configuration is statically configured,
      see <span class="field">StaticIPConfig</span>, or automatically configured
      using DHCP.
    </dd>

    <dt class="field">IPConfigs</dt>
    <dd>
      <span class="field_meta">
        (optional for connected networks, read-only)
        <span class="type">array of IPConfig</span>
      </span>
      Array of IPConfig properties associated with this connection.
    </dd>

    <dt class="field">StaticIPConfig</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">IPAddressConfigType</span> or
        <span class="field">NameServersConfigType</span> is set to
        <span class="value">Static</span>)
        <span class="type">IPConfig</span>
      </span>
      Each property set in this IPConfig object overrides the respective
      parameter received over DHCP.
      If <span class="field">IPAddressConfigType</span> is set to
      <span class="value">Static</span>, <span class="field">IPAddress</span>
      and <span class="field">Gateway</span> are required.
      If <span class="field">NameServersConfigType</span> is set to
      <span class="value">Static</span>, <span class="field">NameServers</span>
      is required.
    </dd>

    <dt class="field">SavedIPConfig</dt>
    <dd>
      <span class="field_meta">
        (optional for connected networks, read-only)
        <span class="type">IPConfig</span>
      </span>
      IPConfig property containing the configuration that was received from the
      DHCP server prior to applying any StaticIPConfig parameters.
    </dd>

    <dt class="field">Name</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      A user-friendly description of this connection. This name will not be used
      for referencing and may not be unique. Instead it may be used for
      describing the network to the user.
    </dd>

    <dt class="field">Remove</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      If set, remove this network configuration (only GUID should be set).
    </dd>

    <dt class="field">ProxySettings</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored)
        <span class="type">ProxySettings</span>
      </span>
      Proxy settings for this network
    </dd>

    <dt class="field">VPN</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">VPN</span>, otherwise ignored)
        <span class="type">VPN</span>
      </span>
      VPN settings.
    </dd>

    <dt class="field">WiFi</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">WiFi</span>, otherwise ignored)
        <span class="type">WiFi</span>
      </span>
      WiFi settings.
    </dd>

    <dt class="field">WiMAX</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">WiMAX</span>, otherwise ignored)
        <span class="type">WiMAX</span>
      </span>
      WiMAX settings.
    </dd>

    <dt class="field">Cellular</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">Cellular</span>, otherwise ignored)
        <span class="type">Cellular</span>
      </span>
      Cellular settings.
    </dd>

    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Cellular</span>,
        <span class="value">Ethernet</span>, <span class="value">WiFi</span>,
        <span class="value">Cellular</span> and <span class="value">VPN</span>.
      </span>
      Indicates which kind of connection this is.
    </dd>

    <dt class="field">ConnectionState</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">string</span>
      </span>
      The current connection state for this network, provided by the system.
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are:
        <span class="value">Connected</span>,
        <span class="value">Connecting</span>,
        <span class="value">NotConnected</span>
      </span>
    </dd>

    <dt class="field">RestrictedConnectivity</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>, read-only)
        <span class="type">boolean</span>
      </span>
      True if a connnected network has limited connectivity to the Internet,
      e.g. a connection is behind a portal or a cellular network is not
      activated or requires payment.
    </dd>

    <dt class="field">Connectable</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">boolean</span>
      </span>
      True if the system indicates that the network can be connected to without
      any additional configuration.
    </dd>

    <dt class="field">ErrorState</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">string</span>
      </span>
      The current error state for this network, if any. Error states are
      provided by the system and are not explicitly defined here. They may or
      may not be human-readable. This field will be empty or absent if the
      network is not in an error state.
    </dd>

    <dt class="field">MacAddress</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">string</span>
      </span>
      The MAC address for the network. Only applies to connected non-virtual
      networks. The format is 00:11:22:AA:BB:CC.
    </dd>

    <dt class="field">Source</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">string</span>
      </span>
      Indicates whether the network is configured and how it is configured:
      <ul>
        <li><span class="value">User</span>: Configured for the active
          user only, i.e. an unshared configuration.</li>
        <li><span class="value">Device</span>: Configured for all users of the
          device (e.g laptop), i.e. a shared configuration.</li>
        <li><span class="value">UserPolicy</span>: Configured by the user
          policy for the active user.</li>
        <li><span class="value">DevicePolicy</span>: Configured by the device
          policy for the device.</li>
        <li><span class="value">None</span>: Not configured, e.g. a visible
          but unconfigured WiFi network.</li>
      </ul>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are:
        <span class="value">User</span>,
        <span class="value">Device</span>,
        <span class="value">UserPolicy</span>,
        <span class="value">DevicePolicy</span>,
        <span class="value">None</span>
      </span>
    </dd>

    <dt class="field">Priority</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">integer</span>
      </span>
      Provides a suggested priority value for this network. May be used by the
      system to determine which network to connect to when multiple configured
      networks are available (or may be ignored).
    </dd>

  </dl>

<section>
  <h1>Ethernet networks</h1>
  <p>
    For Ethernet connections, <span class="field">Type</span> must be set to
    <span class="value">Ethernet</span> and the
    field <span class="field">Ethernet</span> must be set to an object of
    type <span class="type">Ethernet</span> containing the following fields:
  </p>

  <dl class="field_list">
    <dt class="field">Authentication</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">None</span> and
        <span class="value">8021X</span>.
      </span>
    </dd>

    <dt class="field">EAP</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Authentication</span> is
        <span class="value">8021X</span>, otherwise ignored)
        <span class="type">EAP</span>
      </span>
      EAP settings.
    </dd>
  </dl>
</section>

<section>
  <h1>IPConfig</h1>
  <p>
    Objects of type <span class="type">IPConfig</span> are used to report the
    actual IP configuration of a connected network (see
    <span class="field">IPConfigs</span>), the IP configuration received from
    DHCP (see <span class="field">SavedIPConfig</span>) and to configure a 
    static IP configuration (see <span class="field">StaticIPConfig</span>).
  </p>

  <dl class="field_list">
    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">IPv4</span>
        and <span class="value">IPv6</span>
      </span>
      Describes the type of configuration this is.
    </dd>

    <dt class="field">IPAddress</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Describes the IPv4 or IPv6 address of a connection, depending on the value
      of <span class="field">Type</span> field. It should not contain the
      routing prefix (i.e. should not end in something like /64).
    </dd>

    <dt class="field">RoutingPrefix</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">IPAddress</span> is set. Otherwise
        ignored.)
        <span class="type">integer</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Must be a number in the range [1, 32] for IPv4 and [1, 128] for IPv6
        addresses.
      </span>
      Describes the routing prefix.
    </dd>

    <dt class="field">Gateway</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">IPAddress</span> is set. Otherwise
        ignored.)
        <span class="type">string</span>
      </span>
      Describes the gateway address to use for the configuration. Must match
      address type specified in <span class="field">Type</span> field. If not
      specified, DHCP values will be used.
    </dd>

    <dt class="field">NameServers</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      Array of addresses to use for name servers. Address format must match that
      specified in the <span class="field">Type</span> field. If not specified,
      DHCP values will be used.
    </dd>

    <dt class="field">SearchDomains</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      Array of strings to append to names for resolution. Items in this array
      should not start with a dot. Example: <span class="snippet">[
      "corp.acme.org", "acme.org" ]</span>. If not specified, DHCP values will
      be used.
    </dd>

    <dt class="field">WebProxyAutoDiscoveryUrl</dt>
    <dd>
      <span class="field_meta">
        (optional if part of <span class="field">IPConfigs</span>, read-only)
        <span class="type">string</span>
      </span>
      The Web Proxy Auto-Discovery URL for this network as reported over DHCP.
    </dd>

  </dl>
</section>

<section>
  <h1>WiFi networks</h1>
  <p>
    For WiFi connections, <span class="field">Type</span> must be set to
    <span class="value">WiFi</span> and the
    field <span class="field">WiFi</span> must be set to an object of
    type <span class="type">WiFi</span> containing the following fields:
  </p>

  <dl class="field_list">
    <dt class="field">AllowGatewayARPPolling</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">true</span>)
        <span class="type">boolean</span>
      </span>
      Indicaties if ARP polling of default gateway is allowed.
      When it is allowed, periodic ARP messages will be sent to
      the default gateway. This is used for monitoring the status
      of the current connection.
    </dd>

    <dt class="field">AutoConnect</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicating that the network should be connected to automatically when in
      range.
    </dd>

    <dt class="field">EAP</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Security</span> is
        <span class="value">WEP-8021X</span> or
        <span class="value">WPA-EAP</span>, otherwise ignored)
        <span class="type">EAP</span>
      </span>
      EAP settings.
    </dd>

    <dt class="field">HexSSID</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">SSID</span> is set, if so defaults to
        a hex representation of <span class="field">SSID</span>)
        <span class="type">string</span>
      </span>
      Hex representation of the network's SSID.
    </dd>

    <dt class="field">HiddenSSID</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicating if the SSID will be broadcast.
    </dd>

    <dt class="field">Passphrase</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Security</span> is
        <span class="value">WEP-PSK</span> or
        <span class="value">WPA-PSK</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      Describes the passphrase for WEP/WPA/WPA2
      connections. If <span class="value">WEP-PSK</span> is used, the passphrase
      must be of the format 0x&lt;hex-number&gt;, where &lt;hex-number&gt; is
      40, 104, 128, or 232 bits.
    </dd>

    <dt class="field">RoamThreshold</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">integer</span>
      </span>
      The roam threshold for this network, which is the signal-to-noise value
      (in dB) below which we will attempt to roam to a new network. If this
      value is not set, the default value will be used.
    </dd>

    <dt class="field">Security</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">None</span>,
        <span class="value">WEP-PSK</span>,
        <span class="value">WEP-8021X</span>,
        <span class="value">WPA-PSK</span>, and
        <span class="value">WPA-EAP</span>.
      </span>
    </dd>

    <dt class="field">SSID</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">HexSSID</span> is set, otherwise
        ignored)
        <span class="type">string</span>
      </span>
      Property to access the decoded SSID of a network.<br/>
      If this field is set, but <span class="field">HexSSID</span> is not,
      its value will be UTF-8 encoded and the hex representation will be
      assigned to <span class="field">HexSSID</span>. To configure a non-UTF-8
      SSID, field <span class="field">HexSSID</span> must be used.<br/>
      When reading the configuration of a network, both this field and
      <span class="field">HexSSID</span> might be set. Then this field is the
      decoding of <span class="field">HexSSID</span>. If possible the HexSSID is
      decoded using UTF-8, otherwise an encoding is guessed on a best effort
      basis.
    </dd>

    <dt class="field">SignalStrength</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">integer</span>
      </span>
      The current signal strength for this network in the range [0, 100],
      provided by the system. If the network is not in range this field will
      be set to '0' or not present.
    </dd>
  </dl>
  <span class="rule">
    <span class="rule_id"></span>
      At least one of the fields <span class="field">HexSSID</span> or
      <span class="field">SSID</span> must be present. If both
      <span class="field">HexSSID</span> and <span class="field">SSID</span>
      are set, the values must be consistent.
    </span>
  </span>
</section>

<section>
  <h1>VPN networks</h1>
  <p>
    There are many kinds of VPNs with widely varying configuration options. We
    offer standard configuration options for a few common configurations at this
    time, and may add more later. For all others, implementation specific fields
    should be used.
  </p>

  <p>
    For VPN connections, <span class="field">Type</span> must be set
    to <span class="value">VPN</span> and the
    field <span class="field">VPN</span> must be set to an object of
    type <span class="type">VPN</span> containing the following fields:
  </p>

  <dl class="field_list">
    <dt class="field">AutoConnect</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicating that the network should be connected to automatically.
    </dd>

    <dt class="field">Host</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Host name or IP address of server to connect to. The only scenario that
      does not require a host is a VPN that encrypts but does not tunnel
      traffic. Standalone IPsec (v1 or v2, cert or PSK based -- this is not the
      same as L2TP over IPsec) is one such setup. For all other types of VPN,
      the <span class="field">Host</span> field is required.
    </dd>

    <dt class="field">IPsec</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">IPsec</span> or
        <span class="value">L2TP-IPsec</span>, otherwise ignored)
        <span class="type">IPsec</span>
      </span>
      IPsec layer settings.
    </dd>

    <dt class="field">L2TP</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">L2TP-IPsec</span>, otherwise ignored)
        <span class="type">L2TP</span>
      </span>
      L2TP layer settings.
    </dd>

    <dt class="field">OpenVPN</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">OpenVPN</span>, otherwise ignored)
        <span class="type">OpenVPN</span>
      </span>
      OpenVPN settings.
    </dd>

    <dt class="field">ThirdPartyVPN</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">ThirdPartyVPN</span>, otherwise ignored)
        <span class="type">ThirdPartyVPN</span>
      </span>
      Third-party VPN provider settings.
    </dd>

    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">IPsec</span>,
        <span class="value">L2TP-IPsec</span>,
        <span class="value">OpenVPN</span>, and
        <span class="value">ThirdPartyVPN</span>.
      </span>
      Type of the VPN.
    </dd>
  </dl>

  <section>
    <h1>IPsec-based VPN types</h1>
    <p>
      The <span class="type">IPsec</span> type contains the following:
    </p>

    <dl class="field_list">
      <dt class="field">AuthenticationType</dt>
      <dd>
        <span class="field_meta">
          (required)
          <span class="type">string</span>
        </span>
        <span class="rule">
          <span class="rule_id"></span>
          Allowed values are <span class="value">PSK</span> and
          <span class="value">Cert</span>. If <span class="value">Cert</span> is used, <span class="field">ClientCertType</span> and <span class="field">ServerCARefs</span> (or the deprecated <span class="field">ServerCARef</span>) must be set.
        </span>
      </dd>

      <dt class="field">ClientCertPattern</dt>
      <dd>
        <span class="field_meta">
          (required if <span class="field">ClientCertType</span>
          is <span class="value">Pattern</span>, otherwise ignored)
          <span class="type">CertificatePattern</span>
        </span>
        Pattern describing the client certificate.
      </dd>

      <dt class="field">ClientCertRef</dt>
      <dd>
        <span class="field_meta">
          (required if <span class="field">ClientCertType</span>
          is <span class="value">Ref</span>, otherwise ignored)
          <span class="type">string</span>
        </span>
        Reference to client certificate stored in certificate section.
      </dd>

      <dt class="field">ClientCertType</dt>
      <dd>
        <span class="field_meta">
          (required if <span class="field">AuthenticationType</span>
          is <span class="value">Cert</span>, otherwise ignored)
          <span class="type">string</span>
        </span>
        <span class="rule">
          <span class="rule_id"></span>
          Allowed values are <span class="value">Ref</span> and
          <span class="value">Pattern</span>
        </span>
      </dd>

      <dt class="field">EAP</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">IKEVersion</span> is 2, otherwise
          ignored)
          <span class="type">EAP</span>
        </span>
        Indicating that EAP authentication should be used with the provided
        parameters.
      </dd>

      <dt class="field">Group</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">IKEVersion</span> is 1, otherwise
          ignored)
          <span class="type">string</span>
        </span>
        Group name used for machine authentication.
      </dd>

      <dt class="field">IKEVersion</dt>
      <dd>
        <span class="field_meta">
          (required)
          <span class="type">integer</span>
        </span>
        Version of IKE protocol to use.
      </dd>

      <dt class="field">PSK</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">AuthenticationType</span>
          is <span class="value">PSK</span>, otherwise ignored)
          <span class="type">string</span>
        </span>
        Pre-Shared Key. If not specified, user is prompted at time of
        connection.
      </dd>

      <dt class="field">SaveCredentials</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">AuthenticationType</span>
          is <span class="value">PSK</span>, otherwise ignored, defaults
          to <span class="value">false</span>)
          <span class="type">boolean</span>
        </span>
        If <span class="value">false</span>, require user to enter credentials
        (PSK) each time they connect.
      </dd>

      <dt class="field">ServerCARefs</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">AuthenticationType</span>
          is <span class="value">Cert</span>, otherwise rejected)
          <span class="type">array of string</span>
        </span>
        Non-empty list of references to CA certificates in <span class="field">Certificates</span> to be used for verifying the host's certificate chain. At least one of the CA certificates must match. If this field is set, <span class="field">ServerCARef</span> must be unset.
      </dd>

      <dt class="field">ServerCARef</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">AuthenticationType</span>
          is <span class="value">Cert</span>, otherwise rejected)
          <span class="type">string</span>
        </span>
        DEPRECATED, use <span class="field">ServerCARefs</span> instead.<br/>
        Reference to a CA certificate in <span class="field">Certificates</span>. Certificate authority to use for verifying connection. If this field is set, <span class="field">ServerCARefs</span> must be unset.
      </dd>

      <dt class="field">XAUTH</dt>
      <dd>
        <span class="field_meta">
          (optional if <span class="field">IKEVersion</span> is 1, otherwise
          ignored)
          <span class="type">XAUTH</span>
        </span>
        Describing XAUTH credentials. XAUTH is not used if this object is not
        present.
      </dd>
    </dl>

    <p class="rule">
      <span class="rule_id"></span>
      If <span class="field">AuthenticationType</span> is set to <span class="value">Cert</span>, <span class="field">ServerCARefs</span> or <span class="field">ServerCARef</span> must be set.
    </p>

    <p class="rule">
      <span class="rule_id"></span>
      At most one of <span class="field">ServerCARefs</span> and <span class="field">ServerCARef</span> can be set.
    </p>

    <p>
      <span class="type">L2TP</span> type contains the following:
    </p>

    <dl class="field_list">
      <dt class="field">LcpEchoDisabled</dt>
      <dd>
        <span class="field_meta">
          (optional, defaults to <span class="value">false</span>)
          <span class="type">boolean</span>
        </span>
        Disable L2TP connection monitoring via PPP LCP frames.  This
        allows the VPN client to work around server implementations
        that do not support the LCP echo feature.
      </dd>

      <dt class="field">Password</dt>
      <dd>
        <span class="field_meta">
          (optional)
          <span class="type">string</span>
        </span>
        User authentication password. If not specified, user is prompted at time
        of connection.
      </dd>

      <dt class="field">SaveCredentials</dt>
      <dd>
        <span class="field_meta">
          (optional, defaults to <span class="value">false</span>)
          <span class="type">boolean</span>
        </span>
        If <span class="value">false</span>, require user to enter credentials
        each time they connect.
      </dd>

      <dt class="field">Username</dt>
      <dd>
        <span class="field_meta">
          (optional)
          <span class="type">string</span>
        </span>
        User identity. This value is subject to string expansions. If not
        specified, user is prompted at time of connection.
      </dd>
    </dl>

    <p>
      <span class="type">XAUTH</span> type contains the following:
    </p>

    <dl class="field_list">
      <dt class="field">Password</dt>
      <dd>
        <span class="field_meta">
          (optional)
          <span class="type">string</span>
        </span>
        XAUTH password. If not specified, user is prompted at time of
        connection.
      </dd>

      <dt class="field">SaveCredentials</dt>
      <dd>
        <span class="field_meta">
          (optional, defaults to <span class="value">false</span>)
          <span class="type">boolean</span>
        </span>
        If <span class="value">false</span>, require user to enter credentials
        each time they connect.
      </dd>

      <dt class="field">Username</dt>
      <dd>
        <span class="field_meta">
          (optional)
          <span class="type">string</span>
        </span>
        XAUTH user name. This value is subject to string expansions. If not
        specified, user is prompted at time of connection.
      </dd>
    </dl>

<section>
  <h1>IPsec IKE v1 VPN connections</h1>
  <p>
    <span class="field">VPN.Type</span> must
    be <span class="value">IPsec</span>, <span class="field">IKEVersion</span>
    must be 1. Do not use this for L2TP over IPsec. This may be used for
    machine-authentication-only IKEv1 or for IKEv1 with XAUTH. See
    the <span class="type">IPsec</span> type described below.
  </p>
</section>

<section>
  <h1>IPsec IKE v2 VPN connections</h1>
  <p>
    <span class="field">VPN.Type</span> must
    be <span class="value">IPsec</span>, <span class="field">IKEVersion</span>
    must be 2. This may be used with EAP-based user authentication.
  </p>
</section>

<section>
  <h1>L2TP over IPsec VPN connections</h1>
  <p>
    There are two major configurations L2TP over IPsec which depend on how IPsec
    is authenticated. In either case <span class="field">Type</span> must be
    <span class="value">L2TP-IPsec</span>. They are described below.
  </p>

  <p>
    L2TP over IPsec with pre-shared key:
  </p>

  <ul>
    <li>The field <span class="field">IPsec</span> must be present and have the
    following settings:
      <ul>
        <li><span class="field">IKEVersion</span> must be 1.</li>
        <li><span class="field">AuthenticationType</span> must be PSK.</li>
        <li><span class="field">XAUTH</span> must not be set.</li>
      </ul>
    </li>
    <li>The field <span class="field">L2TP</span> must be present.</li>
  </ul>
</section>

</section>

<section>
  <h1>OpenVPN connections and types</h1>
  <p>
    <span class="field">VPN.Type</span> must be
    <span class="value">OpenVPN</span>.
  </p>

  <p>
    <span class="type">OpenVPN</span> type contains the following:
  </p>

  <dl class="field_list">
    <dt class="field">Auth</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">SHA1</span>)
        <span class="type">string</span>
      </span>
    </dd>

    <dt class="field">AuthRetry</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">none</span>)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">none</span>,
        <span class="value">nointeract</span>, and
        <span class="value">interact</span>.
      </span>
      Controls how OpenVPN responds to username/password verification
      errors:<br> Either fail with error on retry
      (<span class="value">none</span>), retry without asking for authentication
      (<span class="value">nointeract</span>), or ask again for authentication
      each time (<span class="value">interact</span>).
    </dd>

    <dt class="field">AuthNoCache</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Disable caching of credentials in memory.
    </dd>

    <dt class="field">Cipher</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">BF-CBC</span>)
        <span class="type">string</span>
      </span>
      Cipher to use.
    </dd>

    <dt class="field">ClientCertRef</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">ClientCertType</span> is
        <span class="value">Ref</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      Reference to client certificate stored in certificate section.
    </dd>

    <dt class="field">ClientCertPattern</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">ClientCertType</span> is
        <span class="value">Pattern</span>, otherwise ignored)
        <span class="type">CertificatePattern</span>
      </span>
      Pattern to use to find the client certificate.
    </dd>

    <dt class="field">ClientCertType</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Ref</span>,
        <span class="value">Pattern</span>, and <span class="value">None</span>.
      </span>
      <span class="value">None</span> implies that the server is configured to
      not require client certificates.
    </dd>

    <dt class="field">CompLZO</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">adaptive</span>)
        <span class="type">string</span>
      </span>
      Decides to fast LZO compression with <span class="value">true</span>
      and <span class="value">false</span> as other values.
    </dd>

    <dt class="field">CompNoAdapt</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Disables adaptive compression.
    </dd>

    <dt class="field">IgnoreDefaultRoute</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">bool</span>
      </span>
      Omits a default route to the VPN gateway while the connection is active.
      By default, the client creates a default route to the gateway address
      advertised by the VPN server.  Setting this value to
      <span class="value">true</span> will allow split tunnelling for
      configurations where the VPN server omits explicit default routes.
      This is roughly equivalent to omitting "redirect-gateway" OpenVPN client
      configuration option.  If the server pushes a "redirect-gateway"
      configuration flag to the client, this option is ignored.
    </dd>

    <dt class="field">KeyDirection</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Passed as --key-direction.
    </dd>

    <dt class="field">NsCertType</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      If set, checks peer certificate type. Should only be set
      to <span class="value">server</span> if set.
    </dd>

    <dt class="field">OTP</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">UserAuthenticationType</span> is
        <span class="value">OTP</span>,
        <span class="value">PasswordAndOTP</span> or unset, otherwise ignored,
        defaults to empty string)
        <span class="type">string</span>
      </span>
      If <span class="field">UserAuthenticationType</span> is
      <span class="value">OTP</span> or <span class="value">PasswordAndOTP</span>
      and this field is not set, the user will be asked for an OTP.
      The OTP is never persisted and must be provided on every connection
      attempt.
    </dd>

    <dt class="field">Password</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">UserAuthenticationType</span> is
        <span class="value">Password</span>,
        <span class="value">PasswordAndOTP</span> or unset, otherwise ignored,
        defaults to empty string)
        <span class="type">string</span>
      </span>
      If <span class="field">UserAuthenticationType</span> is
      <span class="value">Password</span> or
      <span class="value">PasswordAndOTP</span> and this field is not set, the user
      will be asked for a password.
      If <span class="field">SaveCredentials</span> is
      <span class="value">true</span>, the password is persisted for future
      connection attempts. Otherwise it is not persisted but might still be
      reused for consecutive connection attempts (opposed to an OTP, which will
      never be reused).
    </dd>

    <dt class="field">Port</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">1194</span>)
        <span class="type">integer</span>
      </span>
      Port for connecting to server.
    </dd>

    <dt class="field">Proto</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">udp</span>)
        <span class="type">string</span>
      </span>
      Protocol for communicating with server.
    </dd>

    <dt class="field">PushPeerInfo</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
    </dd>

    <dt class="field">RemoteCertEKU</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Require that the peer certificate was signed with this explicit extended
      key usage in oid notation.
    </dd>

    <dt class="field">RemoteCertKU</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to [])
        <span class="type">array of string</span>
      </span>
      Require the given array of key usage numbers. These are strings that are
      hex encoded numbers.
    </dd>

    <dt class="field">RemoteCertTLS</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">server</span>)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">none</span> and
        <span class="value">server</span>.
      </span>
      Require peer certificate signing based on RFC3280 TLS rules.
    </dd>

    <dt class="field">RenegSec</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">3600</span>)
        <span class="type">integer</span>
      </span>
      Renegotiate data channel key after this number of seconds.
    </dd>

    <dt class="field">SaveCredentials</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      If <span class="value">false</span>, require user to enter credentials
      each time they connect.
    </dd>

    <dt class="field">ServerCARefs</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      Non-empty list of references to CA certificates in <span class="field">Certificates</span> to be used for verifying the host's certificate chain. At least one of the CA certificates must match. See also OpenVPN's command line option "--ca". If this field is set, <span class="field">ServerCARef</span> must be unset.
    </dd>

    <dt class="field">ServerCARef</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      DEPRECATED, use <span class="field">ServerCARefs</span> instead.<br/>
      Reference to a CA certificate in <span class="field">Certificates</span>. Certificate authority to use for verifying connection. If this field is set, <span class="field">ServerCARefs</span> must be unset.
    </dd>

    <dt class="field">ServerCertRef</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Reference to a certificate. Peer's signed certificate.
    </dd>

    <dt class="field">ServerPollTimeout</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">integer</span>
      </span>
      Spend no more than this number of seconds before trying the next server.
    </dd>

    <dt class="field">Shaper</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">integer</span>
      </span>
      If not specified no bandwidth limiting, otherwise limit bandwidth of
      outgoing tunnel data to this number of bytes per second.
    </dd>

    <dt class="field">StaticChallenge</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      String is used in static challenge response. Note that echoing is always
      done.
    </dd>

    <dt class="field">TLSAuthContents</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      If not set, tls auth is not used. If set, this is the TLS Auth key
      contents (usually starts with "-----BEGIN OpenVPN Static Key..."
    </dd>

    <dt class="field">TLSRemote</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      If set, only allow connections to server hosts with X509 name or common
      name equal to this string.
    </dd>

    <dt class="field">UserAuthenticationType</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">None</span>)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">None</span>,
        <span class="value">Password</span>,
        <span class="value">PasswordAndOTP</span> and
        <span class="value">OTP</span>.
      </span>
      Determines the required form of user authentication:
      <ul><li>
        <span class="value">PasswordAndOTP</span>: This VPN requires a password
        and an OTP (possibly empty). Both will be send to the server in the
        'password' response using the SCRv1 encoding.
      </li><li>
        <span class="value">Password</span>: This VPN requires only a password,
        which will be send without modification to the server in the 'password'
        response (no CRv1 or SCRv1 encoding).
      </li><li>
        <span class="value">OTP</span>: This VPN requires only an OTP, which
        will be send without modification to the server in the 'password'
        response (no CRv1 or SCRv1 encoding).
      </li><li>
        <span class="value">None</span>: Neither password nor OTP are required.
        No password request from the server is expected.
      </li></ul>
      If not set, the user can provide a password and an OTP (both not
      mandatory) and the network manager will send both in the SCRv1 encoding,
      when the server sends a static-challenge. If the server does not send a
      static-challenge, the client will reply with only the password (without
      any encoding). This behavior is deprecated and new configurations should
      explicitly set one of the above values.

      See the fields <span class="field">Password</span> and
      <span class="field">OTP</span> for configuring the password and OTP.
    </dd>

    <dt class="field">Username</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      OpenVPN user name. This value is subject to string expansions. If not
      specified, user is prompted at time of connection.
    </dd>

    <dt class="field">Verb</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Verbosity level, defaults to OpenVpn's default if not specified.
    </dd>

    <dt class="field">VerifyHash</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      If set, this value is passed as the "--verify-hash" argument to OpenVPN,
      which specifies the SHA1 fingerprint for the level-1 certificate.
    </dd>

    <dt class="field">VerifyX509</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">VerifyX509</span>
      </span>
       If set, the "--verify-x509-name" argument is passed to OpenVPN with the values of this object and only connections will be accepted if a host's X.509 name is equal to the given name.
    </dd>
  </dl>

  <p class="rule">
    <span class="rule_id"></span>
    At most one of <span class="field">ServerCARefs</span> and <span class="field">ServerCARef</span> can be set.
  </p>

  <p>
    <span class="type">VerifyX509</span> type contains the following:
  </p>
  <dl class="field_list">
    <dt class="field">Name</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The name that the host's X.509 name is compared to. Which host name is compared depends on the value of <span class="field">Type</span>.
    </dd>

    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Determines which of the host's X.509 names will be verified. Allowed values are <span class="value">name</span>, <span class="value">name-prefix</span> and <span class="value">subject</span>. See OpenVPN's documentation for "--verify-x509-name" for the meaning of each value. Defaults to OpenVPN's default if not specified. 
    </dd>
  </dl>
</section>

<section>
  <h1>Third-party VPN provider based connections and types</h1>
  <p>
    <span class="field">VPN.Type</span> must be
    <span class="value">ThirdPartyVPN</span>.
  </p>

  <p>
    <span class="type">ThirdPartyVPN</span> type contains the following:
  </p>

  <dl class="field_list">
    <dt class="field">ExtensionID</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The extension ID of the third-party VPN provider used by this network.
    </dd>
  </dl>
</section>

</section>

<section>
  <h1>Client certificate patterns</h1>
  <p>
    In order to allow clients to securely key their private keys and request
    certificates through PKCS#10 format or through a web flow, we provide
    alternative CertificatePattern types. The
    <span class="type">CertificatePattern</span> type contains the following:
  </p>

  <dl class="field_list">
    <dt class="field">IssuerCARef</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      Array of references to certificates. At least one must have signed the
      client certificate.
    </dd>

    <dt class="field">Issuer</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">IssuerSubjectPattern</span>
      </span>
      Pattern to match the issuer X.509 settings against. If not specified, the
      only checks done will be a signature check against
      the <span class="field">IssuerCARef</span> field. Issuer of the
      certificate must match this field exactly to match the pattern.
    </dd>

    <dt class="field">Subject</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">IssuerSubjectPattern</span>
      </span>
      Pattern to match the subject X.509 settings against. If not specified, the
      subject settings are not checked and any certificate matches. Subject of
      the certificate must match this field exactly to match the pattern.
    </dd>

    <dt class="field">EnrollmentURI</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      If no certificate matches this CertificatePattern, the first URI from this
      array with a recognized scheme is navigated to, with the intention this
      informs the user how to either get the certificate or gets the certificate
      for the user. For instance, the array may be [
      "chrome-extension://asakgksjssjwwkeielsjs/fetch-client-cert.html",
      "http://intra/connecting-to-wireless.html" ] so that for Chrome browsers a
      Chrome app or extension is shown to the user, but for other browsers, a
      web URL is shown.
    </dd>
  </dl>

  <p>
    The <span class="type">IssuerSubjectPattern</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">CommonName</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Certificate subject's commonName must match this string if present.
    </dd>

    <dt class="field">Locality</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Certificate subject's location must match this string if present.
    </dd>

    <dt class="field">Organization</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      At least one of certificate subject's organizations must match this string
      if present.
    </dd>

    <dt class="field">OrganizationalUnit</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      At least one of certificate subject's organizational units must match this
      string if present.
    </dd>
  </dl>

  <p class="rule">
    <span class="rule_id"></span>
    One field in <span class="field">Subject</span>,
    <span class="field">Issuer</span>, or <span class="field">IssuerCARef</span>
    must be given for a <span class="type">CertificatePattern</span> typed field
    to be valid.
  </p>

  <p>
    For a certificate to be considered matching, it must match all
    the fields in the certificate pattern. If multiple certificates match, the
    certificate with the latest issue date that is still in the past, and hence
    valid, will be used.
  </p>

  <p>
    If <span class="field">EnrollmentURI</span> is not given and no match is
    found to this pattern, the importing tool may show an error to the user.
  </p>
</section>

<section>
  <h1>Proxy settings</h1>
  <p>
    Every network can be configured to use a
    proxy. The <span class="type">ProxySettings</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Direct</span>,
        <span class="value">Manual</span>, <span class="value">PAC</span>, and
        <span class="value">WPAD</span>.
      </span>
      <span class="value">PAC</span> indicates Proxy Auto-Configuration.
      <span class="value">WPAD</span> indicates Web Proxy Autodiscovery.
    </dd>

    <dt class="field">Manual</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span>
        is <span class="value">Manual</span>, otherwise ignored)
        <span class="type">ManualProxySettings</span>
      </span>
      Manual proxy settings.
    </dd>

    <dt class="field">ExcludeDomains</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Type</span>
        is <span class="value">Manual</span>, otherwise ignored)
        <span class="type">array of string</span>
      </span>
      Domains and hosts for which to exclude proxy settings.
    </dd>

    <dt class="field">PAC</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">PAC</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      URL of proxy auto-config file.
    </dd>
  </dl>

  <p>
    The <span class="type">ManualProxySettings</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">HTTPProxy</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">ProxyLocation</span>
      </span>
      settings for HTTP proxy.
    </dd>

    <dt class="field">SecureHTTPProxy</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">ProxyLocation</span>
      </span>
      settings for secure HTTP proxy.
    </dd>

    <dt class="field">FTPProxy</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">ProxyLocation</span>
      </span>
      settings for FTP proxy
    </dd>

    <dt class="field">SOCKS</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">ProxyLocation</span>
      </span>
      settings for SOCKS proxy.
    </dd>
  </dl>

  <p>
    The <span class="type">ProxyLocation</span> type contains the following:
  </p>

  <dl class="field_list">
    <dt class="field">Host</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      Host (or IP address) to use for proxy
    </dd>

    <dt class="field">Port</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">integer</span>
      </span>
      Port to use for proxy
    </dd>
  </dl>
</section>

<section>
  <h1>EAP configurations</h1>
  <p>
    For networks with 802.1X authentication, an <span class="type">EAP</span>
    type exists to configure the
    authentication. The <span class="type">EAP</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">AnonymousIdentity</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Outer</span> is
        <span class="value">PEAP</span> or <span class="value">EAP-TTLS</span>,
        otherwise ignored)
        <span class="type">string</span>
      </span>
      For tunnelling protocols only, this indicates the identity of the user
      presented to the outer protocol. This value is subject to string
      expansions. If not specified, use empty string.
    </dd>

    <dt class="field">ClientCertPattern</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">ClientCertType</span> is
        <span class="value">Pattern</span>, otherwise ignored)
        <span class="type">CertificatePattern</span>
      </span>
      Pattern to use to find the client certificate.
    </dd>

    <dt class="field">ClientCertRef</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">ClientCertType</span> is
        <span class="value">Ref</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      Reference to client certificate stored in certificate section.
    </dd>

    <dt class="field">ClientCertType</dt>
    <dd>
      <span class="field_meta">
        (optional) <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Ref</span>, and
        <span class="value">Pattern</span>.
      </span>
    </dd>

    <dt class="field">Identity</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Identity of user. For tunneling outer protocols
      (<span class="value">PEAP</span>, <span class="value">EAP-TTLS</span>, and
      <span class="value">EAP-FAST</span>), this is used to authenticate inside
      the tunnel, and <span class="field">AnonymousIdentity</span> is used for
      the EAP identity outside the tunnel. For non-tunneling outer protocols,
      this is used for the EAP identity. This value is subject to string
      expansions.
    </dd>

    <dt class="field">Inner</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Outer</span> is
        <span class="value">EAP-FAST</span>, <span class="value">EAP-TTLS</span>
        or <span class="value">PEAP</span>, otherwise ignored, defaults to
        <span class="value">Automatic</span>)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Automatic</span>,
        <span class="value">MD5</span>, <span class="value">MSCHAPv2</span>,
        <span class="value">EAP-MSCHAPv2</span>,
        <span class="value">PAP</span>, and <span class="value">GTC</span>.
      </span>
      For tunneling outer protocols.
    </dd>

    <dt class="field">Outer</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">LEAP</span>,
        <span class="value">EAP-AKA</span>, <span class="value">EAP-FAST</span>,
        <span class="value">EAP-TLS</span>, <span class="value">EAP-TTLS</span>,
        <span class="value">EAP-SIM</span> and <span class="value">PEAP</span>.
      </span>
    </dd>

    <dt class="field">Password</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      Password of user. If not specified, defaults to prompting the user.
    </dd>

    <dt class="field">SaveCredentials</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      If <span class="value">false</span>, require user to enter credentials
      each time they connect. Specifying <span class="field">Identity</span>
      and/or <span class="field">Password</span> when
      <span class="field">SaveCredentials</span> is
      <span class="value">false</span> is not allowed.
    </dd>

    <dt class="field">ServerCARefs</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">array of string</span>
      </span>
      Non-empty list of references to CA certificates in <span class="field">Certificates</span> to be used for verifying the host's certificate chain. At least one of the CA certificates must match. If this field is set, <span class="field">ServerCARef</span> must be unset. If neither <span class="field">ServerCARefs</span> nor <span class="field">ServerCARef</span> is set, the client does not check that the server certificate is signed by a specific CA. A verification using the system's CA certificates may still apply. See <span class="field">UseSystemCAs</span> for this.
    </dd>

    <dt class="field">ServerCARef</dt>
    <dd>
      <span class="field_meta">
        (optional)
        <span class="type">string</span>
      </span>
      DEPRECATED, use <span class="field">ServerCARefs</span> instead.<br/>
      Reference to a CA certificate in <span class="field">Certificates</span>. If this field is set, <span class="field">ServerCARefs</span> must be unset. If neither <span class="field">ServerCARefs</span> nor <span class="field">ServerCARef</span> is set, the client does not check that the server certificate is signed by a specific CA. A verification using the system's CA certificates may still apply. See <span class="field">UseSystemCAs</span> for this.
    </dd>

    <dt class="field">UseSystemCAs</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">true</span>)
        <span class="type">boolean</span>
      </span>
      Required server certificate to be signed by "system default certificate
      authorities". If both <span class="field">ServerCARefs</span> (or <span class="field">ServerCARef</span>)
      and <span class="field">UseSystemCAs</span> are supplied, a server
      certificate will be allowed if it either has a chain of trust to a system
      CA or to one of the given CA certificates. If <span class="field">UseSystemCAs</span>
      is <span class="value">false</span>, and no <span class="field">ServerCARef</span> is set, the certificate
      must be a self signed certificate, and no CA signature is required.
    </dd>

    <dt class="field">UseProactiveKeyCaching</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicates whether Proactive Key Caching (also known as Opportunistic
      Key Caching) should be used on a per-service basis.
    </dd>
  </dl>

  <p class="rule">
    <span class="rule_id"></span>
    At most one of <span class="field">ServerCARefs</span> and <span class="field">ServerCARef</span> can be set.
  </p>
</section>

<section>
  <h1>WiMAX Networks</h1>
  <p>
    For WiMAX connections, <span class="field">Type</span> must be set to
    <span class="value">WiMAX</span> and the
    field <span class="field">WiMAX</span> must be set to an object of
    type <span class="type">WiMAX</span>. Currently only used for
    representing an existing configuration; ONC configuration of
    of <span class="field">WiMAX</span> networks is not yet fully supported.
    Contains the following fields:
  </p>

  <dl class="field_list">
    <dt class="field">AutoConnect</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicating that the network should be connected to automatically when
      possible.
    </dd>

    <dt class="field">EAP</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">EAP</span>
      </span>
      EAP settings.
    </dd>

    <dt class="field">SignalStrength</dt>
    <dd>
      <span class="field_meta">
        (optional, read-only)
        <span class="type">integer</span>
      </span>
      The current signal strength for this network in the range [0, 100],
      provided by the system. If the network is not in range this field will
      be set to '0' or not present.
    </dd>
  </dl>

</section>

<section>
  <h1>Cellular Networks</h1>
  <p>
    For Cellular connections, <span class="field">Type</span> must be set to
    <span class="value">Cellular</span> and the
    field <span class="field">Cellular</span> must be set to an object of
    type <span class="type">Cellular</span>. Currently only used for
    representing an existing configuration; ONC configuration of
    of <span class="field">Cellular</span> networks is not yet supported.
    Contains the following fields:
  </p>

  <dl class="field_list">
    <dt class="field">AutoConnect</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      Indicating that the network should be connected to automatically when
      possible. Note, that disabled <span class="field">AllowRoaming</span>
      takes precedence over autoconnect.
    </dd>

    <dt class="field">APN</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">APN</span>
      </span>
      Currently active  <span class="type">APN</span> object to be used with a
      GSM carrier for making data connections.
    </dd>

    <dt class="field">APNList</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">array of APN</span>
      </span>
      List of available APN configurations.
    </dd>

    <dt class="field">ActivationType</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Activation type.
    </dd>

    <dt class="field">ActivationState</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      Carrier account activation state.
      <span class="rule">
        <span class="rule_id"></span>Allowed values are
        <span class="value">Activated</span>,
        <span class="value">Activating</span>,
        <span class="value">NotActivated</span>,
        <span class="value">PartiallyActivated</span>
      </span>
    </dd>

    <dt class="field">AllowRoaming</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">boolean</span>
      </span>
      Whether cellular data connections are allowed when the device is roaming.
    </dd>

    <dt class="field">Carrier</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The name of the carrier for which the device is configured.
    </dd>

    <dt class="field">ESN</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The Electronic Serial Number of the cellular modem.
    </dd>

    <dt class="field">Family</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      Technology family.
      <span class="rule"><span class="rule_id"></span>
        Allowed values are
        <span class="value">CDMA</span>,
        <span class="value">GSM</span>
      </span>
    </dd>

    <dt class="field">FirmwareRevision</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The revision of firmware that is loaded in the modem.
    </dd>

    <dt class="field">FoundNetworks</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>)
        <span class="type">array of FoundNetwork</span>
      </span>
      The list of cellular netwoks found in the most recent scan operation.
    </dd>

    <dt class="field">HardwareRevision</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The hardware revision of the cellular modem.
    </dd>

    <dt class="field">HomeProvider</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">array of CellularProvider</span>
      </span>
      Description of the operator that issued the SIM card currently installed
      in the modem.
    </dd>

    <dt class="field">ICCID</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>
        or <span class="field">NetworkTechnology</span>
        is <span class="value">LTE</span>)
        <span class="type">string</span>
      </span>
      For GSM / LTE modems, the Integrated Circuit Card Identifer of the SIM
      card installed in the device.
    </dd>

    <dt class="field">IMEI</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The International Mobile Equipment Identity of the cellular modem.
    </dd>

    <dt class="field">IMSI</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>)
        <span class="type">string</span>
      </span>
      For GSM modems, the International Mobile Subscriber Identity of the SIM
      card installed in the device.
    </dd>

    <dt class="field">LastGoodAPN</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">APN</span>
      </span>
      The APN information used in the last successful connection attempt.
    </dd>

    <dt class="field">Manufacturer</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The manufacturer of the cellular modem.
    </dd>

    <dt class="field">MDN</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      The Mobile Directory Number (i.e., phone number) of the device.
    </dd>

    <dt class="field">MEID</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">CDMA</span>)
        <span class="type">string</span>
      </span>
      For CDMA modems, the Mobile Equipment Identifer of the cellular modem.
    </dd>

    <dt class="field">MIN</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The Mobile Identification Number of the device.
    </dd>

    <dt class="field">ModelID</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The hardware model of the cellular modem.
    </dd>

    <dt class="field">NetworkTechnology</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      If the modem is registered on a network, then this is set to the
      network technology currently in use.
      <span class="rule"><span class="rule_id"></span>
        Allowed values are
        <span class="value">CDMA1XRTT</span>,
        <span class="value">EDGE</span>,
        <span class="value">EVDO</span>,
        <span class="value">GPRS</span>,
        <span class="value">GSM</span>,
        <span class="value">HSPA</span>,
        <span class="value">HSPAPlus</span>,
        <span class="value">LTE</span>,
        <span class="value">LTEAdvanced</span>
        <span class="value">UMTS</span>,
      </span>
    </dd>

    <dt class="field">PaymentPortal</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">PaymentPortal</span>
      </span>
      Properties describing the online payment portal (OLP) at which a user can
      sign up for or modify a mobile data plan.
    </dd>

    <dt class="field">PRLVersion</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">integer</span>
      </span>
      The revision of the Preferred Roaming List that is loaded in the modem.
    </dd>

    <dt class="field">RoamingState</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">string</span>
      </span>
      The roaming status of the cellular modem on the current network.
      <span class="rule"><span class="rule_id"></span>
        Allowed values are <span class="value">Home</span>,
        <span class="value">Roaming</span>, or if the provider has no home
        network, <span class="value">Required</span>.
      </span>
    </dd>

    <dt class="field">ServingOperator</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>)
        <span class="type">CellularProvider</span>
      </span>
      Description of the operator on whose network the modem is currently
      registered
    </dd>

    <dt class="field">SIMLockStatus</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>)
        <span class="type">SIMLockStatus</span>
      </span>
      For GSM modems, a dictionary containing two properties describing the
      state of the SIM card lock.
    </dd>

    <dt class="field">SIMPresent</dt>
    <dd>
      <span class="field_meta">(optional, read-only, provided only
        if <span class="field">Family</span> is <span class="value">GSM</span>
        or <span class="field">NetworkTechnology</span>
        is <span class="value">LTE</span>)
        <span class="type">boolean</span>
      </span>
      For GSM or LTE modems, indicates whether a SIM card is present or not.
    </dd>

    <dt class="field">SupportNetworkScan</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">boolean</span>
      </span>
      True if the cellular network supports scanning.
    </dd>

    <dt class="field">SupportedCarriers</dt>
    <dd>
      <span class="field_meta">(optional, read-only)
        <span class="type">array of string</span>
      </span>
      A list of supported carriers.
    </dd>

  </dl>

  <p><span class="type">APN</span> type contains the following:</p>
  <dl class="field_list">
    <dt class="field">AccessPointName</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The access point name used when making connections.
    </dd>

    <dt class="field">Name</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Description of the APN.
    </dd>

    <dt class="field">LocalizedName</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Localized description of the APN.
    </dd>

    <dt class="field">Username</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Username for making connections if required.
    </dd>

    <dt class="field">Password</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Password for making connections if required.
    </dd>

    <dt class="field">Language</dt>
    <dd>
      <span class="field_meta">(optional, rquired if <span class="field">
          LocalizedName</span> is provided)
        <span class="type">string</span>
      </span>
      Two letter language code for Localizedname if provided.
    </dd>
  </dl>

  <p><span class="type">FoundNetwork</span> type contains the following:</p>
  <dl class="field_list">
    <dt class="field">Status</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The availability of the network.
    </dd>

    <dt class="field">NetworkId</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The network id in the form MCC/MNC (without the '/').
    </dd>

    <dt class="field">Technology</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      Access technology used by the network,
      e.g. "GSM", "UMTS", "EDGE", "HSPA", etc.
    </dd>

    <dt class="field">ShortName</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Short-format name of the network operator.
    </dd>

    <dt class="field">LongName</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      Long-format name of the network operator.
    </dd>
  </dl>

  <p><span class="type">PaymentPortal</span> type contains the following:</p>
  <dl class="field_list">
    <dt class="field">Method</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The HTTP method to use, "GET" or "POST"
    </dd>

    <dt class="field">PostData</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Method</span> is
        <span class="value">POST</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      The postdata to send.
    </dd>

    <dt class="field">Url</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The URL for the portal.
    </dd>
  </dl>

  <p><span class="type">CellularProvider</span> type contains the following:</p>
  <dl class="field_list">
    <dt class="field">Name</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The operator name.
    </dd>

    <dt class="field">Code</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      The network id in the form MCC/MNC (without the '/').
    </dd>

    <dt class="field">Country</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">string</span>
      </span>
      The two-letter country code.
    </dd>
  </dl>

  <p><span class="type">SIMLockStatus</span> type contains the following:</p>
  <dl class="field_list">
    <dt class="field">LockType</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">string</span>
      </span>
      Specifies the type of lock in effect, or an empty string if unlocked.
      <span class="rule"><span class="rule_id"></span>
        Allowed values are
        <span class="value">sim-pin</span>,
        <span class="value">sim-puk</span>
      </span>
    </dd>

    <dt class="field">LockEnabled</dt>
    <dd>
      <span class="field_meta">(required)
        <span class="type">boolean</span>
      </span>
      Indicates whether SIM locking is enabled
    </dd>

    <dt class="field">RetriesLeft</dt>
    <dd>
      <span class="field_meta">(optional)
        <span class="type">integer</span>
      </span>
      If <span class="field">LockType</span> is empty
      or <span class="value">sim-pin</span>, then this property represents
      the number of attempts remaining to supply a correct PIN before the
      PIN becomes blocked, at which point a PUK provided by the carrier would
      be necessary to unlock the SIM (and <span class="field">LockType</span>
      changes to <span class="value">sim-puk</span>).
    </dd>
  </dl>

</section>

<section>
  <h1>Bluetooth / WiFi Direct Networks</h1>
  <p>
    This format will eventually also cover configuration of Bluetooth and WiFi
    Direct network technologies, however they are currently not supported.
  </p>
</section>

</section>

<section>
  <h1>Certificates</h1>
  <p>
    Certificate data is stored in a separate section. Each certificate may be
    referenced from within the NetworkConfigurations array using a certificate
    reference. A certificate reference is its GUID.
  </p>

  <p>
    The top-level field <span class="field">Certificates</span> is an array of
    objects of <span class="type">Certificate</span> type.
  </p>

  <p>
    The <span class="type">Certificate</span> type contains the following:
  </p>

  <dl class="field_list">
    <dt class="field">GUID</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      A unique identifier for this certificate. Must be a non-empty string.
    </dd>

    <dt class="field">PKCS12</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">Client</span>, otherwise ignored)
        <span class="type">string</span>
      </span> For certificates with
      private keys, this is the base64 encoding of the a PKCS#12 file.
    </dd>

    <dt class="field">Remove</dt>
    <dd>
      <span class="field_meta">
        (optional, defaults to <span class="value">false</span>)
        <span class="type">boolean</span>
      </span>
      If <span class="value">true</span>, remove this certificate (only GUID
      should be set).
    </dd>

    <dt class="field">TrustBits</dt>
    <dd>
      <span class="field_meta">
        (optional if <span class="field">Type</span>
        is <span class="value">Server</span>
        or <span class="value">Authority</span>, otherwise ignored, defaults to
        [])
        <span class="type">array of string</span>
      </span>
      An array of trust flags. Clients should ignore unknown flags. For
      backwards compatibility, each flag should only increase the trust and
      never restrict. The trust flag <span class="value">Web</span> implies that
      the certificate is to be trusted for HTTPS SSL identification. A typical
      web certificate authority would have <span class="field">Type</span> set
      to <span class="value">Authority</span> and
      <span class="field">TrustBits</span> set to
      <span class="snippet">["Web"]</span>.
    </dd>

    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Remove</span> is
        <span class="value">false</span>, otherwise ignored)
        <span class="type">string</span>
      </span>
      <span class="rule">
        <span class="rule_id"></span>
        Allowed values are <span class="value">Client</span>,
        <span class="value">Server</span>, and
        <span class="value">Authority</span>.
      </span>
      <span class="value">Client</span> indicates the certificate is for
      identifying the user or device over HTTPS or for
      VPN/802.1X. <span class="value">Server</span> indicates the certificate
      identifies an HTTPS or VPN/802.1X peer.
      <span class="value">Authority</span> indicates the certificate is a
      certificate authority and any certificates it issues should be
      trusted. Note that if <span class="field">Type</span> disagrees with the
      x509 v3 basic constraints or key usage attributes, the
      <span class="field">Type</span> field should be honored.
    </dd>

    <dt class="field">X509</dt>
    <dd>
      <span class="field_meta">
        (required if <span class="field">Type</span> is
        <span class="value">Server</span> or
        <span class="value">Authority</span>, otherwise ignored)
        <span class="type">string</span>
      </span> For certificate
      without private keys, this is the X509 certificate in PEM format.
    </dd>
  </dl>

  <p>
    The passphrase of the PKCS#12 encoding must be empty. Encryption of key data
    should be handled at the level of the entire file, or the transport of the
    file.
  </p>

  <p>
    If a global-scoped network connection refers to a user-scoped certificate,
    results are undefined, so this configuration should be prohibited by the
    configuration editor.
  </p>
</section>

</section>

<section>
  <h1>Encrypted Configuration</h1>
  <p>
    We assume that when this format is imported as part of policy that
    file-level encryption will not be necessary because the policy transport is
    already encrypted, but when it is imported as a standalone file, it is
    desirable to encrypt it. Since this file has private information (user
    names) and secrets (passphrases and private keys) in it, and we want it to
    be usable as a manual way to distribute network configuration, we must
    support encryption.
  </p>

  <p>
    For this standalone export, the entire file will be encrypted in a symmetric
    fashion with a passphrase stretched using salted PBKDF2 using at least 20000
    iterations, and encrypted using an AES-256 CBC mode cipher with an SHA-1
    HMAC on the ciphertext.
  </p>

  <p>
    An encrypted ONC file's top level object will have the
    <span class="type">EncryptedConfiguration</span>
    type. <span class="type">EncryptedConfiguration</span> type contains the
    following:
  </p>

  <dl class="field_list">
    <dt class="field">Cipher</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The type of cipher used. Currently only <span class="value">AES256</span>
      is supported.
    </dd>

    <dt class="field">Ciphertext</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The raw ciphertext of the encrypted ONC file, base64 encoded.
    </dd>

    <dt class="field">HMAC</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The HMAC for the ciphertext, base64 encoded.
    </dd>

    <dt class="field">HMACMethod</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The method used to compute the Hash-based Message Authentication Code
      (HMAC). Currently only <span class="value">SHA1</span> is supported.
    </dd>

    <dt class="field">Salt</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The salt value used during key stretching.
    </dd>

    <dt class="field">Stretch</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The key stretching algorithm used. Currently
      only <span class="value">PBKDF2</span> is supported.
    </dd>

    <dt class="field">Iterations</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">integer</span>
      </span>
      The number of iterations to use during key stretching.
    </dd>

    <dt class="field">IV</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The initial vector (IV) used for Cyclic Block Cipher (CBC) mode, base64
      encoded.
    </dd>

    <dt class="field">Type</dt>
    <dd>
      <span class="field_meta">
        (required)
        <span class="type">string</span>
      </span>
      The type of the ONC file, which must be set
      to <span class="value">EncryptedConfiguration</span>.
    </dd>
  </dl>

  <p class="rule">
    <span class="rule_id"></span>
    When decrypted, the ciphertext must contain a JSON object of
    type <span class="type">UnencryptedConfiguration</span>.
  </p>
</section>

<section>
  <h1>String Expansions</h1>
  <p>
    The values of some fields, such
    as <span class="field">WiFi.EAP.Identity</span>
    and <span class="field">VPN.*.Username</span>, are subject to string
    expansions. These allow one ONC to have basic user-specific variations.
  </p>

  <p>
    The expansions are:
  </p>

  <ul>
    <li>
      ${LOGIN_ID} - expands to the email address of the user, but before the
      '@'.
    </li>
    <li>
      ${LOGIN_EMAIL} - expands to the email address of the user.
    </li>
  </ul>

  <p>
    The following SED would properly handle resolution.
  </p>

  <ul>
    <li>
      s/\$\{LOGIN_ID\}/bobquail$1/g
    </li>
    <li>
      s/\$\{LOGIN_EMAIL\}/bobquail@example.com$1/g
    </li>
  </ul>

  <p>
    Example expansions, assuming the user was bobquail@example.com:
  </p>

  <ul>
    <li>
      "${LOGIN_ID}" -> "bobquail"
    </li>
    <li>
      "${LOGIN_ID}@corp.example.com" -> "bobquail@corp.example.com"
    </li>
    <li>
      "${LOGIN_EMAIL}" -> "bobquail@example.com"
    </li>
    <li>
      "${LOGIN_ID}X" -> "bobquailX"
    </li>
    <li>
      "${LOGIN_IDX}" -> "${LOGIN_IDX}"
    </li>
    <li>
      "X${LOGIN_ID}" -> "Xbobquail"
    </li>
  </ul>
</section>

<section>
  <h1>Detection</h1>
  <p>
    This format should be sent in files ending in the .onc extension. When
    transmitted with a MIME type, the MIME type should be
    application/x-onc. These two methods make detection of data to be handled in
    this format, especially when encryption is used and the payload itself is
    not detectable.
  </p>
</section>

</section>

<section>
  <h1>Alternatives considered</h1>
  <p>
    For the overall format, we considered XML, ASN.1, and protobufs. JSON and
    ASN.1 seem more widely known than protobufs. Since administrators are
    likely to want to tweak settings that will not exist in common UIs, we
    should provide a format that is well known and human modifiable. ASN.1 is
    not human modifiable. Protobufs formats are known by open source developers
    but seem less likely to be known by administrators. JSON serialization
    seems to have good support across languages.
  </p>

  <p>
    We considered sending the exact connection manager configuration format of
    an open source connection manager like connman. There are a few issues
    here, for instance, referencing certificates by identifiers not tied to a
    particular PKCS#11 token, and tying to one OS's connection manager.
  </p>
</section>

<section>
  <h1>Detection</h1>
  <p>
    This format should be sent in files ending in the .onc extension. When
    transmitted with a MIME type, the MIME type should be
    application/x-onc. These two methods make detection of data to be handled in
    this format, especially when encryption is used and the payload itself is
    not detectable.
  </p>
</section>

<section>
  <h1>Mocks</h1>

<section>
  <h1>Simple format example: PEAP/MSCHAPv2 network (per device)</h1>

  <pre>
{
  "Type": "UnencryptedConfiguration",
  "NetworkConfigurations": [
    {
      "GUID": "{f2c17903-b0e1-8593-b3ca74f977236bd7}",
      "Name": "MySSID",
      "Type": "WiFi",
      "WiFi": {
        "AutoConnect": true,
        "EAP": {
          "Outer": "PEAP",
          "UseSystemCAs": true
        },
        "HiddenSSID": false,
        "SSID": "MySSID",
        "Security": "WPA-EAP"
      }
    }
  ],
  "Certificates": []
}
  </pre>

  <p>
    Notice that in this case, we do not provide a username and password - we set
    SaveCredentials to <span class="value">false</span> so we are prompted every
    time. We could have passed in username and password - but such a file should
    be encrypted.
  </p>
</section>

<section>
  <h1>Complex format example: TLS network with client certs (per device)</h1>

  <pre>
{
  "Type": "UnencryptedConfiguration",
  "NetworkConfigurations": [
    {
      "GUID": "{00f79111-51e0-e6e0-76b3b55450d80a1b}",
      "Name": "MyTTLSNetwork",
      "Type": "WiFi",
      "WiFi": {
        "AutoConnect": false,
        "EAP": {
          "ClientCertPattern": {
            "EnrollmentURI": [
              "http://fetch-my-certificate.com"
            ],
            "IssuerCARef": [
              "{6ed8dce9-64c8-d568-d225d7e467e37828}"
            ]
          },
          "ClientCertType": "Pattern",
          "Outer": "EAP-TLS",
          "ServerCARef": "{6ed8dce9-64c8-d568-d225d7e467e37828}",
          "UseSystemCAs": true
        },
        "HiddenSSID": false,
        "SSID": "MyTTLSNetwork",
        "Security": "WPA-EAP"
      }
    }
  ],
  "Certificates": [
    {
      "GUID": "{6ed8dce9-64c8-d568-d225d7e467e37828}",
      "Type": "Authority",
      "X509": "MIIEpzCCA4+gAwIBAgIJAMueiWq5WEIAMA0GCSqGSIb3DQEBBQUAMIGTMQswCQYDVQQGEwJGUjEPMA0GA1UECBMGUmFkaXVzMRIwEAYDVQQHEwlTb21ld2hlcmUxFTATBgNVBAoTDEV4YW1wbGUgSW5jLjEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20xJjAkBgNVBAMTHUV4YW1wbGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTExMDEyODA2MjA0MFoXDTEyMDEyODA2MjA0MFowgZMxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZSYWRpdXMxEjAQBgNVBAcTCVNvbWV3aGVyZTEVMBMGA1UEChMMRXhhbXBsZSBJbmMuMSAwHgYJKoZIhvcNAQkBFhFhZG1pbkBleGFtcGxlLmNvbTEmMCQGA1UEAxMdRXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9EDplhyrVNJIoy1OsVqvD/K67B5PW2bDKKxGznodrzCu8jHsP1Ne3mgrK20vbzQUUBdmxTCWO6x3a3//r4ZuPOuZd1ViycWjt6mRfRbBzNrHzP7NiyFuXjdlz74beHQQLcHwvZ3qFAWZK37uweiLiDPaMaEQlka2Bztqx4PsogmSdoVPSCxi5Cl1XlJmITA03LlKpO79+0rEPRamWO/DMCwvffn2/UUjJLog4/lYe16HQ6iq/6bjhffm2rLXDFKOGZmBVbLNMCfANRMtdFWHYdBXERoUo2zpM9tduOOUNLy7E7kRKVm/wy38s51ChFPlpORrhimN2j1caar+KAv2tAgMBAAGjgfswgfgwHQYDVR0OBBYEFBTIImiXp+57jjgn2N5wq93GgAAtMIHIBgNVHSMEgcAwgb2AFBTIImiXp+57jjgn2N5wq93GgAAtoYGZpIGWMIGTMQswCQYDVQQGEwJGUjEPMA0GA1UECBMGUmFkaXVzMRIwEAYDVQQHEwlTb21ld2hlcmUxFTATBgNVBAoTDEV4YW1wbGUgSW5jLjEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20xJjAkBgNVBAMTHUV4YW1wbGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5ggkAy56JarlYQgAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAnNd0YY7s2YVYPsgEgDS+rBNjcQloTFWgc9Hv4RWBjwcdJdSPIrpBp7LSjC96wH5U4eWpQjlWbOYQ9RBq9Z/RpuAPEjzRV78rIrQrCWQ3lxwywWEb5Th1EVJSN68eNv7Ke5BlZ2l9kfLRKFm5MEBXX9YoHMX0U8I8dPIXfTyevmKOT1PuEta5cQOM6/zH86XWn6WYx3EXkyjpeIbVOw49AqaEY8u70yBmut4MO03zz/pwLjV1BWyIkXhsrtuJyA+ZImvgLK2oAMZtGGFo7b0GW/sWY/P3R6Un3RFy35k6U3kXCDYYhgZEcS36lIqcj5y6vYUUVM732/etCsuOLz6ppw=="
    }
  ]
}
  </pre>

  <p>
    In this example, the client certificate is not sent in the ONC format, but
    rather we send a certificate authority which we know will have signed the
    client certificate that is needed, along with an enrollment URI to navigate
    to if the required certificate is not yet available on the client.
  </p>
</section>

<section>
  <h1>Simple format example: HTTPS Certificate Authority</h1>

  <p>
    In this example a new certificate authority is added to be trusted for HTTPS
    server authentication.
  </p>

  <pre>
{
  "Type": "UnencryptedConfiguration",
  "NetworkConfigurations": [],
  "Certificates": [
    {
      "GUID": "{f31f2110-9f5f-61a7-a8bd7c00b94237af}",
      "TrustBits": [ "Web" ],
      "Type": "Authority",
      "X509": "MIIEpzCCA4+gAwIBAgIJAMueiWq5WEIAMA0GCSqGSIb3DQEBBQUAMIGTMQswCQYDVQQGEwJGUjEPMA0GA1UECBMGUmFkaXVzMRIwEAYDVQQHEwlTb21ld2hlcmUxFTATBgNVBAoTDEV4YW1wbGUgSW5jLjEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20xJjAkBgNVBAMTHUV4YW1wbGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTExMDEyODA2MjA0MFoXDTEyMDEyODA2MjA0MFowgZMxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZSYWRpdXMxEjAQBgNVBAcTCVNvbWV3aGVyZTEVMBMGA1UEChMMRXhhbXBsZSBJbmMuMSAwHgYJKoZIhvcNAQkBFhFhZG1pbkBleGFtcGxlLmNvbTEmMCQGA1UEAxMdRXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9EDplhyrVNJIoy1OsVqvD/K67B5PW2bDKKxGznodrzCu8jHsP1Ne3mgrK20vbzQUUBdmxTCWO6x3a3//r4ZuPOuZd1ViycWjt6mRfRbBzNrHzP7NiyFuXjdlz74beHQQLcHwvZ3qFAWZK37uweiLiDPaMaEQlka2Bztqx4PsogmSdoVPSCxi5Cl1XlJmITA03LlKpO79+0rEPRamWO/DMCwvffn2/UUjJLog4/lYe16HQ6iq/6bjhffm2rLXDFKOGZmBVbLNMCfANRMtdFWHYdBXERoUo2zpM9tduOOUNLy7E7kRKVm/wy38s51ChFPlpORrhimN2j1caar+KAv2tAgMBAAGjgfswgfgwHQYDVR0OBBYEFBTIImiXp+57jjgn2N5wq93GgAAtMIHIBgNVHSMEgcAwgb2AFBTIImiXp+57jjgn2N5wq93GgAAtoYGZpIGWMIGTMQswCQYDVQQGEwJGUjEPMA0GA1UECBMGUmFkaXVzMRIwEAYDVQQHEwlTb21ld2hlcmUxFTATBgNVBAoTDEV4YW1wbGUgSW5jLjEgMB4GCSqGSIb3DQEJARYRYWRtaW5AZXhhbXBsZS5jb20xJjAkBgNVBAMTHUV4YW1wbGUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5ggkAy56JarlYQgAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAnNd0YY7s2YVYPsgEgDS+rBNjcQloTFWgc9Hv4RWBjwcdJdSPIrpBp7LSjC96wH5U4eWpQjlWbOYQ9RBq9Z/RpuAPEjzRV78rIrQrCWQ3lxwywWEb5Th1EVJSN68eNv7Ke5BlZ2l9kfLRKFm5MEBXX9YoHMX0U8I8dPIXfTyevmKOT1PuEta5cQOM6/zH86XWn6WYx3EXkyjpeIbVOw49AqaEY8u70yBmut4MO03zz/pwLjV1BWyIkXhsrtuJyA+ZImvgLK2oAMZtGGFo7b0GW/sWY/P3R6Un3RFy35k6U3kXCDYYhgZEcS36lIqcj5y6vYUUVM732/etCsuOLz6ppw==" 
    }
  ]
}
  </pre>
</section>

<section>
  <h1>Encrypted format example</h1>

  <p>
In this example a simple wireless network is added, but the file is encrypted
with the passphrase "test0000".
  </p>

  <pre>
{
  "Cipher": "AES256",
  "Ciphertext": "eQ9/r6v29/83M745aa0JllEj4lklt3Nfy4kPPvXgjBt1eTByxXB+FnsdvL6Uca5JBU5aROxfiol2+ZZOkxPmUNNIFZj70pkdqOGVe09ncf0aVBDsAa27veGIG8rG/VQTTbAo7d8QaxdNNbZvwQVkdsAXawzPCu7zSh4NF/hDnDbYjbN/JEm1NzvWgEjeOfqnnw3PnGUYCArIaRsKq9uD0a1NccU+16ZSzyDhX724JNrJjsuxohotk5YXsCK0lP7ZXuXj+nSR0aRIETSQ+eqGhrew2octLXq8cXK05s6ZuVAc0mFKPkntSI/fzBACuPi4ZaGd3YEYiKzNOgKJ+qEwgoE39xp0EXMZOZyjMOAtA6e1ZZDQGWG7vKdTLmLKNztHGrXvlZkyEf1RDs10YgkwwLgUhm0yBJ+eqbxO/RiBXz7O2/UVOkkkVcmeI6yh3BdL6HIYsMMygnZa5WRkd/2/EudoqEnjcqUyGsL+YUqV6KRTC0PH+z7zSwvFs2KygrSM7SIAZM2yiQHTQACkA/YCJDwACkkQOBFnRWTWiX0xmN55WMbgrs/wqJ4zGC9LgdAInOBlc3P+76+i7QLaNjMovQ==",
  "HMAC": "3ylRy5InlhVzFGakJ/9lvGSyVH0=",
  "HMACMethod": "SHA1",
  "Iterations": 20000,
  "IV": "hcm6OENfqG6C/TVO6p5a8g==",
  "Salt": "/3O73QadCzA=",
  "Stretch": "PBKDF2",
  "Type": "EncryptedConfiguration"
}
  </pre>
</section>

</section>

<section>
  <h1>Standalone editor</h1>

  <p>
    The source code for a Chrome packaged app to generate ONC configuration can
    be found here:
    <a href="https://gerrit.chromium.org/gitweb/?p=chromiumos/platform/spigots.git;a=tree">"https://gerrit.chromium.org/gitweb/?p=chromiumos/platform/spigots.git;a=tree"</a>
  </p>
</section>

<section>
  <h1>Internationalization and Localization</h1>

  <p>
    UIs will need to have internationalization and localizations - the file
    format will remain in English.
  </p>
</section>

<section>
  <h1>Security Considerations</h1>

  <p>
    Data stored inside of open network configuration files is highly sensitive
    to users and enterprises. The file format itself provides adequate
    encryption options to allow standalone use-cases to be secure. For automatic
    updates sent by policy, the policy transport should be made secure. The file
    should not be stored unencrypted on disk as part of policy fetching and
    should be cleared from memory after use.
  </p>
</section>

<section>
  <h1>Privacy Considerations</h1>

  <p>
    Similarly to the security considerations, user names will be present in
    these files for certain kinds of connections, so any places where the file
    is transmitted or saved to disk should be secure. On client device, when
    user names for connections that are user-specific are persisted to disk,
    they should be stored in a location that is encrypted. Users can also opt in
    these cases to not save their user credentials in the config file and will
    instead be prompted when they are needed.
  </p>
</section>
</section>
</body>
</html>