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
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
|
Network Working Group M. Rose
Request For Comments: 3080 Invisible Worlds, Inc.
Category: Standards Track March 2001
The Blocks Extensible Exchange Protocol Core
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2001). All Rights Reserved.
Abstract
This memo describes a generic application protocol kernel for
connection-oriented, asynchronous interactions called the BEEP
(Blocks Extensible Exchange Protocol) core. BEEP permits
simultaneous and independent exchanges within the context of a single
application user-identity, supporting both textual and binary
messages.
Rose Standards Track [Page 1]
^L
RFC 3080 The BEEP Core March 2001
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 4
2. The BEEP Core . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 Exchange Styles . . . . . . . . . . . . . . . . . . . . . 6
2.2 Messages and Frames . . . . . . . . . . . . . . . . . . . 7
2.2.1 Frame Syntax . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1.1 Frame Header . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1.2 Frame Payload . . . . . . . . . . . . . . . . . . . . . . 12
2.2.1.3 Frame Trailer . . . . . . . . . . . . . . . . . . . . . . 13
2.2.2 Frame Semantics . . . . . . . . . . . . . . . . . . . . . 14
2.2.2.1 Poorly-formed Messages . . . . . . . . . . . . . . . . . . 14
2.3 Channel Management . . . . . . . . . . . . . . . . . . . . 15
2.3.1 Message Semantics . . . . . . . . . . . . . . . . . . . . 16
2.3.1.1 The Greeting Message . . . . . . . . . . . . . . . . . . . 16
2.3.1.2 The Start Message . . . . . . . . . . . . . . . . . . . . 17
2.3.1.3 The Close Message . . . . . . . . . . . . . . . . . . . . 20
2.3.1.4 The OK Message . . . . . . . . . . . . . . . . . . . . . . 23
2.3.1.5 The Error Message . . . . . . . . . . . . . . . . . . . . 23
2.4 Session Establishment and Release . . . . . . . . . . . . 25
2.5 Transport Mappings . . . . . . . . . . . . . . . . . . . . 27
2.5.1 Session Management . . . . . . . . . . . . . . . . . . . . 27
2.5.2 Message Exchange . . . . . . . . . . . . . . . . . . . . . 27
2.6 Asynchrony . . . . . . . . . . . . . . . . . . . . . . . . 28
2.6.1 Within a Single Channel . . . . . . . . . . . . . . . . . 28
2.6.2 Between Different Channels . . . . . . . . . . . . . . . . 28
2.6.3 Pre-emptive Replies . . . . . . . . . . . . . . . . . . . 29
2.6.4 Interference . . . . . . . . . . . . . . . . . . . . . . . 29
2.7 Peer-to-Peer Behavior . . . . . . . . . . . . . . . . . . 30
3. Transport Security . . . . . . . . . . . . . . . . . . . . 31
3.1 The TLS Transport Security Profile . . . . . . . . . . . . 34
3.1.1 Profile Identification and Initialization . . . . . . . . 34
3.1.2 Message Syntax . . . . . . . . . . . . . . . . . . . . . . 35
3.1.3 Message Semantics . . . . . . . . . . . . . . . . . . . . 36
3.1.3.1 The Ready Message . . . . . . . . . . . . . . . . . . . . 36
3.1.3.2 The Proceed Message . . . . . . . . . . . . . . . . . . . 36
4. User Authentication . . . . . . . . . . . . . . . . . . . 37
4.1 The SASL Family of Profiles . . . . . . . . . . . . . . . 38
4.1.1 Profile Identification and Initialization . . . . . . . . 39
4.1.2 Message Syntax . . . . . . . . . . . . . . . . . . . . . . 42
4.1.3 Message Semantics . . . . . . . . . . . . . . . . . . . . 43
5. Registration Templates . . . . . . . . . . . . . . . . . . 44
5.1 Profile Registration Template . . . . . . . . . . . . . . 44
5.2 Feature Registration Template . . . . . . . . . . . . . . 44
6. Initial Registrations . . . . . . . . . . . . . . . . . . 45
6.1 Registration: BEEP Channel Management . . . . . . . . . . 45
6.2 Registration: TLS Transport Security Profile . . . . . . . 45
Rose Standards Track [Page 2]
^L
RFC 3080 The BEEP Core March 2001
6.3 Registration: SASL Family of Profiles . . . . . . . . . . 46
6.4 Registration: application/beep+xml . . . . . . . . . . . . 47
7. DTDs . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.1 BEEP Channel Management DTD . . . . . . . . . . . . . . . 48
7.2 TLS Transport Security Profile DTD . . . . . . . . . . . . 50
7.3 SASL Family of Profiles DTD . . . . . . . . . . . . . . . 51
8. Reply Codes . . . . . . . . . . . . . . . . . . . . . . . 52
9. Security Considerations . . . . . . . . . . . . . . . . . 53
References . . . . . . . . . . . . . . . . . . . . . . . . 54
Author's Address . . . . . . . . . . . . . . . . . . . . . 55
A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 56
B. IANA Considerations . . . . . . . . . . . . . . . . . . . 57
Full Copyright Statement . . . . . . . . . . . . . . . . . 58
Rose Standards Track [Page 3]
^L
RFC 3080 The BEEP Core March 2001
1. Introduction
This memo describes a generic application protocol kernel for
connection-oriented, asynchronous interactions called BEEP.
At BEEP's core is a framing mechanism that permits simultaneous and
independent exchanges of messages between peers. Messages are
arbitrary MIME [1] content, but are usually textual (structured using
XML [2]).
All exchanges occur in the context of a channel -- a binding to a
well-defined aspect of the application, such as transport security,
user authentication, or data exchange.
Each channel has an associated "profile" that defines the syntax and
semantics of the messages exchanged. Implicit in the operation of
BEEP is the notion of channel management. In addition to defining
BEEP's channel management profile, this document defines:
o the TLS [3] transport security profile; and,
o the SASL [4] family of profiles.
Other profiles, such as those used for data exchange, are defined by
an application protocol designer.
Rose Standards Track [Page 4]
^L
RFC 3080 The BEEP Core March 2001
2. The BEEP Core
A BEEP session is mapped onto an underlying transport service. A
separate series of documents describe how a particular transport
service realizes a BEEP session. For example, [5] describes how a
BEEP session is mapped onto a single TCP [6] connection.
When a session is established, each BEEP peer advertises the profiles
it supports. Later on, during the creation of a channel, the client
supplies one or more proposed profiles for that channel. If the
server creates the channel, it selects one of the profiles and sends
it in a reply; otherwise, it may indicate that none of the profiles
are acceptable, and decline creation of the channel.
Channel usage falls into one of two categories:
initial tuning: these are used by profiles that perform
initialization once the BEEP session is established (e.g.,
negotiating the use of transport security); although several
exchanges may be required to perform the initialization, these
channels become inactive early in the BEEP session and remain so
for the duration.
continuous: these are used by profiles that support data exchange;
typically, these channels are created after the initial tuning
channels have gone quiet.
Note that because of their special nature, only one tuning channel
may be established at any given time; in contrast, BEEP allows
multiple data exchange channels to be simultaneously in use.
Rose Standards Track [Page 5]
^L
RFC 3080 The BEEP Core March 2001
2.1 Roles
Although BEEP is peer-to-peer, it is convenient to label each peer in
the context of the role it is performing at a given time:
o When a BEEP session is established, the peer that awaits new
connections is acting in the listening role, and the other peer,
which establishes a connection to the listener, is acting in the
initiating role. In the examples which follow, these are referred
to as "L:" and "I:", respectively.
o A BEEP peer starting an exchange is termed the client; similarly,
the other BEEP peer is termed the server. In the examples which
follow, these are referred to as "C:" and "S:", respectively.
Typically, a BEEP peer acting in the server role is also acting in a
listening role. However, because BEEP is peer-to-peer in nature, no
such requirement exists.
2.1.1 Exchange Styles
BEEP allows three styles of exchange:
MSG/RPY: the client sends a "MSG" message asking the server to
perform some task, the server performs the task and replies with a
"RPY" message (termed a positive reply).
MSG/ERR: the client sends a "MSG" message, the server does not
perform any task and replies with an "ERR" message (termed a
negative reply).
MSG/ANS: the client sends a "MSG" message, the server, during the
course of performing some task, replies with zero or more "ANS"
messages, and, upon completion of the task, sends a "NUL" message,
which signifies the end of the reply.
The first two styles are termed one-to-one exchanges, whilst the
third style is termed a one-to-many exchange.
Rose Standards Track [Page 6]
^L
RFC 3080 The BEEP Core March 2001
2.2 Messages and Frames
A message is structured according to the rules of MIME. Accordingly,
each message may begin with "entity-headers" (c.f., MIME's Section 3
[1]). If none, or only some, of the "entity-headers" are present:
o the default "Content-Type" is "application/octet-stream"; and,
o the default "Content-Transfer-Encoding" is "binary".
Normally, a message is sent in a single frame. However, it may be
convenient or necessary to segment a message into multiple frames
(e.g., if only part of a message is ready to be sent).
Each frame consists of a header, the payload, and a trailer. The
header and trailer are each represented using printable ASCII
characters and are terminated with a CRLF pair. Between the header
and the trailer is the payload, consisting of zero or more octets.
For example, here is a message contained in a single frame that
contains a payload of 120 octets spread over 5 lines (each line is
terminated with a CRLF pair):
C: MSG 0 1 . 52 120
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/OTP' />
C: </start>
C: END
In this example, note that the entire message is represented in a
single frame.
Rose Standards Track [Page 7]
^L
RFC 3080 The BEEP Core March 2001
2.2.1 Frame Syntax
The ABNF [7] for a frame is:
frame = data / mapping
data = header payload trailer
header = msg / rpy / err / ans / nul
msg = "MSG" SP common CR LF
rpy = "RPY" SP common CR LF
ans = "ANS" SP common SP ansno CR LF
err = "ERR" SP common CR LF
nul = "NUL" SP common CR LF
common = channel SP msgno SP more SP seqno SP size
channel = 0..2147483647
msgno = 0..2147483647
more = "." / "*"
seqno = 0..4294967295
size = 0..2147483647
ansno = 0..2147483647
payload = *OCTET
trailer = "END" CR LF
mapping = ;; each transport mapping may define additional frames
Rose Standards Track [Page 8]
^L
RFC 3080 The BEEP Core March 2001
2.2.1.1 Frame Header
The frame header consists of a three-character keyword (one of:
"MSG", "RPY", "ERR", "ANS", or "NUL"), followed by zero or more
parameters. A single space character (decimal code 32, " ")
separates each component. The header is terminated with a CRLF pair.
The channel number ("channel") must be a non-negative integer (in the
range 0..2147483647).
The message number ("msgno") must be a non-negative integer (in the
range 0..2147483647) and have a different value than all other "MSG"
messages on the same channel for which a reply has not been
completely received.
The continuation indicator ("more", one of: decimal code 42, "*", or
decimal code 46, ".") specifies whether this is the final frame of
the message:
intermediate ("*"): at least one other frame follows for the
message; or,
complete ("."): this frame completes the message.
The sequence number ("seqno") must be a non-negative integer (in the
range 0..4294967295) and specifies the sequence number of the first
octet in the payload, for the associated channel (c.f., Section
2.2.1.2).
The payload size ("size") must be a non-negative integer (in the
range 0..2147483647) and specifies the exact number of octets in the
payload. (This does not include either the header or trailer.)
Note that a frame may have an empty payload, e.g.,
S: RPY 0 1 * 287 20
S: ...
S: ...
S: END
S: RPY 0 1 . 307 0
S: END
The answer number ("ansno") must be a non-negative integer (in the
range 0..4294967295) and must have a different value than all other
answers in progress for the message being replied to.
Rose Standards Track [Page 9]
^L
RFC 3080 The BEEP Core March 2001
There are two kinds of frames: data and mapping. Each transport
mapping (c.f., Section 2.5) may define its own frames. For example,
[5] defines the SEQ frame. The remainder of this section discusses
data frames.
When a message is segmented and sent as several frames, those frames
must be sent sequentially, without any intervening frames from other
messages on the same channel. However, there are two exceptions:
first, no restriction is made with respect to the interleaving of
frames for other channels; and, second, in a one-to-many exchange,
multiple answers may be simultaneously in progress. Accordingly,
frames for "ANS" messages may be interleaved on the same channel --
the answer number is used for collation, e.g.,
S: ANS 1 0 * 0 20 0
S: ...
S: ...
S: END
S: ANS 1 0 * 20 20 1
S: ...
S: ...
S: END
S: ANS 1 0 . 40 10 0
S: ...
S: END
which shows two "ANS" messages interleaved on channel 1 as part of a
reply to message number 0. Note that the sequence number is advanced
for each frame sent on the channel, and is independent of the
messages sent in those frames.
Rose Standards Track [Page 10]
^L
RFC 3080 The BEEP Core March 2001
There are several rules for identifying poorly-formed frames:
o if the header doesn't start with "MSG", "RPY", "ERR", "ANS", or
"NUL";
o if any of the parameters in the header cannot be determined or are
invalid (i.e., syntactically incorrect);
o if the value of the channel number doesn't refer to an existing
channel;
o if the header starts with "MSG", and the message number refers to
a "MSG" message that has been completely received but for which a
reply has not been completely sent;
o if the header doesn't start with "MSG", and refers to a message
number for which a reply has already been completely received;
o if the header doesn't start with "MSG", and refers to a message
number that has never been sent (except during session
establishment, c.f., Section 2.3.1.1);
o if the header starts with "MSG", "RPY", "ERR", or "ANS", and
refers to a message number for which at least one other frame has
been received, and the three-character keyword starting this frame
and the immediately-previous received frame for this message
number are not identical;
o if the header starts with "NUL", and refers to a message number
for which at least one other frame has been received, and the
keyword of of the immediately-previous received frame for this
reply isn't "ANS";
o if the continuation indicator of the previous frame received on
the same channel was intermediate ("*"), and its message number
isn't identical to this frame's message number;
o if the value of the sequence number doesn't correspond to the
expected value for the associated channel (c.f., Section 2.2.1.2);
or,
o if the header starts with "NUL", and the continuation indicator is
intermediate ("*") or the payload size is non-zero.
If a frame is poorly-formed, then the session is terminated without
generating a response, and it is recommended that a diagnostic entry
be logged.
Rose Standards Track [Page 11]
^L
RFC 3080 The BEEP Core March 2001
2.2.1.2 Frame Payload
The frame payload consists of zero or more octets.
Every payload octet sent in each direction on a channel has an
associated sequence number. Numbering of payload octets within a
frame is such that the first payload octet is the lowest numbered,
and the following payload octets are numbered consecutively. (When a
channel is created, the sequence number associated with the first
payload octet of the first frame is 0.)
The actual sequence number space is finite, though very large,
ranging from 0..4294967295 (2**32 - 1). Since the space is finite,
all arithmetic dealing with sequence numbers is performed modulo
2**32. This unsigned arithmetic preserves the relationship of
sequence numbers as they cycle from 2**32 - 1 to 0 again. Consult
Sections 2 through 5 of [8] for a discussion of the arithmetic
properties of sequence numbers.
When receiving a frame, the sum of its sequence number and payload
size, modulo 4294967296 (2**32), gives the expected sequence number
associated with the first payload octet of the next frame received.
Accordingly, when receiving a frame if the sequence number isn't the
expected value for this channel, then the BEEP peers have lost
synchronization, then the session is terminated without generating a
response, and it is recommended that a diagnostic entry be logged.
Rose Standards Track [Page 12]
^L
RFC 3080 The BEEP Core March 2001
2.2.1.3 Frame Trailer
The frame trailer consists of "END" followed by a CRLF pair.
When receiving a frame, if the characters immediately following the
payload don't correspond to a trailer, then the session is terminated
without generating a response, and it is recommended that a
diagnostic entry be logged.
Rose Standards Track [Page 13]
^L
RFC 3080 The BEEP Core March 2001
2.2.2 Frame Semantics
The semantics of each message is channel-specific. Accordingly, the
profile associated with a channel must define:
o the initialization messages, if any, exchanged during channel
creation;
o the messages that may be exchanged in the payload of the channel;
and,
o the semantics of these messages.
A profile registration template (Section 5.1) organizes this
information.
2.2.2.1 Poorly-formed Messages
When defining the behavior of the profile, the template must specify
how poorly-formed "MSG" messages are replied to. For example, the
channel management profile sends a negative reply containing an error
message (c.f., Section 2.3.1.5).
If a poorly-formed reply is received on channel zero, the session is
terminated without generating a response, and it is recommended that
a diagnostic entry be logged.
If a poorly-formed reply is received on another channel, then the
channel must be closed using the procedure in Section 2.3.1.3.
Rose Standards Track [Page 14]
^L
RFC 3080 The BEEP Core March 2001
2.3 Channel Management
When a BEEP session starts, only channel number zero is defined,
which is used for channel management. Section 6.1 contains the
profile registration for BEEP channel management.
Channel management allows each BEEP peer to advertise the profiles
that it supports (c.f., Section 2.3.1.1), bind an instance of one of
those profiles to a channel (c.f., Section 2.3.1.2), and then later
close any channels or release the BEEP session (c.f., Section
2.3.1.3).
A BEEP peer should support at least 257 concurrent channels.
Rose Standards Track [Page 15]
^L
RFC 3080 The BEEP Core March 2001
2.3.1 Message Semantics
2.3.1.1 The Greeting Message
When a BEEP session is established, each BEEP peer signifies its
availability by immediately sending a positive reply with a message
number of zero that contains a "greeting" element, e.g.,
L: <wait for incoming connection>
I: <open connection>
L: RPY 0 0 . 0 110
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/TLS' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
Note that this example implies that the BEEP peer in the initiating
role waits until the BEEP peer in the listening role sends its
greeting -- this is an artifact of the presentation; in fact, both
BEEP peers send their replies independently.
The "greeting" element has two optional attributes ("features" and
"localize") and zero or more "profile" elements, one for each profile
supported by the BEEP peer acting in a server role:
o the "features" attribute, if present, contains one or more feature
tokens, each indicating an optional feature of the channel
management profile supported by the BEEP peer;
o the "localize" attribute, if present, contains one or more
language tokens (defined in [9]), each identifying a desirable
language tag to be used by the remote BEEP peer when generating
textual diagnostics for the "close" and "error" elements (the
tokens are ordered from most to least desirable); and,
o each "profile" element contained within the "greeting" element
identifies a profile, and unlike the "profile" elements that occur
within the "start" element, the content of each "profile" element
may not contain an optional initialization message.
Section 5.2 defines a registration template for optional features.
Rose Standards Track [Page 16]
^L
RFC 3080 The BEEP Core March 2001
2.3.1.2 The Start Message
When a BEEP peer wants to create a channel, it sends a "start"
element on channel zero, e.g.,
C: MSG 0 1 . 52 120
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/OTP' />
C: </start>
C: END
The "start" element has a "number" attribute, an optional
"serverName" attribute, and one or more "profile" elements:
o the "number" attribute indicates the channel number (in the range
1..2147483647) used to identify the channel in future messages;
o the "serverName" attribute, an arbitrary string, indicates the
desired server name for this BEEP session; and,
o each "profile" element contained with the "start" element has a
"uri" attribute, an optional "encoding" attribute, and arbitrary
character data as content:
* the "uri" attribute authoritatively identifies the profile;
* the "encoding" attribute, if present, specifies whether the
content of the "profile" element is represented as a base64-
encoded string; and,
* the content of the "profile" element, if present, must be no
longer than 4K octets in length and specifies an initialization
message given to the channel as soon as it is created.
To avoid conflict in assigning channel numbers when requesting the
creation of a channel, BEEP peers acting in the initiating role use
only positive integers that are odd-numbered; similarly, BEEP peers
acting in the listening role use only positive integers that are
even-numbered.
The "serverName" attribute for the first successful "start" element
received by a BEEP peer is meaningful for the duration of the BEEP
session. If present, the BEEP peer decides whether to operate as the
indicated "serverName"; if not, an "error" element is sent in a
negative reply.
Rose Standards Track [Page 17]
^L
RFC 3080 The BEEP Core March 2001
When a BEEP peer receives a "start" element on channel zero, it
examines each of the proposed profiles, and decides whether to use
one of them to create the channel. If so, the appropriate "profile"
element is sent in a positive reply; otherwise, an "error" element is
sent in a negative reply.
When creating the channel, the value of the "serverName" attribute
from the first successful "start" element is consulted to provide
configuration information, e.g., the desired server-side certificate
when starting the TLS transport security profile (Section 3.1).
For example, a successful channel creation might look like this:
C: MSG 0 1 . 52 178
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/OTP' />
C: <profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
C: </start>
C: END
S: RPY 0 1 . 221 87
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/SASL/OTP' />
S: END
Similarly, an unsuccessful channel creation might look like this:
C: MSG 0 1 . 52 120
C: Content-Type: application/beep+xml
C:
C: <start number='2'>
C: <profile uri='http://iana.org/beep/SASL/OTP' />
C: </start>
C: END
S: ERR 0 1 . 221 127
S: Content-Type: application/beep+xml
S:
S: <error code='501'>number attribute
S: in <start> element must be odd-valued</error>
S: END
Rose Standards Track [Page 18]
^L
RFC 3080 The BEEP Core March 2001
Finally, here's an example in which an initialization element is
exchanged during channel creation:
C: MSG 0 1 . 52 158
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/TLS'>
C: <![CDATA[<ready />]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 110 121
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/TLS'>
S: <![CDATA[<proceed />]]>
S: </profile>
S: END
Rose Standards Track [Page 19]
^L
RFC 3080 The BEEP Core March 2001
2.3.1.3 The Close Message
When a BEEP peer wants to close a channel, it sends a "close" element
on channel zero, e.g.,
C: MSG 0 2 . 235 71
C: Content-Type: application/beep+xml
C:
C: <close number='1' code='200' />
C: END
The "close" element has a "number" attribute, a "code" attribute, an
optional "xml:lang" attribute, and an optional textual diagnostic as
its content:
o the "number" attribute indicates the channel number;
o the "code" attribute is a three-digit reply code meaningful to
programs (c.f., Section 8);
o the "xml:lang" attribute identifies the language that the
element's content is written in (the value is suggested, but not
mandated, by the "localize" attribute of the "greeting" element
sent by the remote BEEP peer); and,
o the textual diagnostic (which may be multiline) is meaningful to
implementers, perhaps administrators, and possibly even users, but
never programs.
Note that if the textual diagnostic is present, then the "xml:lang"
attribute is absent only if the language indicated as the remote BEEP
peer's first choice is used.
If the value of the "number" attribute is zero, then the BEEP peer
wants to release the BEEP session (c.f., Section 2.4) -- otherwise
the value of the "number" attribute refers to an existing channel,
and the remainder of this section applies.
A BEEP peer may send a "close" message for a channel whenever all
"MSG" messages it has sent on that channel have been acknowledged.
(Acknowledgement consists of the first frame of a reply being
received by the BEEP peer that sent the MSG "message".)
After sending the "close" message, that BEEP peer must not send any
more "MSG" messages on that channel being closed until the reply to
the "close" message has been received (either by an "error" message
rejecting the request to close the channel, or by an "ok" message
subsequently followed by the channel being successfully started).
Rose Standards Track [Page 20]
^L
RFC 3080 The BEEP Core March 2001
NOTE WELL: until a positive reply to the request to close the channel
is received, the BEEP peer must be prepared to process any "MSG"
messages that it receives on that channel.
When a BEEP peer receives a "close" message for a channel, it may, at
any time, reject the request to close the channel by sending an
"error" message in a negative reply.
Otherwise, before accepting the request to close the channel, and
sending an "ok" message in a positive reply, it must:
o finish sending any queued "MSG" messages on that channel of its
own;
o await complete replies to any outstanding "MSG" messages it has
sent on that channel; and,
o finish sending complete replies to any outstanding "MSG" messages
it has received on that channel, and ensure that the final frames
of those replies have been successfully delivered, i.e.,
* for transport mappings that guarantee inter-channel ordering of
messages, the replies must be sent prior to sending the "ok"
message in a positive reply; otherwise,
* the replies must be sent and subsequently acknowledged by the
underlying transport service prior to sending the "ok" message
in a positive reply.
Rose Standards Track [Page 21]
^L
RFC 3080 The BEEP Core March 2001
Briefly, a successful channel close might look like this:
C: MSG 0 2 . 235 71
C: Content-Type: application/beep+xml
C:
C: <close number='1' code='200' />
C: END
S: RPY 0 2 . 392 46
S: Content-Type: application/beep+xml
S:
S: <ok />
S: END
Similarly, an unsuccessful channel close might look like this:
C: MSG 0 2 . 235 71
C: Content-Type: application/beep+xml
C:
C: <close number='1' code='200' />
C: END
S: ERR 0 2 . 392 79
S: Content-Type: application/beep+xml
S:
S: <error code='550'>still working</error>
S: END
Rose Standards Track [Page 22]
^L
RFC 3080 The BEEP Core March 2001
2.3.1.4 The OK Message
When a BEEP peer agrees to close a channel (or release the BEEP
session), it sends an "ok" element in a positive reply.
The "ok" element has no attributes and no content.
2.3.1.5 The Error Message
When a BEEP peer declines the creation of a channel, it sends an
"error" element in a negative reply, e.g.,
I: MSG 0 1 . 52 115
I: Content-Type: application/beep+xml
I:
I: <start number='2'>
I: <profile uri='http://iana.org/beep/FOO' />
I: </start>
I: END
L: ERR 0 1 . 221 105
L: Content-Type: application/beep+xml
L:
L: <error code='550'>all requested profiles are
L: unsupported</error>
L: END
The "error" element has a "code" attribute, an optional "xml:lang"
attribute, and an optional textual diagnostic as its content:
o the "code" attribute is a three-digit reply code meaningful to
programs (c.f., Section 8);
o the "xml:lang" attribute identifies the language that the
element's content is written in (the value is suggested, but not
mandated, by the "localize" attribute of the "greeting" element
sent by the remote BEEP peer); and,
o the textual diagnostic (which may be multiline) is meaningful to
implementers, perhaps administrators, and possibly even users, but
never programs.
Note that if the textual diagnostic is present, then the "xml:lang"
attribute is absent only if the language indicated as the remote BEEP
peer's first choice is used.
Rose Standards Track [Page 23]
^L
RFC 3080 The BEEP Core March 2001
In addition, a BEEP peer sends an "error" element whenever:
o it receives a "MSG" message containing a poorly-formed or
unexpected element;
o it receives a "MSG" message asking to close a channel (or release
the BEEP session) and it declines to do so; or
o a BEEP session is established, the BEEP peer is acting in the
listening role, and that BEEP peer is unavailable (in this case,
the BEEP acting in the listening role does not send a "greeting"
element).
In the final case, both BEEP peers terminate the session, and it is
recommended that a diagnostic entry be logged by both BEEP peers.
Rose Standards Track [Page 24]
^L
RFC 3080 The BEEP Core March 2001
2.4 Session Establishment and Release
When a BEEP session is established, each BEEP peer signifies its
availability by immediately sending a positive reply with a message
number of zero on channel zero that contains a "greeting" element,
e.g.,
L: <wait for incoming connection>
I: <open connection>
L: RPY 0 0 . 0 110
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/TLS' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
Alternatively, if the BEEP peer acting in the listening role is
unavailable, it sends a negative reply, e.g.,
L: <wait for incoming connection>
I: <open connection>
L: ERR 0 0 . 0 60
L: Content-Type: application/beep+xml
L:
L: <error code='421' />
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
I: <close connection>
L: <close connection>
L: <wait for next connection>
and the "greeting" element sent by the BEEP peer acting in the
initiating role is ignored. It is recommended that a diagnostic
entry be logged by both BEEP peers.
Rose Standards Track [Page 25]
^L
RFC 3080 The BEEP Core March 2001
Note that both of these examples imply that the BEEP peer in the
initiating role waits until the BEEP peer in the listening role sends
its greeting -- this is an artifact of the presentation; in fact,
both BEEP peers send their replies independently.
When a BEEP peer wants to release the BEEP session, it sends a
"close" element with a zero-valued "number" attribute on channel
zero. The other BEEP peer indicates its willingness by sending an
"ok" element in a positive reply, e.g.,
C: MSG 0 1 . 52 60
C: Content-Type: application/beep+xml
C:
C: <close code='200' />
C: END
S: RPY 0 1 . 264 46
S: Content-Type: application/beep+xml
S:
S: <ok />
S: END
I: <close connection>
L: <close connection>
L: <wait for next connection>
Alternatively, if the other BEEP doesn't want to release the BEEP
session, the exchange might look like this:
C: MSG 0 1 . 52 60
C: Content-Type: application/beep+xml
C:
C: <close code='200' />
C: END
S: ERR 0 1 . 264 79
S: Content-Type: application/beep+xml
S:
S: <error code='550'>still working</error>
S: END
If session release is declined, the BEEP session should not be
terminated, if possible.
Rose Standards Track [Page 26]
^L
RFC 3080 The BEEP Core March 2001
2.5 Transport Mappings
All transport interactions occur in the context of a session -- a
mapping onto a particular transport service. Accordingly, this memo
defines the requirements that must be satisfied by any document
describing how a particular transport service realizes a BEEP
session.
2.5.1 Session Management
A BEEP session is connection-oriented. A mapping document must
define:
o how a BEEP session is established;
o how a BEEP peer is identified as acting in the listening role;
o how a BEEP peer is identified as acting in the initiating role;
o how a BEEP session is released; and,
o how a BEEP session is terminated.
2.5.2 Message Exchange
A BEEP session is message-oriented. A mapping document must define:
o how messages are reliably sent and received;
o how messages on the same channel are received in the same order as
they were sent; and,
o how messages on different channels are sent without ordering
constraint.
Rose Standards Track [Page 27]
^L
RFC 3080 The BEEP Core March 2001
2.6 Asynchrony
BEEP accommodates asynchronous interactions, both within a single
channel and between separate channels. This feature allows
pipelining (intra-channel) and parallelism (inter-channel).
2.6.1 Within a Single Channel
A BEEP peer acting in the client role may send multiple "MSG"
messages on the same channel without waiting to receive the
corresponding replies. This provides pipelining within a single
channel.
A BEEP peer acting in the server role must process all "MSG" messages
for a given channel in the same order as they are received. As a
consequence, the BEEP peer must generate replies in the same order as
the corresponding "MSG" messages are received on a given channel.
Note that in one-to-many exchanges (c.f., Section 2.1.1), the reply
to the "MSG" message consists of zero or more "ANS" messages followed
by a "NUL" message. In this style of exchange, the "ANS" messages
comprising the reply may be interleaved. When the BEEP peer acting
in the server role signifies the end of the reply by generating the
"NUL" message, it may then process the next "MSG" message received
for that channel.
2.6.2 Between Different Channels
A BEEP peer acting in the client role may send multiple "MSG"
messages on different channels without waiting to receive the
corresponding replies. The channels operate independently, in
parallel.
A BEEP peer acting in the server role may process "MSG" messages
received on different channels in any order it chooses. As a
consequence, although the replies for a given channel appear to be
generated in the same order in which the corresponding "MSG" messages
are received, there is no ordering constraint for replies on
different channels.
Rose Standards Track [Page 28]
^L
RFC 3080 The BEEP Core March 2001
2.6.3 Pre-emptive Replies
A BEEP peer acting in the server role may send a negative reply
before it receives the final "MSG" frame of a message. If it does
so, that BEEP peer is obliged to ignore any subsequent "MSG" frames
for that message, up to and including the final "MSG" frame.
If a BEEP peer acting in the client role receives a negative reply
before it sends the final "MSG" frame for a message, then it is
required to send a "MSG" frame with a continuation status of complete
(".") and having a zero-length payload.
2.6.4 Interference
If the processing of a particular message has sequencing impacts on
other messages (either intra-channel or inter-channel), then the
corresponding profile should define this behavior, e.g., a profile
whose messages alter the underlying transport mapping.
Rose Standards Track [Page 29]
^L
RFC 3080 The BEEP Core March 2001
2.7 Peer-to-Peer Behavior
BEEP is peer-to-peer -- as such both peers must be prepared to
receive all messages defined in this memo. Accordingly, an
initiating BEEP peer capable of acting only in the client role must
behave gracefully if it receives a "MSG" message. Accordingly, all
profiles must provide an appropriate error message for replying to
unexpected "MSG" messages.
As a consequence of the peer-to-peer nature of BEEP, message numbers
are unidirectionally-significant. That is, the message numbers in
"MSG" messages sent by a BEEP peer acting in the initiating role are
unrelated to the message numbers in "MSG" messages sent by a BEEP
peer acting in the listening role.
For example, these two messages
I: MSG 0 1 . 52 120
I: Content-Type: application/beep+xml
I:
I: <start number='1'>
I: <profile uri='http://iana.org/beep/SASL/OTP' />
I: </start>
I: END
L: MSG 0 1 . 221 116
L: Content-Type: application/beep+xml
L:
L: <start number='2'>
L: <profile uri='http://iana.org/beep/APEX' />
L: </start>
L: END
refer to different messages sent on channel zero.
Rose Standards Track [Page 30]
^L
RFC 3080 The BEEP Core March 2001
3. Transport Security
When a BEEP session is established, plaintext transfer, without
privacy, is provided. Accordingly, transport security in BEEP is
achieved using an initial tuning profile.
This document defines one profile:
o the TLS transport security profile, based on TLS version one [3].
Other profiles may be defined and deployed on a bilateral basis.
Note that because of their intimate relationship with the transport
service, a given transport security profile tends to be relevant to a
single transport mapping (c.f., Section 2.5).
When a channel associated with transport security begins the
underlying negotiation process, all channels (including channel zero)
are closed on the BEEP session. Accordingly, upon completion of the
negotiation process, regardless of its outcome, a new greeting is
issued by both BEEP peers. (If the negotiation process fails, then
either BEEP peer may instead terminate the session, and it is
recommended that a diagnostic entry be logged.)
A BEEP peer may choose to issue different greetings based on whether
privacy is in use, e.g.,
L: <wait for incoming connection>
I: <open connection>
L: RPY 0 0 . 0 110
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/TLS' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
I: MSG 0 1 . 52 158
I: Content-Type: application/beep+xml
I:
Rose Standards Track [Page 31]
^L
RFC 3080 The BEEP Core March 2001
I: <start number='1'>
I: <profile uri='http://iana.org/beep/TLS'>
I: <![CDATA[<ready />]]>
I: </profile>
I: </start>
I: END
L: RPY 0 1 . 110 121
L: Content-Type: application/beep+xml
L:
L: <profile uri='http://iana.org/beep/TLS'>
L: <![CDATA[<proceed />]]>
L: </profile>
L: END
... successful transport security negotiation ...
L: RPY 0 0 . 0 221
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
L: <profile uri='http://iana.org/beep/SASL/OTP' />
L: <profile uri='http://iana.org/beep/APEX' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
Of course, not all BEEP peers need be as single-minded:
L: <wait for incoming connection>
I: <open connection>
L: RPY 0 0 . 0 268
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
L: <profile uri='http://iana.org/beep/SASL/OTP' />
L: <profile uri='http://iana.org/beep/APEX' />
L: <profile uri='http://iana.org/beep/TLS' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
Rose Standards Track [Page 32]
^L
RFC 3080 The BEEP Core March 2001
I: <greeting />
I: END
I: MSG 0 1 . 52 158
I: Content-Type: application/beep+xml
I:
I: <start number='1'>
I: <profile uri='http://iana.org/beep/TLS'>
I: <![CDATA[<ready />]]>
I: </profile>
I: </start>
I: END
L: RPY 0 1 . 268 121
L: Content-Type: application/beep+xml
L:
L: <profile uri='http://iana.org/beep/TLS'>
L: <![CDATA[<proceed />]]>
L: </profile>
L: END
... failed transport security negotiation ...
L: RPY 0 0 . 0 268
L: Content-Type: application/beep+xml
L:
L: <greeting>
L: <profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
L: <profile uri='http://iana.org/beep/SASL/OTP' />
L: <profile uri='http://iana.org/beep/APEX' />
L: <profile uri='http://iana.org/beep/TLS' />
L: </greeting>
L: END
I: RPY 0 0 . 0 52
I: Content-Type: application/beep+xml
I:
I: <greeting />
I: END
Rose Standards Track [Page 33]
^L
RFC 3080 The BEEP Core March 2001
3.1 The TLS Transport Security Profile
Section 6.2 contains the registration for this profile.
3.1.1 Profile Identification and Initialization
The TLS transport security profile is identified as:
http://iana.org/beep/TLS
in the BEEP "profile" element during channel creation.
During channel creation, the corresponding "profile" element in the
BEEP "start" element may contain a "ready" element. If channel
creation is successful, then before sending the corresponding reply,
the BEEP peer processes the "ready" element and includes the
resulting response in the reply, e.g.,
C: MSG 0 1 . 52 158
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/TLS'>
C: <![CDATA[<ready />]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 110 121
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/TLS'>
S: <![CDATA[<proceed />]]>
S: </profile>
S: END
Rose Standards Track [Page 34]
^L
RFC 3080 The BEEP Core March 2001
Note that it is possible for the channel to be created, but for the
encapsulated operation to fail, e.g.,
C: MSG 0 1 . 52 173
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/TLS'>
C: <![CDATA[<ready version="oops" />]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 110 193
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/TLS'>
S: <![CDATA[<error code='501'>version attribute
S: poorly formed in <ready> element</error>]]>
S: </profile>
S: END
In this case, a positive reply is sent (as channel creation
succeeded), but the encapsulated response contains an indication as
to why the operation failed.
3.1.2 Message Syntax
Section 7.2 defines the messages that are used in the TLS transport
security profile.
Rose Standards Track [Page 35]
^L
RFC 3080 The BEEP Core March 2001
3.1.3 Message Semantics
3.1.3.1 The Ready Message
The "ready" element has an optional "version" attribute and no
content:
o the "version" element defines the earliest version of TLS
acceptable for use.
When a BEEP peer sends the "ready" element, it must not send any
further traffic on the underlying transport service until a
corresponding reply ("proceed" or "error") is received; similarly,
the receiving BEEP peer must wait until any pending replies have been
generated and sent before it processes a "ready" element.
3.1.3.2 The Proceed Message
The "proceed" element has no attributes and no content. It is sent
as a reply to the "ready" element.
When a BEEP peer receives the "ready" element, it must not send any
further traffic on the underlying transport service until it
generates a corresponding reply. If the BEEP peer decides to allow
transport security negotiation, it implicitly closes all channels
(including channel zero), and sends the "proceed" element, and awaits
the underlying negotiation process for transport security.
When a BEEP peer receives a "proceed" element in reply to its "ready"
message, it implicitly closes all channels (including channel zero),
and immediately begins the underlying negotiation process for
transport security.
Rose Standards Track [Page 36]
^L
RFC 3080 The BEEP Core March 2001
4. User Authentication
When a BEEP session is established, anonymous access, without trace
information, is provided. Accordingly, user authentication in BEEP
is achieved using an initial tuning profile.
This document defines a family of profiles based on SASL mechanisms:
o each mechanism in the IANA SASL registry [15] has an associated
profile.
Other profiles may be defined and deployed on a bilateral basis.
Whenever a successful authentication occurs, on any channel, the
authenticated identity is updated for all existing and future
channels on the BEEP session; further, no additional attempts at
authentication are allowed.
Note that regardless of transport security and user authentication,
authorization is an internal matter for each BEEP peer. As such,
each peer may choose to restrict the operations it allows based on
the authentication credentials provided (i.e., unauthorized
operations might be rejected with error code 530).
Rose Standards Track [Page 37]
^L
RFC 3080 The BEEP Core March 2001
4.1 The SASL Family of Profiles
Section 6.3 contains the registration for this profile.
Note that SASL may provide both user authentication and transport
security. Once transport security is successfully negotiated for a
BEEP session, then a SASL security layer must not be negotiated;
similarly, once any SASL negotiation is successful, a transport
security profile must not begin its underlying negotiation process.
Section 4 of the SASL specification [4] requires the following
information be supplied by a protocol definition:
service name: "beep"
initiation sequence: Creating a channel using a BEEP profile
corresponding to a SASL mechanism starts the exchange. An
optional parameter corresponding to the "initial response" sent by
the client is carried within a "blob" element during channel
creation.
exchange sequence: "Challenges" and "responses" are carried in
exchanges of the "blob" element. The "status" attribute of the
"blob" element is used both by a server indicating a successful
completion of the exchange, and a client aborting the exchange,
The server indicates failure of the exchange by sending an "error"
element.
security layer negotiation: When a security layer starts negotiation,
all channels (including channel zero) are closed on the BEEP
session. Accordingly, upon completion of the negotiation process,
regardless of its outcome, a new greeting is issued by both BEEP
peers.
If a security layer is successfully negotiated, it takes effect
immediately following the message that concludes the server's
successful completion reply.
use of the authorization identity: This is made available to all
channels for the duration of the BEEP session.
Rose Standards Track [Page 38]
^L
RFC 3080 The BEEP Core March 2001
4.1.1 Profile Identification and Initialization
Each SASL mechanism registered with the IANA is identified as:
http://iana.org/beep/SASL/mechanism
where "MECHANISM" is the token assigned to that mechanism by the
IANA.
Note that during channel creation, a BEEP peer may provide multiple
profiles to the remote peer, e.g.,
C: MSG 0 1 . 52 178
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/ANONYMOUS' />
C: <profile uri='http://iana.org/beep/SASL/OTP' />
C: </start>
C: END
S: RPY 0 1 . 221 87
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/SASL/OTP' />
S: END
Rose Standards Track [Page 39]
^L
RFC 3080 The BEEP Core March 2001
During channel creation, the corresponding "profile" element in the
BEEP "start" element may contain a "blob" element. Note that it is
possible for the channel to be created, but for the encapsulated
operation to fail, e.g.,
C: MSG 0 1 . 52 183
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/OTP'>
C: <![CDATA[<blob>AGJsb2NrbWFzdGVy</blob>]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 221 178
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/SASL/OTP'>
S: <![CDATA[<error code='534'>authentication mechanism is
S: too weak</error>]]>
S: </profile>
S: END
In this case, a positive reply is sent (as channel creation
succeeded), but the encapsulated response contains an indication as
to why the operation failed.
Otherwise, the server sends a challenge (or signifies success), e.g.,
C: MSG 0 1 . 52 183
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/OTP'>
C: <![CDATA[<blob>AGJsb2NrbWFzdGVy</blob>]]>
C: </profile>
C: </start>
C: END
S: RPY 0 1 . 221 171
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/SASL/OTP'>
S: <![CDATA[<blob>b3RwLXNoYTEgOTk5NyBwaXh5bWlzYXM4NTgwNSBleHQ=
</blob>]]>
S: </profile>
S: END
Rose Standards Track [Page 40]
^L
RFC 3080 The BEEP Core March 2001
Note that this example implies that the "blob" element in the
server's reply appears on two lines -- this is an artifact of the
presentation; in fact, only one line is used.
If a challenge is received, then the client responds and awaits
another reply, e.g.,
C: MSG 1 0 . 0 97
C: Content-Type: application/beep+xml
C:
C: <blob>d29yZDpmZXJuIGhhbmcgYnJvdyBib25nIGhlcmQgdG9n</blob>
C: END
S: RPY 1 0 . 0 66
S: Content-Type: application/beep+xml
S:
S: <blob status='complete' />
S: END
Of course, the client could abort the authentication process by
sending "<blob status='abort' />" instead.
Alternatively, the server might reject the response with an error:
e.g.,
C: MSG 1 0 . 0 97
C: Content-Type: application/beep+xml
C:
C: <blob>d29yZDpmZXJuIGhhbmcgYnJvdyBib25nIGhlcmQgdG9n</blob>
C: END
S: ERR 1 0 . 0 60
S: Content-Type: application/beep+xml
S:
S: <error code='535' />
S: END
Rose Standards Track [Page 41]
^L
RFC 3080 The BEEP Core March 2001
Finally, depending on the SASL mechanism, an initialization element
may be exchanged unidirectionally during channel creation, e.g.,
C: MSG 0 1 . 52 125
C: Content-Type: application/beep+xml
C:
C: <start number='1'>
C: <profile uri='http://iana.org/beep/SASL/CRAM-MD5' />
C: </start>
C: END
S: RPY 0 1 . 221 185
S: Content-Type: application/beep+xml
S:
S: <profile uri='http://iana.org/beep/SASL/CRAM-MD5'>
S: <![CDATA[<blob>PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1
jaS5uZXQ+</blob>]]>
S: </profile>
S: END
Note that this example implies that the "blob" element in the
server's reply appears on two lines -- this is an artifact of the
presentation; in fact, only one line is used.
4.1.2 Message Syntax
Section 7.3 defines the messages that are used for each profile in
the SASL family.
Note that because many SASL mechanisms exchange binary data, the
content of the "blob" element is always a base64-encoded string.
Rose Standards Track [Page 42]
^L
RFC 3080 The BEEP Core March 2001
4.1.3 Message Semantics
The "blob" element has an optional "status" attribute, and arbitrary
octets as its content:
o the "status" attribute, if present, takes one of three values:
abort: used by a client to indicate that it is aborting the
authentication process;
complete: used by a server to indicate that the exchange is
complete and successful; or,
continue: used by either a client or server, otherwise.
Finally, note that SASL's EXTERNAL mechanism works with an "external
authentication" service, which is provided by one of:
o a transport security profile, capable of providing authentication
information (e.g., Section 3.1), being active on the connection;
o a network service, capable of providing strong authentication
(e.g., IPSec [12]), underlying the connection; or,
o a locally-defined security service.
For authentication to succeed, two conditions must hold:
o an external authentication service must be active; and,
o if present, the authentication identity must be consistent with
the credentials provided by the external authentication service
(if the authentication identity is empty, then an authorization
identity is automatically derived from the credentials provided by
the external authentication service).
Rose Standards Track [Page 43]
^L
RFC 3080 The BEEP Core March 2001
5. Registration Templates
5.1 Profile Registration Template
When a profile is registered, the following information is supplied:
Profile Identification: specify a URI [10] that authoritatively
identifies this profile.
Message Exchanged during Channel Creation: specify the datatypes that
may be exchanged during channel creation.
Messages starting one-to-one exchanges: specify the datatypes that
may be present when an exchange starts.
Messages in positive replies: specify the datatypes that may be
present in a positive reply.
Messages in negative replies: specify the datatypes that may be
present in a negative reply.
Messages in one-to-many exchanges: specify the datatypes that may be
present in a one-to-many exchange.
Message Syntax: specify the syntax of the datatypes exchanged by the
profile.
Message Semantics: specify the semantics of the datatypes exchanged
by the profile.
Contact Information: specify the postal and electronic contact
information for the author of the profile.
5.2 Feature Registration Template
When a feature for the channel management profile is registered, the
following information is supplied:
Feature Identification: specify a string that identifies this
feature. Unless the feature is registered with the IANA, the
feature's identification must start with "x-".
Feature Semantics: specify the semantics of the feature.
Contact Information: specify the postal and electronic contact
information for the author of the feature.
Rose Standards Track [Page 44]
^L
RFC 3080 The BEEP Core March 2001
6. Initial Registrations
6.1 Registration: BEEP Channel Management
Profile Identification: not applicable
Messages exchanged during Channel Creation: not applicable
Messages starting one-to-one exchanges: "start" or "close"
Messages in positive replies: "greeting", "profile", or "ok"
Messages in negative replies: "error"
Messages in one-to-many exchanges: none
Message Syntax: c.f., Section 7.1
Message Semantics: c.f., Section 2.3.1
Contact Information: c.f., the "Author's Address" section of this
memo
6.2 Registration: TLS Transport Security Profile
Profile Identification: http://iana.org/beep/TLS
Messages exchanged during Channel Creation: "ready"
Messages starting one-to-one exchanges: "ready"
Messages in positive replies: "proceed"
Messages in negative replies: "error"
Messages in one-to-many exchanges: none
Message Syntax: c.f., Section 7.2
Message Semantics: c.f., Section 3.1.3
Contact Information: c.f., the "Author's Address" section of this
memo
Rose Standards Track [Page 45]
^L
RFC 3080 The BEEP Core March 2001
6.3 Registration: SASL Family of Profiles
Profile Identification: http://iana.org/beep/SASL/mechanism, where
"mechanism" is a token registered with the IANA
Messages exchanged during Channel Creation: "blob"
Messages starting one-to-one exchanges: "blob"
Messages in positive replies: "blob"
Messages in negative replies: "error"
Messages in one-to-many exchanges: none
Message Syntax: c.f., Section 7.3
Message Semantics: c.f., Section 4.1.3
Contact Information: c.f., the "Author's Address" section of this
memo
Rose Standards Track [Page 46]
^L
RFC 3080 The BEEP Core March 2001
6.4 Registration: application/beep+xml
MIME media type name: application
MIME subtype name: beep+xml
Required parameters: none
Optional parameters: charset (defaults to "UTF-8" [13])
Encoding considerations: This media type may contain binary content;
accordingly, when used over a transport that does not permit
binary transfer, an appropriate encoding must be applied
Security considerations: none, per se; however, any BEEP profile
which uses this media type must describe its relevant security
considerations
Interoperability considerations: n/a
Published specification: This media type is a proper subset of the
the XML 1.0 specification [2]. Two restrictions are made.
First, no entity references other than the five predefined general
entities references ("&", "<", ">", "'", and
""") and numeric entity references may be present.
Second, neither the "XML" declaration (e.g., <?xml version="1.0"
?>) nor the "DOCTYPE" declaration (e.g., <!DOCTYPE ...>) may be
present. (Accordingly, if another character set other than UTF-8
is desired, then the "charset" parameter must be present.)
All other XML 1.0 instructions (e.g., CDATA blocks, processing
instructions, and so on) are allowed.
Applications which use this media type: any BEEP profile wishing to
make use of this XML 1.0 subset
Additional Information: none
Contact for further information: c.f., the "Author's Address" section
of this memo
Intended usage: limited use
Author/Change controller: the IESG
Rose Standards Track [Page 47]
^L
RFC 3080 The BEEP Core March 2001
7. DTDs
7.1 BEEP Channel Management DTD
<!--
DTD for BEEP Channel Management, as of 2000-10-29
Refer to this DTD as:
<!ENTITY % BEEP PUBLIC "-//IETF//DTD BEEP//EN"
"http://xml.resource.org/profiles/BEEP/beep.dtd">
%BEEP;
-->
<!--
DTD data types:
entity syntax/reference example
====== ================ =======
a channel number
CHAN 1..2147483647 1
authoritative profile identification
URI c.f., [RFC-2396] http://invisible.net/
one or more feature tokens, separated by space
FTRS NMTOKENS "magic"
a language tag
LANG c.f., [RFC-1766] "en", "en-US", etc.
zero or more language tags
LOCS NMTOKENS "en-US"
a 3-digit reply code
XYZ [1-5][0-9][0-9] 500
-->
<!ENTITY % CHAN "CDATA">
<!ENTITY % URI "CDATA">
<!ENTITY % FTRS "NMTOKENS">
<!ENTITY % LANG "NMTOKEN">
<!ENTITY % LOCS "NMTOKEN">
<!ENTITY % XYZ "CDATA">
Rose Standards Track [Page 48]
^L
RFC 3080 The BEEP Core March 2001
<!--
BEEP messages, exchanged as application/beep+xml
role MSG RPY ERR
======= === === ===
I and L greeting error
I or L start profile error
I or L close ok error
-->
<!ELEMENT greeting (profile)*>
<!ATTLIST greeting
features %FTRS; #IMPLIED
localize %LOCS; "i-default">
<!ELEMENT start (profile)+>
<!ATTLIST start
number %CHAN; #REQUIRED
serverName CDATA #IMPLIED>
<!-- profile element is empty if contained in a greeting -->
<!ELEMENT profile (#PCDATA)>
<!ATTLIST profile
uri %URI; #REQUIRED
encoding (none|base64) "none">
<!ELEMENT close (#PCDATA)>
<!ATTLIST close
number %CHAN; "0"
code %XYZ; #REQUIRED
xml:lang %LANG; #IMPLIED>
<!ELEMENT ok EMPTY>
<!ELEMENT error (#PCDATA)>
<!ATTLIST error
code %XYZ; #REQUIRED
xml:lang %LANG; #IMPLIED>
Rose Standards Track [Page 49]
^L
RFC 3080 The BEEP Core March 2001
7.2 TLS Transport Security Profile DTD
<!--
DTD for the TLS Transport Security Profile, as of 2000-09-04
Refer to this DTD as:
<!ENTITY % TLS PUBLIC "-//IETF//DTD TLS//EN"
"http://xml.resource.org/profiles/TLS/tls.dtd">
%TLS;
-->
<!--
TLS messages, exchanged as application/beep+xml
role MSG RPY ERR
====== === === ===
I or L ready proceed error
-->
<!ELEMENT ready EMPTY>
<!ATTLIST ready
version CDATA "1">
<!ELEMENT proceed EMPTY>
Rose Standards Track [Page 50]
^L
RFC 3080 The BEEP Core March 2001
7.3 SASL Family of Profiles DTD
<!--
DTD for the SASL Family of Profiles, as of 2000-09-04
Refer to this DTD as:
<!ENTITY % SASL PUBLIC "-//IETF//DTD SASL//EN"
"http://xml.resource.org/profiles/sasl/sasl.dtd">
%SASL;
-->
<!--
SASL messages, exchanged as application/beep+xml
role MSG RPY ERR
====== === === ===
I or L blob blob error
-->
<!ELEMENT blob (#PCDATA)>
<!ATTLIST blob
xml:space (default|preserve)
"preserve"
status (abort|complete|continue)
"continue">
Rose Standards Track [Page 51]
^L
RFC 3080 The BEEP Core March 2001
8. Reply Codes
code meaning
==== =======
200 success
421 service not available
450 requested action not taken
(e.g., lock already in use)
451 requested action aborted
(e.g., local error in processing)
454 temporary authentication failure
500 general syntax error
(e.g., poorly-formed XML)
501 syntax error in parameters
(e.g., non-valid XML)
504 parameter not implemented
530 authentication required
534 authentication mechanism insufficient
(e.g., too weak, sequence exhausted, etc.)
535 authentication failure
537 action not authorized for user
538 authentication mechanism requires encryption
550 requested action not taken
(e.g., no requested profiles are acceptable)
553 parameter invalid
554 transaction failed
(e.g., policy violation)
Rose Standards Track [Page 52]
^L
RFC 3080 The BEEP Core March 2001
9. Security Considerations
The BEEP framing mechanism, per se, provides no protection against
attack; however, judicious use of initial tuning profiles provides
varying degrees of assurance:
1. If one of the profiles from the SASL family is used, refer to
[4]'s Section 9 for a discussion of security considerations.
2. If the TLS transport security profile is used (or if a SASL
security layer is negotiated), then:
1. A man-in-the-middle may remove the security-related profiles
from the BEEP greeting or generate a negative reply to the
"ready" element of the TLS transport security profile. A
BEEP peer may be configurable to refuse to proceed without an
acceptable level of privacy.
2. A man-in-the-middle may cause a down-negotiation to the
weakest cipher suite available. A BEEP peer should be
configurable to refuse weak cipher suites.
3. A man-in-the-middle may modify any protocol exchanges prior
to a successful negotiation. Upon completing the
negotiation, a BEEP peer must discard previously cached
information about the BEEP session.
As different TLS ciphersuites provide varying levels of security,
administrators should carefully choose which ciphersuites are
provisioned.
As BEEP is peer-to-peer in nature, before performing any task
associated with a message, each channel should apply the appropriate
access control based on the authenticated identity and privacy level
associated with the BEEP session.
Rose Standards Track [Page 53]
^L
RFC 3080 The BEEP Core March 2001
References
[1] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Bodies",
RFC 2045, November 1996.
[2] World Wide Web Consortium, "Extensible Markup Language (XML)
1.0", W3C XML, February 1998, <http://www.w3.org/TR/1998/REC-
xml-19980210>.
[3] Dierks, T., Allen, C., Treese, W., Karlton, P., Freier, A. and
P. Kocher, "The TLS Protocol Version 1.0", RFC 2246, January
1999.
[4] Myers, J., "Simple Authentication and Security Layer (SASL)",
RFC 2222, October 1997.
[5] Rose, M., "Mapping the BEEP Core onto TCP", RFC 3081, March
2001.
[6] Postel, J., "Transmission Control Protocol", STD 7, RFC 793,
September 1981.
[7] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 2234, November 1997.
[8] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982,
August 1996.
[9] Alvestrand, H., "Tags for the Identification of Languages", RFC
BCP 47, RFC 3066, January 2001.
[10] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, August
1998.
[11] Newman, C., "The One-Time-Password SASL Mechanism", RFC 2444,
October 1998.
[12] Kent, S. and R. Atkinson, "Security Architecture for the
Internet Protocol", RFC 2401, November 1998.
[13] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
2279, January 1998.
[14] Linn, J., "Generic Security Service Application Program
Interface, Version 2", RFC 2078, January 1997.
Rose Standards Track [Page 54]
^L
RFC 3080 The BEEP Core March 2001
[15] <http://www.isi.edu/in-notes/iana/assignments/sasl-mechanisms>
Author's Address
Marshall T. Rose
Invisible Worlds, Inc.
1179 North McDowell Boulevard
Petaluma, CA 94954-6559
US
Phone: +1 707 789 3700
EMail: mrose@invisible.net
URI: http://invisible.net/
Rose Standards Track [Page 55]
^L
RFC 3080 The BEEP Core March 2001
Appendix A. Acknowledgements
The author gratefully acknowledges the contributions of: David Clark,
Dave Crocker, Steve Deering, Wesley Michael Eddy, Huston Franklin,
Marco Gazzetta, Danny Goodman, Steve Harris, Robert Herriot, Ken
Hirsch, Greg Hudson, Ben Laurie, Carl Malamud, Michael Mealling,
Keith McCloghrie, Paul Mockapetris, RL 'Bob' Morgan, Frank Morton,
Darren New, Chris Newman, Joe Touch, Paul Vixie, Gabe Wachob, Daniel
Woods, and, James Woodyatt. In particular, Dave Crocker provided
helpful suggestions on the nature of segmentation in the framing
mechanism.
Rose Standards Track [Page 56]
^L
RFC 3080 The BEEP Core March 2001
Appendix B. IANA Considerations
The IANA registers "beep" as a GSSAPI [14] service name, as specified
in Section 4.1.
The IANA maintains a list of:
o standards-track BEEP profiles, c.f., Section 5.1; and,
o standards-track features for the channel management profile, c.f.,
Section 5.2.
For each list, the IESG is responsible for assigning a designated
expert to review the specification prior to the IANA making the
assignment. As a courtesy to developers of non-standards track BEEP
profiles and channel management features, the mailing list
bxxpwg@invisible.net may be used to solicit commentary.
The IANA makes the registrations specified in Section 6.2 and Section
6.3. It is recommended that the IANA register these profiles using
the IANA as a URI-prefix, and populate those URIs with the respective
profile registrations.
Rose Standards Track [Page 57]
^L
RFC 3080 The BEEP Core March 2001
Full Copyright Statement
Copyright (C) The Internet Society (2001). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Rose Standards Track [Page 58]
^L
|