summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc1508.txt
blob: 132b855e05e6db846cd0d097bf1ad11bbd6cac08 (plain) (blame)
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
Network Working Group                                            J. Linn
Request for Comments: 1508                         Geer Zolot Associates
                                                          September 1993


         Generic Security Service Application Program Interface

Status of this Memo

   This RFC 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" for the standardization state and status
   of this protocol.  Distribution of this memo is unlimited.

Abstract

   This Generic Security Service Application Program Interface (GSS-API)
   definition provides security services to callers in a generic
   fashion, supportable with a range of underlying mechanisms and
   technologies and hence allowing source-level portability of
   applications to different environments. This specification defines
   GSS-API services and primitives at a level independent of underlying
   mechanism and programming language environment, and is to be
   complemented by other, related specifications:

        documents defining specific parameter bindings for particular
        language environments

        documents defining token formats, protocols, and procedures to
        be implemented in order to realize GSS-API services atop
        particular security mechanisms

Table of Contents

   1. GSS-API Characteristics and Concepts .......................    2
   1.1. GSS-API Constructs .......................................    5
   1.1.1.  Credentials ...........................................    5
   1.1.2.  Tokens ................................................    6
   1.1.3.  Security Contexts .....................................    7
   1.1.4.  Mechanism Types .......................................    8
   1.1.5.  Naming ................................................    9
   1.1.6.  Channel Bindings ......................................   10
   1.2.  GSS-API Features and Issues .............................   11
   1.2.1.  Status Reporting ......................................   11
   1.2.2.  Per-Message Security Service Availability .............   12
   1.2.3.  Per-Message Replay Detection and Sequencing ...........   13
   1.2.4.  Quality of Protection .................................   15



Linn                                                            [Page 1]
^L
RFC 1508               Generic Security Interface         September 1993


   2. Interface Descriptions .....................................   15
   2.1.  Credential management calls .............................   17
   2.1.1.  GSS_Acquire_cred call .................................   17
   2.1.2.  GSS_Release_cred call .................................   19
   2.1.3.  GSS_Inquire_cred call .................................   20
   2.2.  Context-level calls .....................................   21
   2.2.1.  GSS_Init_sec_context call .............................   21
   2.2.2.  GSS_Accept_sec_context call ...........................   26
   2.2.3.  GSS_Delete_sec_context call ...........................   29
   2.2.4.  GSS_Process_context_token call ........................   30
   2.2.5.  GSS_Context_time call .................................   31
   2.3.  Per-message calls .......................................   32
   2.3.1.  GSS_Sign call .........................................   32
   2.3.2.  GSS_Verify call .......................................   33
   2.3.3.  GSS_Seal call .........................................   35
   2.3.4.  GSS_Unseal call .......................................   36
   2.4.  Support calls ...........................................   37
   2.4.1.  GSS_Display_status call ...............................   37
   2.4.2.  GSS_Indicate_mechs call ...............................   38
   2.4.3.  GSS_Compare_name call .................................   38
   2.4.4.  GSS_Display_name call .................................   39
   2.4.5.  GSS_Import_name call ..................................   40
   2.4.6.  GSS_Release_name call .................................   41
   2.4.7.  GSS_Release_buffer call ...............................   41
   2.4.8.  GSS_Release_oid_set call ..............................   42
   3. Mechanism-Specific Example Scenarios .......................   42
   3.1.  Kerberos V5, single-TGT .................................   43
   3.2.  Kerberos V5, double-TGT .................................   43
   3.3.  X.509 Authentication Framework ..........................   44
   4. Related Activities .........................................   45
   5. Acknowledgments ............................................   46
   6. Security Considerations ....................................   46
   7. Author's Address ...........................................   46
   Appendix A ....................................................   47
   Appendix B ....................................................   48
   Appendix C ....................................................   49

1. GSS-API Characteristics and Concepts

   The operational paradigm in which GSS-API operates is as follows. A
   typical GSS-API caller is itself a communications protocol, calling
   on GSS-API in order to protect its communications with
   authentication, integrity, and/or confidentiality security services.
   A GSS-API caller accepts tokens provided to it by its local GSS-API
   implementation and transfers the tokens to a peer on a remote system;
   that peer passes the received tokens to its local GSS-API
   implementation for processing. The security services available
   through GSS-API in this fashion are implementable (and have been



Linn                                                            [Page 2]
^L
RFC 1508               Generic Security Interface         September 1993


   implemented) over a range of underlying mechanisms based on secret-
   key and public-key cryptographic technologies.

   The GSS-API separates the operations of initializing a security
   context between peers, achieving peer entity authentication (This
   security service definition, and other definitions used in this
   document, corresponds to that provided in International Standard ISO
   7498-2-1988(E), Security Architecture.) (GSS_Init_sec_context() and
   GSS_Accept_sec_context() calls), from the operations of providing
   per-message data origin authentication and data integrity protection
   (GSS_Sign() and GSS_Verify() calls) for messages subsequently
   transferred in conjunction with that context. Per-message GSS_Seal()
   and GSS_Unseal() calls provide the data origin authentication and
   data integrity services which GSS_Sign() and GSS_Verify() offer, and
   also support selection of confidentiality services as a caller
   option.  Additional calls provide supportive functions to the GSS-
   API's users.

   The following paragraphs provide an example illustrating the
   dataflows involved in use of the GSS-API by a client and server in a
   mechanism-independent fashion, establishing a security context and
   transferring a protected message. The example assumes that credential
   acquisition has already been completed.  The example assumes that the
   underlying authentication technology is capable of authenticating a
   client to a server using elements carried within a single token, and
   of authenticating the server to the client (mutual authentication)
   with a single returned token; this assumption holds for presently-
   documented CAT mechanisms but is not necessarily true for other
   cryptographic technologies and associated protocols.

   The client calls GSS_Init_sec_context()  to establish a security
   context to the server identified by targ_name, and elects to set the
   mutual_req_flag so that mutual authentication is performed in the
   course of context establishment. GSS_Init_sec_context()  returns an
   output_token to be passed to the server, and indicates
   GSS_CONTINUE_NEEDED status pending completion of the mutual
   authentication sequence. Had mutual_req_flag not been set, the
   initial call to GSS_Init_sec_context()  would have returned
   GSS_COMPLETE status. The client sends the output_token to the server.

   The server passes the received token as the input_token parameter to
   GSS_Accept_sec_context().  GSS_Accept_sec_context indicates
   GSS_COMPLETE status, provides the client's authenticated identity in
   the src_name result, and provides an output_token to be passed to the
   client. The server sends the output_token to the client.

   The client passes the received token as the input_token parameter to
   a successor call to GSS_Init_sec_context(),  which processes data



Linn                                                            [Page 3]
^L
RFC 1508               Generic Security Interface         September 1993


   included in the token in order to achieve mutual authentication from
   the client's viewpoint. This call to GSS_Init_sec_context()  returns
   GSS_COMPLETE status, indicating successful mutual authentication and
   the completion of context establishment for this example.

   The client generates a data message and passes it to GSS_Seal().
   GSS_Seal() performs data origin authentication, data integrity, and
   (optionally) confidentiality processing on the message and
   encapsulates the result into output_message, indicating GSS_COMPLETE
   status. The client sends the output_message to the server.

   The server passes the received message to GSS_Unseal().  GSS_Unseal
   inverts the encapsulation performed by GSS_Seal(),  deciphers the
   message if the optional confidentiality feature was applied, and
   validates the data origin authentication and data integrity checking
   quantities. GSS_Unseal()  indicates successful validation by
   returning GSS_COMPLETE status along with the resultant
   output_message.

   For purposes of this example, we assume that the server knows by
   out-of-band means that this context will have no further use after
   one protected message is transferred from client to server. Given
   this premise, the server now calls GSS_Delete_sec_context() to flush
   context-level information. GSS_Delete_sec_context() returns a
   context_token for the server to pass to the client.

   The client passes the returned context_token to
   GSS_Process_context_token(),  which returns GSS_COMPLETE status after
   deleting context-level information at the client system.

   The GSS-API design assumes and addresses several basic goals,
   including:

      Mechanism independence: The GSS-API defines an interface to
      cryptographically implemented strong authentication and other
      security services at a generic level which is independent of
      particular underlying mechanisms. For example, GSS-API-provided
      services can be implemented by secret-key technologies (e.g.,
      Kerberos) or public-key approaches (e.g., X.509).

      Protocol environment independence: The GSS-API is independent of
      the communications protocol suites with which it is employed,
      permitting use in a broad range of protocol environments. In
      appropriate environments, an intermediate implementation "veneer"
      which is oriented to a particular communication protocol (e.g.,
      Remote Procedure Call (RPC)) may be interposed between
      applications which call that protocol and the GSS-API, thereby
      invoking GSS-API facilities in conjunction with that protocol's



Linn                                                            [Page 4]
^L
RFC 1508               Generic Security Interface         September 1993


      communications invocations.

      Protocol association independence: The GSS-API's security context
      construct is independent of communications protocol association
      constructs. This characteristic allows a single GSS-API
      implementation to be utilized by a variety of invoking protocol
      modules on behalf of those modules' calling applications. GSS-API
      services can also be invoked directly by applications, wholly
      independent of protocol associations.

      Suitability to a range of implementation placements: GSS-API
      clients are not constrained to reside within any Trusted Computing
      Base (TCB) perimeter defined on a system where the GSS-API is
      implemented; security services are specified in a manner suitable
      to both intra-TCB and extra-TCB callers.

1.1. GSS-API Constructs

   This section describes the basic elements comprising the GSS-API.

1.1.1.  Credentials

   Credentials structures provide the prerequisites enabling peers to
   establish security contexts with each other. A caller may designate
   that its default credential be used for context establishment calls
   without presenting an explicit handle to that credential.
   Alternately, those GSS-API callers which need to make explicit
   selection of particular credentials structures may make references to
   those credentials through GSS-API-provided credential handles
   ("cred_handles").

   A single credential structure may be used for initiation of outbound
   contexts and acceptance of inbound contexts. Callers needing to
   operate in only one of these modes may designate this fact when
   credentials are acquired for use, allowing underlying mechanisms to
   optimize their processing and storage requirements. The credential
   elements defined by a particular mechanism may contain multiple
   cryptographic keys, e.g., to enable authentication and message
   encryption to be performed with different algorithms.

   A single credential structure may accommodate credential information
   associated with multiple underlying mechanisms (mech_types); a
   credential structure's contents will vary depending on the set of
   mech_types supported by a particular GSS-API implementation.
   Commonly, a single mech_type will be used for all security contexts
   established by a particular initiator to a particular target; the
   primary motivation for supporting credential sets representing
   multiple mech_types is to allow initiators on systems which are



Linn                                                            [Page 5]
^L
RFC 1508               Generic Security Interface         September 1993


   equipped to handle multiple types to initiate contexts to targets on
   other systems which can accommodate only a subset of the set
   supported at the initiator's system.

   It is the responsibility of underlying system-specific mechanisms and
   OS functions below the GSS-API to ensure that the ability to acquire
   and use credentials associated with a given identity is constrained
   to appropriate processes within a system. This responsibility should
   be taken seriously by implementors, as the ability for an entity to
   utilize a principal's credentials is equivalent to the entity's
   ability to successfully assert that principal's identity.

   Once a set of GSS-API credentials is established, the transferability
   of that credentials set to other processes or analogous constructs
   within a system is a local matter, not defined by the GSS-API. An
   example local policy would be one in which any credentials received
   as a result of login to a given user account, or of delegation of
   rights to that account, are accessible by, or transferable to,
   processes running under that account.

   The credential establishment process (particularly when performed on
   behalf of users rather than server processes) is likely to require
   access to passwords or other quantities which should be protected
   locally and exposed for the shortest time possible. As a result, it
   will often be appropriate for preliminary credential establishment to
   be performed through local means at user login time, with the
   result(s) cached for subsequent reference. These preliminary
   credentials would be set aside (in a system-specific fashion) for
   subsequent use, either:

      to be accessed by an invocation of the GSS-API GSS_Acquire_cred()
      call, returning an explicit handle to reference that credential

      as the default credentials installed on behalf of a process

1.1.2. Tokens

   Tokens are data elements transferred between GSS-API callers, and are
   divided into two classes. Context-level tokens are exchanged in order
   to establish and manage a security context between peers. Per-message
   tokens are exchanged in conjunction with an established context to
   provide protective security services for corresponding data messages.
   The internal contents of both classes of tokens are specific to the
   particular underlying mechanism used to support the GSS-API; Appendix
   B of this document provides a uniform recommendation for designers of
   GSS-API support mechanisms, encapsulating mechanism-specific
   information along with a globally-interpretable mechanism identifier.




Linn                                                            [Page 6]
^L
RFC 1508               Generic Security Interface         September 1993


   Tokens are opaque from the viewpoint of GSS-API callers. They are
   generated within the GSS-API implementation at an end system,
   provided to a GSS-API caller to be transferred to the peer GSS-API
   caller at a remote end system, and processed by the GSS-API
   implementation at that remote end system. Tokens may be output by
   GSS-API primitives (and are to be transferred to GSS-API peers)
   independent of the status indications which those primitives
   indicate. Token transfer may take place in an in-band manner,
   integrated into the same protocol stream used by the GSS-API callers
   for other data transfers, or in an out-of-band manner across a
   logically separate channel.

   Development of GSS-API support primitives based on a particular
   underlying cryptographic technique and protocol does not necessarily
   imply that GSS-API callers invoking that GSS-API mechanism type will
   be able to interoperate with peers invoking the same technique and
   protocol outside the GSS-API paradigm.  For example, the format of
   GSS-API tokens defined in conjunction with a particular mechanism,
   and the techniques used to integrate those tokens into callers'
   protocols, may not be the same as those used by non-GSS-API callers
   of the same underlying technique.

1.1.3.  Security Contexts

   Security contexts are established between peers, using credentials
   established locally in conjunction with each peer or received by
   peers via delegation. Multiple contexts may exist simultaneously
   between a pair of peers, using the same or different sets of
   credentials. Coexistence of multiple contexts using different
   credentials allows graceful rollover when credentials expire.
   Distinction among multiple contexts based on the same credentials
   serves applications by distinguishing different message streams in a
   security sense.

   The GSS-API is independent of underlying protocols and addressing
   structure, and depends on its callers to transport GSS-API-provided
   data elements. As a result of these factors, it is a caller
   responsibility to parse communicated messages, separating GSS-API-
   related data elements from caller-provided data.  The GSS-API is
   independent of connection vs. connectionless orientation of the
   underlying communications service.

   No correlation between security context and communications protocol
   association is dictated. (The optional channel binding facility,
   discussed in Section 1.1.6 of this document, represents an
   intentional exception to this rule, supporting additional protection
   features within GSS-API supporting mechanisms.) This separation
   allows the GSS-API to be used in a wide range of communications



Linn                                                            [Page 7]
^L
RFC 1508               Generic Security Interface         September 1993


   environments, and also simplifies the calling sequences of the
   individual calls. In many cases (depending on underlying security
   protocol, associated mechanism, and availability of cached
   information), the state information required for context setup can be
   sent concurrently with initial signed user data, without interposing
   additional message exchanges.

1.1.4.  Mechanism Types

   In order to successfully establish a security context with a target
   peer, it is necessary to identify an appropriate underlying mechanism
   type (mech_type) which both initiator and target peers support. The
   definition of a mechanism embodies not only the use of a particular
   cryptographic technology (or a hybrid or choice among alternative
   cryptographic technologies), but also definition of the syntax and
   semantics of data element exchanges which that mechanism will employ
   in order to support security services.

   It is recommended that callers initiating contexts specify the
   "default" mech_type value, allowing system-specific functions within
   or invoked by the GSS-API implementation to select the appropriate
   mech_type, but callers may direct that a particular mech_type be
   employed when necessary.

   The means for identifying a shared mech_type to establish a security
   context with a peer will vary in different environments and
   circumstances; examples include (but are not limited to):

      use of a fixed mech_type, defined by configuration, within an
      environment

      syntactic convention on a target-specific basis, through
      examination of a target's name

      lookup of a target's name in a naming service or other database in
      order to identify mech_types supported by that target

      explicit negotiation between GSS-API callers in advance of
      security context setup

   When transferred between GSS-API peers, mech_type specifiers (per
   Appendix B, represented as Object Identifiers (OIDs)) serve to
   qualify the interpretation of associated tokens. (The structure and
   encoding of Object Identifiers is defined in ISO/IEC 8824,
   "Specification of Abstract Syntax Notation One (ASN.1)" and in
   ISO/IEC 8825, "Specification of Basic Encoding Rules for Abstract
   Syntax Notation One (ASN.1)".) Use of hierarchically structured OIDs
   serves to preclude ambiguous interpretation of mech_type specifiers.



Linn                                                            [Page 8]
^L
RFC 1508               Generic Security Interface         September 1993


   The OID representing the DASS MechType, for example, is
   1.3.12.2.1011.7.5.

1.1.5.  Naming

   The GSS-API avoids prescription of naming structures, treating the
   names transferred across the interface in order to initiate and
   accept security contexts as opaque octet string quantities.  This
   approach supports the GSS-API's goal of implementability atop a range
   of underlying security mechanisms, recognizing the fact that
   different mechanisms process and authenticate names which are
   presented in different forms. Generalized services offering
   translation functions among arbitrary sets of naming environments are
   outside the scope of the GSS-API; availability and use of local
   conversion functions to translate among the naming formats supported
   within a given end system is anticipated.

   Two distinct classes of name representations are used in conjunction
   with different GSS-API parameters:

      a printable form (denoted by OCTET STRING), for acceptance from
      and presentation to users; printable name forms are accompanied by
      OID tags identifying the namespace to which they correspond

      an internal form (denoted by INTERNAL NAME), opaque to callers and
      defined by individual GSS-API implementations; GSS-API
      implementations supporting multiple namespace types are
      responsible for maintaining internal tags to disambiguate the
      interpretation of particular names

      Tagging of printable names allows GSS-API callers and underlying
      GSS-API mechanisms to disambiguate name types and to determine
      whether an associated name's type is one which they are capable of
      processing, avoiding aliasing problems which could result from
      misinterpreting a name of one type as a name of another type.

   In addition to providing means for names to be tagged with types,
   this specification defines primitives to support a level of naming
   environment independence for certain calling applications. To provide
   basic services oriented towards the requirements of callers which
   need not themselves interpret the internal syntax and semantics of
   names, GSS-API calls for name comparison (GSS_Compare_name()),
   human-readable display (GSS_Display_name()),  input conversion
   (GSS_Import_name()), and internal name deallocation
   (GSS_Release_name())  functions are defined. (It is anticipated that
   these proposed GSS-API calls will be implemented in many end systems
   based on system-specific name manipulation primitives already extant
   within those end systems; inclusion within the GSS-API is intended to



Linn                                                            [Page 9]
^L
RFC 1508               Generic Security Interface         September 1993


   offer GSS-API callers a portable means to perform specific
   operations, supportive of authorization and audit requirements, on
   authenticated names.)

   GSS_Import_name()  implementations can, where appropriate, support
   more than one printable syntax corresponding to a given namespace
   (e.g., alternative printable representations for X.500 Distinguished
   Names), allowing flexibility for their callers to select among
   alternative representations. GSS_Display_name() implementations
   output a printable syntax selected as appropriate to their
   operational environments; this selection is a local matter. Callers
   desiring portability across alternative printable syntaxes should
   refrain from implementing comparisons based on printable name forms
   and should instead use the GSS_Compare_name()  call to determine
   whether or not one internal-format name matches another.

1.1.6.  Channel Bindings

   The GSS-API accommodates the concept of caller-provided channel
   binding ("chan_binding") information, used by GSS-API callers to bind
   the establishment of a security context to relevant characteristics
   (e.g., addresses, transformed representations of encryption keys) of
   the underlying communications channel and of protection mechanisms
   applied to that communications channel.  Verification by one peer of
   chan_binding information provided by the other peer to a context
   serves to protect against various active attacks. The caller
   initiating a security context must determine the chan_binding values
   before making the GSS_Init_sec_context()  call, and consistent values
   must be provided by both peers to a context. Callers should not
   assume that underlying mechanisms provide confidentiality protection
   for channel binding information.

   Use or non-use of the GSS-API channel binding facility is a caller
   option, and GSS-API supporting mechanisms can support operation in an
   environment where NULL channel bindings are presented. When non-NULL
   channel bindings are used, certain mechanisms will offer enhanced
   security value by interpreting the bindings' content (rather than
   simply representing those bindings, or signatures computed on them,
   within tokens) and will therefore depend on presentation of specific
   data in a defined format. To this end, agreements among mechanism
   implementors are defining conventional interpretations for the
   contents of channel binding arguments, including address specifiers
   (with content dependent on communications protocol environment) for
   context initiators and acceptors. (These conventions are being
   incorporated into related documents.) In order for GSS-API callers to
   be portable across multiple mechanisms and achieve the full security
   functionality available from each mechanism, it is strongly
   recommended that GSS-API callers provide channel bindings consistent



Linn                                                           [Page 10]
^L
RFC 1508               Generic Security Interface         September 1993


   with these conventions and those of the networking environment in
   which they operate.

1.2.  GSS-API Features and Issues

   This section describes aspects of GSS-API operations, of the security
   services which the GSS-API provides, and provides commentary on
   design issues.

1.2.1.  Status Reporting

   Each GSS-API call provides two status return values. Major_status
   values provide a mechanism-independent indication of call status
   (e.g., GSS_COMPLETE, GSS_FAILURE, GSS_CONTINUE_NEEDED), sufficient to
   drive normal control flow within the caller in a generic fashion.
   Table 1 summarizes the defined major_status return codes in tabular
   fashion.

   Table 1: GSS-API Major Status Codes

      FATAL ERROR CODES

      GSS_BAD_BINDINGS             channel binding mismatch
      GSS_BAD_MECH                 unsupported mechanism requested
      GSS_BAD_NAME                 invalid name provided
      GSS_BAD_NAMETYPE             name of unsupported type provided
      GSS_BAD_STATUS               invalid input status selector
      GSS_BAD_SIG                  token had invalid signature
      GSS_CONTEXT_EXPIRED          specified security context expired
      GSS_CREDENTIALS_EXPIRED      expired credentials detected
      GSS_DEFECTIVE_CREDENTIAL     defective credential detected
      GSS_DEFECTIVE_TOKEN          defective token detected
      GSS_FAILURE                  failure, unspecified at GSS-API
                                   level
      GSS_NO_CONTEXT               no valid security context specified
      GSS_NO_CRED                  no valid credentials provided

      INFORMATORY STATUS CODES

      GSS_COMPLETE                 normal completion
      GSS_CONTINUE_NEEDED          continuation call to routine
                                   required
      GSS_DUPLICATE_TOKEN          duplicate per-message token
                                   detected
      GSS_OLD_TOKEN                timed-out per-message token
                                   detected
      GSS_UNSEQ_TOKEN              out-of-order per-message token
                                   detected



Linn                                                           [Page 11]
^L
RFC 1508               Generic Security Interface         September 1993


   Minor_status provides more detailed status information which may
   include status codes specific to the underlying security mechanism.
   Minor_status values are not specified in this document.

   GSS_CONTINUE_NEEDED major_status returns, and optional message
   outputs, are provided in GSS_Init_sec_context()  and
   GSS_Accept_sec_context()  calls so that different mechanisms'
   employment of different numbers of messages within their
   authentication sequences need not be reflected in separate code paths
   within calling applications. Instead, such cases are accomodated with
   sequences of continuation calls to GSS_Init_sec_context()  and
   GSS_Accept_sec_context().  The same mechanism is used to encapsulate
   mutual authentication within the GSS-API's context initiation calls.

   For mech_types which require interactions with third-party servers in
   order to establish a security context, GSS-API context establishment
   calls may block pending completion of such third-party interactions.
   On the other hand, no GSS-API calls pend on serialized interactions
   with GSS-API peer entities.  As a result, local GSS-API status
   returns cannot reflect unpredictable or asynchronous exceptions
   occurring at remote peers, and reflection of such status information
   is a caller responsibility outside the GSS-API.

1.2.2. Per-Message Security Service Availability

   When a context is established, two flags are returned to indicate the
   set of per-message protection security services which will be
   available on the context:

      the integ_avail flag indicates whether per-message integrity and
      data origin authentication services are available

      the conf_avail flag indicates whether per-message confidentiality
      services are available, and will never be returned TRUE unless the
      integ_avail flag is also returned TRUE

      GSS-API callers desiring per-message security services should
      check the values of these flags at context establishment time, and
      must be aware that a returned FALSE value for integ_avail means
      that invocation of GSS_Sign()  or GSS_Seal() primitives on the
      associated context will apply no cryptographic protection to user
      data messages.

   The GSS-API per-message protection service primitives, as the
   category name implies, are oriented to operation at the granularity
   of protocol data units. They perform cryptographic operations on the
   data units, transfer cryptographic control information in tokens,
   and, in the case of GSS_Seal(), encapsulate the protected data unit.



Linn                                                           [Page 12]
^L
RFC 1508               Generic Security Interface         September 1993


   As such, these primitives are not oriented to efficient data
   protection for stream-paradigm protocols (e.g., Telnet) if
   cryptography must be applied on an octet-by-octet basis.

1.2.3. Per-Message Replay Detection and Sequencing

   Certain underlying mech_types are expected to offer support for
   replay detection and/or sequencing of messages transferred on the
   contexts they support. These optionally-selectable protection
   features are distinct from replay detection and sequencing features
   applied to the context establishment operation itself; the presence
   or absence of context-level replay or sequencing features is wholly a
   function of the underlying mech_type's capabilities, and is not
   selected or omitted as a caller option.

   The caller initiating a context provides flags (replay_det_req_flag
   and sequence_req_flag) to specify whether the use of per-message
   replay detection and sequencing features is desired on the context
   being established. The GSS-API implementation at the initiator system
   can determine whether these features are supported (and whether they
   are optionally selectable) as a function of mech_type, without need
   for bilateral negotiation with the target. When enabled, these
   features provide recipients with indicators as a result of GSS-API
   processing of incoming messages, identifying whether those messages
   were detected as duplicates or out-of-sequence. Detection of such
   events does not prevent a suspect message from being provided to a
   recipient; the appropriate course of action on a suspect message is a
   matter of caller policy.

   The semantics of the replay detection and sequencing services applied
   to received messages, as visible across the interface which the GSS-
   API provides to its clients, are as follows:

   When replay_det_state is TRUE, the possible major_status returns for
   well-formed and correctly signed messages are as follows:

      1. GSS_COMPLETE indicates that the message was within the window
      (of time or sequence space) allowing replay events to be detected,
      and that the message was not a replay of a previously-processed
      message within that window.

      2. GSS_DUPLICATE_TOKEN indicates that the signature on the
      received message was correct, but that the message was recognized
      as a duplicate of a previously-processed message.

      3. GSS_OLD_TOKEN indicates that the signature on the received
      message was correct, but that the message is too old to be checked
      for duplication.



Linn                                                           [Page 13]
^L
RFC 1508               Generic Security Interface         September 1993


   When sequence_state is TRUE, the possible major_status returns for
   well-formed and correctly signed messages are as follows:

      1. GSS_COMPLETE indicates that the message was within the window
      (of time or sequence space) allowing replay events to be detected,
      and that the message was not a replay of a previously-processed
      message within that window.

      2. GSS_DUPLICATE_TOKEN indicates that the signature on the
      received message was correct, but that the message was recognized
      as a duplicate of a previously-processed message.

      3. GSS_OLD_TOKEN indicates that the signature on the received
      message was correct, but that the token is too old to be checked
      for duplication.

      4. GSS_UNSEQ_TOKEN indicates that the signature on the received
      message was correct, but that it is earlier in a sequenced stream
      than a message already processed on the context.  [Note:
      Mechanisms can be architected to provide a stricter form of
      sequencing service, delivering particular messages to recipients
      only after all predecessor messages in an ordered stream have been
      delivered.  This type of support is incompatible with the GSS-API
      paradigm in which recipients receive all messages, whether in
      order or not, and provide them (one at a time, without intra-GSS-
      API message buffering) to GSS-API routines for validation.  GSS-
      API facilities provide supportive functions, aiding clients to
      achieve strict message stream integrity in an efficient manner in
      conjunction with sequencing provisions in communications
      protocols, but the GSS-API does not offer this level of message
      stream integrity service by itself.]

   As the message stream integrity features (especially sequencing) may
   interfere with certain applications' intended communications
   paradigms, and since support for such features is likely to be
   resource intensive, it is highly recommended that mech_types
   supporting these features allow them to be activated selectively on
   initiator request when a context is established. A context initiator
   and target are provided with corresponding indicators
   (replay_det_state and sequence_state), signifying whether these
   features are active on a given context.

   An example mech_type supporting per-message replay detection could
   (when replay_det_state is TRUE) implement the feature as follows: The
   underlying mechanism would insert timestamps in data elements output
   by GSS_Sign() and GSS_Seal(), and would maintain (within a time-
   limited window) a cache (qualified by originator-recipient pair)
   identifying received data elements processed by GSS_Verify() and



Linn                                                           [Page 14]
^L
RFC 1508               Generic Security Interface         September 1993


   GSS_Unseal(). When this feature is active, exception status returns
   (GSS_DUPLICATE_TOKEN, GSS_ OLD_TOKEN) will be provided when
   GSS_Verify() or GSS_Unseal() is presented with a message which is
   either a detected duplicate of a prior message or which is too old to
   validate against a cache of recently received messages.

1.2.4.  Quality of Protection

   Some mech_types will provide their users with fine granularity
   control over the means used to provide per-message protection,
   allowing callers to trade off security processing overhead
   dynamically against the protection requirements of particular
   messages. A per-message quality-of-protection parameter (analogous to
   quality-of-service, or QOS) selects among different QOP options
   supported by that mechanism. On context establishment for a multi-QOP
   mech_type, context-level data provides the prerequisite data for a
   range of protection qualities.

   It is expected that the majority of callers will not wish to exert
   explicit mechanism-specific QOP control and will therefore request
   selection of a default QOP. Definitions of, and choices among, non-
   default QOP values are mechanism-specific, and no ordered sequences
   of QOP values can be assumed equivalent across different mechanisms.
   Meaningful use of non-default QOP values demands that callers be
   familiar with the QOP definitions of an underlying mechanism or
   mechanisms, and is therefore a non-portable construct.

2.  Interface Descriptions

   This section describes the GSS-API's service interface, dividing the
   set of calls offered into four groups. Credential management calls
   are related to the acquisition and release of credentials by
   principals. Context-level calls are related to the management of
   security contexts between principals. Per-message calls are related
   to the protection of individual messages on established security
   contexts. Support calls provide ancillary functions useful to GSS-API
   callers. Table 2 groups and summarizes the calls in tabular fashion.














Linn                                                           [Page 15]
^L
RFC 1508               Generic Security Interface         September 1993


      Table 2:  GSS-API Calls

      CREDENTIAL MANAGEMENT

      GSS_Acquire_cred             acquire credentials for use
      GSS_Release_cred             release credentials after use
      GSS_Inquire_cred             display information about
                                   credentials

      CONTEXT-LEVEL CALLS

      GSS_Init_sec_context         initiate outbound security context
      GSS_Accept_sec_context       accept inbound security context
      GSS_Delete_sec_context       flush context when no longer needed
      GSS_Process_context_token    process received control token on
                                   context
      GSS_Context_time             indicate validity time remaining on
                                   context

      PER-MESSAGE CALLS

      GSS_Sign                     apply signature, receive as token
                                   separate from message
      GSS_Verify                   validate signature token along with
                                   message
      GSS_Seal                     sign, optionally encrypt,
                                   encapsulate
      GSS_Unseal                   decapsulate, decrypt if needed,
                                   validate signature

      SUPPORT CALLS

      GSS_Display_status           translate status codes to printable
                                   form
      GSS_Indicate_mechs           indicate mech_types supported on
                                   local system
      GSS_Compare_name             compare two names for equality
      GSS_Display_name             translate name to printable form
      GSS_Import_name              convert printable name to
                                   normalized form
      GSS_Release_name             free storage of normalized-form
                                   name
      GSS_Release_buffer           free storage of printable name
      GSS_Release_oid_set          free storage of OID set object







Linn                                                           [Page 16]
^L
RFC 1508               Generic Security Interface         September 1993


2.1.  Credential management calls

   These GSS-API calls provide functions related to the management of
   credentials. Their characterization with regard to whether or not
   they may block pending exchanges with other network entities (e.g.,
   directories or authentication servers) depends in part on OS-specific
   (extra-GSS-API) issues, so is not specified in this document.

   The GSS_Acquire_cred()  call is defined within the GSS-API in support
   of application portability, with a particular orientation towards
   support of portable server applications. It is recognized that (for
   certain systems and mechanisms) credentials for interactive users may
   be managed differently from credentials for server processes; in such
   environments, it is the GSS-API implementation's responsibility to
   distinguish these cases and the procedures for making this
   distinction are a local matter. The GSS_Release_cred()  call provides
   a means for callers to indicate to the GSS-API that use of a
   credentials structure is no longer required. The GSS_Inquire_cred()
   call allows callers to determine information about a credentials
   structure.

2.1.1.  GSS_Acquire_cred call

   Inputs:

   o  desired_name INTERNAL NAME, -NULL requests locally-determined
      default

   o  lifetime_req INTEGER,-in seconds; 0 requests default

   o  desired_mechs SET OF OBJECT IDENTIFIER,-empty set requests
      system-selected default

   o  cred_usage INTEGER-0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
      2=ACCEPT-ONLY

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_cred_handle OCTET STRING,

   o  actual_mechs SET OF OBJECT IDENTIFIER,

   o  lifetime_rec INTEGER -in seconds, or reserved value for
      INDEFINITE



Linn                                                           [Page 17]
^L
RFC 1508               Generic Security Interface         September 1993


   Return major_status codes:

   o  GSS_COMPLETE indicates that requested credentials were
      successfully established, for the duration indicated in
      lifetime_rec, suitable for the usage requested in cred_usage, for
      the set of mech_types indicated in actual_mechs, and that those
      credentials can be referenced for subsequent use with the handle
      returned in output_cred_handle.

   o  GSS_BAD_MECH indicates that a mech_type unsupported by the GSS-API
      implementation type was requested, causing the credential
      establishment operation to fail.

   o  GSS_BAD_NAMETYPE indicates that the provided desired_name is
      uninterpretable or of a type unsupported by the supporting GSS-API
      implementation, so no credentials could be established for the
      accompanying desired_name.

   o  GSS_BAD_NAME indicates that the provided desired_name is
      inconsistent in terms of internally-incorporated type specifier
      information, so no credentials could be established for the
      accompanying desired_name.

   o  GSS_FAILURE indicates that credential establishment failed for
      reasons unspecified at the GSS-API level, including lack of
      authorization to establish and use credentials associated with the
      identity named in the input desired_name argument.

   GSS_Acquire_cred()  is used to acquire credentials so that a
   principal can (as a function of the input cred_usage parameter)
   initiate and/or accept security contexts under the identity
   represented by the desired_name input argument. On successful
   completion, the returned output_cred_handle result provides a handle
   for subsequent references to the acquired credentials.  Typically,
   single-user client processes using only default credentials for
   context establishment purposes will have no need to invoke this call.

   A caller may provide the value NULL for desired_name, signifying a
   request for credentials corresponding to a default principal
   identity.  The procedures used by GSS-API implementations to select
   the appropriate principal identity in response to this form of
   request are local matters. It is possible that multiple pre-
   established credentials may exist for the same principal identity
   (for example, as a result of multiple user login sessions) when
   GSS_Acquire_cred() is called; the means used in such cases to select
   a specific credential are local matters.  The input lifetime_req
   argument to GSS_Acquire_cred() may provide useful information for
   local GSS-API implementations to employ in making this disambiguation



Linn                                                           [Page 18]
^L
RFC 1508               Generic Security Interface         September 1993


   in a manner which will best satisfy a caller's intent.

   The lifetime_rec result indicates the length of time for which the
   acquired credentials will be valid, as an offset from the present. A
   mechanism may return a reserved value indicating INDEFINITE if no
   constraints on credential lifetime are imposed.  A caller of
   GSS_Acquire_cred()  can request a length of time for which acquired
   credentials are to be valid (lifetime_req argument), beginning at the
   present, or can request credentials with a default validity interval.
   (Requests for postdated credentials are not supported within the
   GSS-API.) Certain mechanisms and implementations may bind in
   credential validity period specifiers at a point preliminary to
   invocation of the GSS_Acquire_cred() call (e.g., in conjunction with
   user login procedures). As a result, callers requesting non-default
   values for lifetime_req must recognize that such requests cannot
   always be honored and must be prepared to accommodate the use of
   returned credentials with different lifetimes as indicated in
   lifetime_rec.

   The caller of GSS_Acquire_cred() can explicitly specify a set of
   mech_types which are to be accommodated in the returned credentials
   (desired_mechs argument), or can request credentials for a system-
   defined default set of mech_types. Selection of the system-specified
   default set is recommended in the interests of application
   portability. The actual_mechs return value may be interrogated by the
   caller to determine the set of mechanisms with which the returned
   credentials may be used.

2.1.2.  GSS_Release_cred call

   Input:

   o  cred_handle OCTET STRING-NULL specifies default credentials

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER

   Return major_status codes:

   o  GSS_COMPLETE indicates that the credentials referenced by the
      input cred_handle were released for purposes of subsequent access
      by the caller. The effect on other processes which may be
      authorized shared access to such credentials is a local matter.





Linn                                                           [Page 19]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_NO_CRED indicates that no release operation was performed,
      either because the input cred_handle was invalid or because the
      caller lacks authorization to access the referenced credentials.

   o  GSS_FAILURE indicates that the release operation failed for
      reasons unspecified at the GSS-API level.

   Provides a means for a caller to explicitly request that credentials
   be released when their use is no longer required. Note that system-
   specific credential management functions are also likely to exist,
   for example to assure that credentials shared among processes are
   properly deleted when all affected processes terminate, even if no
   explicit release requests are issued by those processes.  Given the
   fact that multiple callers are not precluded from gaining authorized
   access to the same credentials, invocation of GSS_Release_cred()
   cannot be assumed to delete a particular set of credentials on a
   system-wide basis.

2.1.3.  GSS_Inquire_cred call

      Input:

      o  cred_handle OCTET STRING -NULL specifies default credentials

      Outputs:

      o  major_status INTEGER,

      o  minor_status INTEGER,

      o  cred_name INTERNAL NAME,

      o  lifetime_rec INTEGER -in seconds, or reserved value for
         INDEFINITE

      o  cred_usage INTEGER, -0=INITIATE-AND-ACCEPT, 1=INITIATE-ONLY,
         2=ACCEPT-ONLY

      o  mech_set SET OF OBJECT IDENTIFIER

      Return major_status codes:

      o  GSS_COMPLETE indicates that the credentials referenced by the
         input cred_handle argument were valid, and that the output
         cred_name, lifetime_rec, and cred_usage values represent,
         respectively, the credentials' associated principal name,
         remaining lifetime, suitable usage modes, and supported
         mechanism types.



Linn                                                           [Page 20]
^L
RFC 1508               Generic Security Interface         September 1993


      o  GSS_NO_CRED indicates that no information could be returned
         about the referenced credentials, either because the input
         cred_handle was invalid or because the caller lacks
         authorization to access the referenced credentials.

      o  GSS_FAILURE indicates that the release operation failed for
         reasons unspecified at the GSS-API level.

   The GSS_Inquire_cred()  call is defined primarily for the use of
   those callers which make use of default credentials rather than
   acquiring credentials explicitly with GSS_Acquire_cred().  It enables
   callers to determine a credential structure's associated principal
   name, remaining validity period, usability for security context
   initiation and/or acceptance, and supported mechanisms.

2.2.  Context-level calls

   This group of calls is devoted to the establishment and management of
   security contexts between peers. A context's initiator calls
   GSS_Init_sec_context(),  resulting in generation of a token which the
   caller passes to the target. At the target, that token is passed to
   GSS_Accept_sec_context().  Depending on the underlying mech_type and
   specified options, additional token exchanges may be performed in the
   course of context establishment; such exchanges are accommodated by
   GSS_CONTINUE_NEEDED status returns from GSS_Init_sec_context()  and
   GSS_Accept_sec_context().  Either party to an established context may
   invoke GSS_Delete_sec_context()  to flush context information when a
   context is no longer required. GSS_Process_context_token()  is used
   to process received tokens carrying context-level control
   information. GSS_Context_time()  allows a caller to determine the
   length of time for which an established context will remain valid.

2.2.1.  GSS_Init_sec_context call

   Inputs:

   o  claimant_cred_handle OCTET STRING, -NULL specifies "use
      default"

   o  input_context_handle INTEGER, -0 specifies "none assigned
      yet"

   o  targ_name INTERNAL NAME,

   o  mech_type OBJECT IDENTIFIER, -NULL parameter specifies "use
      default"

   o  deleg_req_flag BOOLEAN,



Linn                                                           [Page 21]
^L
RFC 1508               Generic Security Interface         September 1993


   o  mutual_req_flag BOOLEAN,

   o  replay_det_req_flag BOOLEAN,

   o  sequence_req_flag BOOLEAN,

   o  lifetime_req INTEGER,-0 specifies default lifetime

   o  chan_bindings OCTET STRING,

   o  input_token OCTET STRING-NULL or token received from target

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_context_handle INTEGER,

   o  mech_type OBJECT IDENTIFIER, -actual mechanism always
      indicated, never NULL

   o  output_token OCTET STRING, -NULL or token to pass to context
      target

   o  deleg_state BOOLEAN,

   o  mutual_state BOOLEAN,

   o  replay_det_state BOOLEAN,

   o  sequence_state BOOLEAN,

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,

   o  lifetime_rec INTEGER - in seconds, or reserved value for
      INDEFINITE

   This call may block pending network interactions for those mech_types
   in which an authentication server or other network entity must be
   consulted on behalf of a context initiator in order to generate an
   output_token suitable for presentation to a specified target.

   Return major_status codes:




Linn                                                           [Page 22]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_COMPLETE indicates that context-level information was
      successfully initialized, and that the returned output_token will
      provide sufficient information for the target to perform per-
      message processing on the newly-established context.

   o  GSS_CONTINUE_NEEDED indicates that control information in the
      returned output_token must be sent to the target, and that a reply
      must be received and passed as the input_token argument to a
      continuation call to GSS_Init_sec_context(),  before per-message
      processing can be performed in conjunction with this context.

   o  GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
      the input_token failed, preventing further processing from being
      performed based on that token.

   o  GSS_DEFECTIVE_CREDENTIAL indicates that consistency checks
      performed on the credential structure referenced by
      claimant_cred_handle failed, preventing further processing from
      being performed using that credential structure.

   o  GSS_BAD_SIG indicates that the received input_token contains an
      incorrect signature, so context setup cannot be accomplished.

   o  GSS_NO_CRED indicates that no context was established, either
      because the input cred_handle was invalid, because the referenced
      credentials are valid for context acceptor use only, or because
      the caller lacks authorization to access the referenced
      credentials.

   o  GSS_CREDENTIALS_EXPIRED indicates that the credentials provided
      through the input claimant_cred_handle argument are no longer
      valid, so context establishment cannot be completed.

   o  GSS_BAD_BINDINGS indicates that a mismatch between the caller-
      provided chan_bindings and those extracted from the input_token
      was detected, signifying a security-relevant event and preventing
      context establishment. (This result will be returned by
      GSS_Init_sec_context only for contexts where mutual_state is
      TRUE.)

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided; this major status will be
      returned only for successor calls following GSS_CONTINUE_NEEDED
      status returns.

   o  GSS_BAD_NAMETYPE indicates that the provided targ_name is of a
      type uninterpretable or unsupported by the supporting GSS-API
      implementation, so context establishment cannot be completed.



Linn                                                           [Page 23]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_BAD_NAME indicates that the provided targ_name is inconsistent
      in terms of internally-incorporated type specifier information, so
      context establishment cannot be accomplished.

   o  GSS_FAILURE indicates that context setup could not be accomplished
      for reasons unspecified at the GSS-API level, and that no
      interface-defined recovery action is available.

   This routine is used by a context initiator, and ordinarily emits one
   (or, for the case of a multi-step exchange, more than one)
   output_token suitable for use by the target within the selected
   mech_type's protocol. Using information in the credentials structure
   referenced by claimant_cred_handle, GSS_Init_sec_context()
   initializes the data structures required to establish a security
   context with target targ_name. The claimant_cred_handle must
   correspond to the same valid credentials structure on the initial
   call to GSS_Init_sec_context()  and on any successor calls resulting
   from GSS_CONTINUE_NEEDED status returns; different protocol sequences
   modeled by the GSS_CONTINUE_NEEDED mechanism will require access to
   credentials at different points in the context establishment
   sequence.

   The input_context_handle argument is 0, specifying "not yet
   assigned", on the first GSS_Init_sec_context()  call relating to a
   given context. That call returns an output_context_handle for future
   references to this context. When continuation attempts to
   GSS_Init_sec_context()  are needed to perform context establishment,
   the previously-returned non-zero handle value is entered into the
   input_context_handle argument and will be echoed in the returned
   output_context_handle argument. On such continuation attempts (and
   only on continuation attempts) the input_token value is used, to
   provide the token returned from the context's target.

   The chan_bindings argument is used by the caller to provide
   information binding the security context to security-related
   characteristics (e.g., addresses, cryptographic keys) of the
   underlying communications channel. See Section 1.1.6 of this document
   for more discussion of this argument's usage.

   The input_token argument contains a message received from the target,
   and is significant only on a call to GSS_Init_sec_context() which
   follows a previous return indicating GSS_CONTINUE_NEEDED
   major_status.

   It is the caller's responsibility to establish a communications path
   to the target, and to transmit any returned output_token (independent
   of the accompanying returned major_status value) to the target over
   that path. The output_token can, however, be transmitted along with



Linn                                                           [Page 24]
^L
RFC 1508               Generic Security Interface         September 1993


   the first application-provided input message to be processed by
   GSS_Sign() or GSS_Seal() in conjunction with a successfully-
   established context.

   The initiator may request various context-level functions through
   input flags: the deleg_req_flag requests delegation of access rights,
   the mutual_req_flag requests mutual authentication, the
   replay_det_req_flag requests that replay detection features be
   applied to messages transferred on the established context, and the
   sequence_req_flag requests that sequencing be enforced. (See Section
   1.2.3 for more information on replay detection and sequencing
   features.)

   Not all of the optionally-requestable features will be available in
   all underlying mech_types; the corresponding return state values
   (deleg_state, mutual_state, replay_det_state, sequence_state)
   indicate, as a function of mech_type processing capabilities and
   initiator-provided input flags, the set of features which will be
   active on the context. These state indicators' values are undefined
   unless the routine's major_status indicates COMPLETE. Failure to
   provide the precise set of features requested by the caller does not
   cause context establishment to fail; it is the caller's prerogative
   to delete the context if the feature set provided is unsuitable for
   the caller's use.  The returned mech_type value indicates the
   specific mechanism employed on the context, and will never indicate
   the value for "default".

   The conf_avail return value indicates whether the context supports
   per-message confidentiality services, and so informs the caller
   whether or not a request for encryption through the conf_req_flag
   input to GSS_Seal() can be honored. In similar fashion, the
   integ_avail return value indicates whether per-message integrity
   services are available (through either GSS_Sign() or GSS_Seal()) on
   the established context.

   The lifetime_req input specifies a desired upper bound for the
   lifetime of the context to be established, with a value of 0 used to
   request a default lifetime. The lifetime_rec return value indicates
   the length of time for which the context will be valid, expressed as
   an offset from the present; depending on mechanism capabilities,
   credential lifetimes, and local policy, it may not correspond to the
   value requested in lifetime_req.  If no constraints on context
   lifetime are imposed, this may be indicated by returning a reserved
   value representing INDEFINITE lifetime_req. The values of conf_avail,
   integ_avail, and lifetime_rec are undefined unless the routine's
   major_status indicates COMPLETE.

   If the mutual_state is TRUE, this fact will be reflected within the



Linn                                                           [Page 25]
^L
RFC 1508               Generic Security Interface         September 1993


   output_token. A call to GSS_Accept_sec_context() at the target in
   conjunction with such a context will return a token, to be processed
   by a continuation call to GSS_Init_sec_context(), in order to achieve
   mutual authentication.

2.2.2.  GSS_Accept_sec_context call

   Inputs:

   o  acceptor_cred_handle OCTET STRING,-NULL specifies "use
      default"

   o  input_context_handle INTEGER, -0 specifies "not yet assigned"

   o  chan_bindings OCTET STRING,

   o  input_token OCTET STRING

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  src_name INTERNAL NAME,

   o  mech_type OBJECT IDENTIFIER,

   o  output_context_handle INTEGER,

   o  deleg_state BOOLEAN,

   o  mutual_state BOOLEAN,

   o  replay_det_state BOOLEAN,

   o  sequence_state BOOLEAN,

   o  conf_avail BOOLEAN,

   o  integ_avail BOOLEAN,

   o  lifetime_rec INTEGER, - in seconds, or reserved value for
      INDEFINITE

   o  delegated_cred_handle OCTET STRING,

   o  output_token OCTET STRING -NULL or token to pass to context



Linn                                                           [Page 26]
^L
RFC 1508               Generic Security Interface         September 1993


      initiator

   This call may block pending network interactions for those mech_types
   in which a directory service or other network entity must be
   consulted on behalf of a context acceptor in order to validate a
   received input_token.

   Return major_status codes:

   o  GSS_COMPLETE indicates that context-level data structures were
      successfully initialized, and that per-message processing can now
      be performed in conjunction with this context.

   o  GSS_CONTINUE_NEEDED indicates that control information in the
      returned output_token must be sent to the initiator, and that a
      response must be received and passed as the input_token argument
      to a continuation call to GSS_Accept_sec_context(), before per-
      message processing can be performed in conjunction with this
      context.

   o  GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
      the input_token failed, preventing further processing from being
      performed based on that token.

   o  GSS_DEFECTIVE_CREDENTIAL indicates that consistency checks
      performed on the credential structure referenced by
      acceptor_cred_handle failed, preventing further processing from
      being performed using that credential structure.

   o  GSS_BAD_SIG indicates that the received input_token contains an
      incorrect signature, so context setup cannot be accomplished.

   o  GSS_DUPLICATE_TOKEN indicates that the signature on the received
      input_token was correct, but that the input_token was recognized
      as a duplicate of an input_token already processed. No new context
      is established.

   o  GSS_OLD_TOKEN indicates that the signature on the received
      input_token was correct, but that the input_token is too old to be
      checked for duplication against previously-processed input_tokens.
      No new context is established.

   o  GSS_NO_CRED indicates that no context was established, either
      because the input cred_handle was invalid, because the referenced
      credentials are valid for context initiator use only, or because
      the caller lacks authorization to access the referenced
      credentials.




Linn                                                           [Page 27]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_CREDENTIALS_EXPIRED indicates that the credentials provided
      through the input acceptor_cred_handle argument are no longer
      valid, so context establishment cannot be completed.

   o  GSS_BAD_BINDINGS indicates that a mismatch between the caller-
      provided chan_bindings and those extracted from the input_token
      was detected, signifying a security-relevant event and preventing
      context establishment.

   o GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided; this major status will be
      returned only for successor calls following GSS_CONTINUE_NEEDED
      status returns.

   o  GSS_FAILURE indicates that context setup could not be accomplished
      for reasons unspecified at the GSS-API level, and that no
      interface-defined recovery action is available.

   The GSS_Accept_sec_context()  routine is used by a context target.
   Using information in the credentials structure referenced by the
   input acceptor_cred_handle, it verifies the incoming input_token and
   (following the successful completion of a context establishment
   sequence) returns the authenticated src_name and the mech_type used.
   The acceptor_cred_handle must correspond to the same valid
   credentials structure on the initial call to GSS_Accept_sec_context()
   and on any successor calls resulting from GSS_CONTINUE_NEEDED status
   returns; different protocol sequences modeled by the
   GSS_CONTINUE_NEEDED mechanism will require access to credentials at
   different points in the context establishment sequence.

   The input_context_handle argument is 0, specifying "not yet
   assigned", on the first GSS_Accept_sec_context()  call relating to a
   given context. That call returns an output_context_handle for future
   references to this context; when continuation attempts to
   GSS_Accept_sec_context()  are needed to perform context
   establishment, that handle value will be entered into the
   input_context_handle argument.

   The chan_bindings argument is used by the caller to provide
   information binding the security context to security-related
   characteristics (e.g., addresses, cryptographic keys) of the
   underlying communications channel. See Section 1.1.6 of this document
   for more discussion of this argument's usage.

   The returned state results (deleg_state, mutual_state,
   replay_det_state, and sequence_state) reflect the same context state
   values as returned to GSS_Init_sec_context()'s  caller at the
   initiator system.



Linn                                                           [Page 28]
^L
RFC 1508               Generic Security Interface         September 1993


   The conf_avail return value indicates whether the context supports
   per-message confidentiality services, and so informs the caller
   whether or not a request for encryption through the conf_req_flag
   input to GSS_Seal()  can be honored. In similar fashion, the
   integ_avail return value indicates whether per-message integrity
   services are available (through either GSS_Sign()  or GSS_Seal())  on
   the established context.

   The lifetime_rec return value indicates the length of time for which
   the context will be valid, expressed as an offset from the present.
   The values of deleg_state, mutual_state, replay_det_state,
   sequence_state, conf_avail, integ_avail, and lifetime_rec are
   undefined unless the accompanying major_status indicates COMPLETE.

   The delegated_cred_handle result is significant only when deleg_state
   is TRUE, and provides a means for the target to reference the
   delegated credentials. The output_token result, when non-NULL,
   provides a context-level token to be returned to the context
   initiator to continue a multi-step context establishment sequence. As
   noted with GSS_Init_sec_context(),  any returned token should be
   transferred to the context's peer (in this case, the context
   initiator), independent of the value of the accompanying returned
   major_status.

   Note: A target must be able to distinguish a context-level
   input_token, which is passed to GSS_Accept_sec_context(),  from the
   per-message data elements passed to GSS_Verify()  or GSS_Unseal().
   These data elements may arrive in a single application message, and
   GSS_Accept_sec_context()  must be performed before per-message
   processing can be performed successfully.

2.2.3. GSS_Delete_sec_context call

   Input:

   o  context_handle INTEGER

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_context_token OCTET STRING

   Return major_status codes:





Linn                                                           [Page 29]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_COMPLETE indicates that the context was recognized, that
      relevant context-specific information was flushed, and that the
      returned output_context_token is ready for transfer to the
      context's peer.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provide, so no deletion was performed.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      GSS_Delete_sec_context()  operation could not be performed for
      reasons unspecified at the GSS-API level.

   This call may block pending network interactions for mech_types in
   which active notification must be made to a central server when a
   security context is to be deleted.

   This call can be made by either peer in a security context, to flush
   context-specific information and to return an output_context_token
   which can be passed to the context's peer informing it that the
   peer's corresponding context information can also be flushed. (Once a
   context is established, the peers involved are expected to retain
   cached credential and context-related information until the
   information's expiration time is reached or until a
   GSS_Delete_sec_context() call is made.) Attempts to perform per-
   message processing on a deleted context will result in error returns.

2.2.4.  GSS_Process_context_token call

   Inputs:

   o  context_handle INTEGER,

   o  input_context_token OCTET STRING

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   Return major_status codes:

   o  GSS_COMPLETE indicates that the input_context_token was
      successfully processed in conjunction with the context referenced
      by context_handle.

   o  GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
      the received context_token failed, preventing further processing



Linn                                                           [Page 30]
^L
RFC 1508               Generic Security Interface         September 1993


      from being performed with that token.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      GSS_Process_context_token()  operation could not be performed for
      reasons unspecified at the GSS-API level.

   This call is used to process context_tokens received from a peer once
   a context has been established, with corresponding impact on
   context-level state information. One use for this facility is
   processing of the context_tokens generated by
   GSS_Delete_sec_context();  GSS_Process_context_token() will not block
   pending network interactions for that purpose. Another use is to
   process tokens indicating remote-peer context establishment failures
   after the point where the local GSS-API implementation has already
   indicated GSS_COMPLETE status.

2.2.5.  GSS_Context_time call

   Input:

   o  context_handle INTEGER,

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  lifetime_rec INTEGER - in seconds, or reserved value for
      INDEFINITE

   Return major_status codes:

   o  GSS_COMPLETE indicates that the referenced context is valid, and
      will remain valid for the amount of time indicated in
      lifetime_rec.

   o  GSS_CONTEXT_EXPIRED indicates that data items related to the
      referenced context have expired.

   o  GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
      but that its associated credentials have expired.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.



Linn                                                           [Page 31]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_FAILURE indicates that the requested operation failed for
      reasons unspecified at the GSS-API level.

   This call is used to determine the amount of time for which a
   currently established context will remain valid.

2.3.  Per-message calls

   This group of calls is used to perform per-message protection
   processing on an established security context. None of these calls
   block pending network interactions. These calls may be invoked by a
   context's initiator or by the context's target.  The four members of
   this group should be considered as two pairs; the output from
   GSS_Sign()  is properly input to GSS_Verify(),  and the output from
   GSS_Seal() is properly input to GSS_Unseal().

   GSS_Sign()  and GSS_Verify() support data origin authentication and
   data integrity services. When GSS_Sign()  is invoked on an input
   message, it yields a per-message token containing data items which
   allow underlying mechanisms to provide the specified security
   services. The original message, along with the generated per-message
   token, is passed to the remote peer; these two data elements are
   processed by GSS_Verify(),  which validates the message in
   conjunction with the separate token.

   GSS_Seal()  and GSS_Unseal() support caller-requested confidentiality
   in addition to the data origin authentication and data integrity
   services offered by GSS_Sign()  and GSS_Verify(). GSS_Seal()  outputs
   a single data element, encapsulating optionally enciphered user data
   as well as associated token data items.  The data element output from
   GSS_Seal()  is passed to the remote peer and processed by
   GSS_Unseal()  at that system. GSS_Unseal() combines decipherment (as
   required) with validation of data items related to authentication and
   integrity.

2.3.1.  GSS_Sign call

   Inputs:

   o  context_handle INTEGER,

   o  qop_req INTEGER,-0 specifies default QOP

   o  message OCTET STRING

   Outputs:

   o  major_status INTEGER,



Linn                                                           [Page 32]
^L
RFC 1508               Generic Security Interface         September 1993


   o  minor_status INTEGER,

   o  per_msg_token OCTET STRING

   Return major_status codes:

   o  GSS_COMPLETE indicates that a signature, suitable for an
      established security context, was successfully applied and that
      the message and corresponding per_msg_token are ready for
      transmission.

   o  GSS_CONTEXT_EXPIRED indicates that context-related data items have
      expired, so that the requested operation cannot be performed.

   o  GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
      but that its associated credentials have expired, so that the
      requested operation cannot be performed.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      requested operation could not be performed for reasons unspecified
      at the GSS-API level.

   Using the security context referenced by context_handle, apply a
   signature to the input message (along with timestamps and/or other
   data included in support of mech_type-specific mechanisms) and return
   the result in per_msg_token. The qop_req parameter allows quality-
   of-protection control. The caller passes the message and the
   per_msg_token to the target.

   The GSS_Sign()  function completes before the message and
   per_msg_token is sent to the peer; successful application of
   GSS_Sign()  does not guarantee that a corresponding GSS_Verify() has
   been (or can necessarily be) performed successfully when the message
   arrives at the destination.

2.3.2.  GSS_Verify call

   Inputs:

   o  context_handle INTEGER,

   o  message OCTET STRING,

   o  per_msg_token OCTET STRING




Linn                                                           [Page 33]
^L
RFC 1508               Generic Security Interface         September 1993


   Outputs:

   o  qop_state INTEGER,

   o  major_status INTEGER,

   o  minor_status INTEGER,

   Return major_status codes:

   o  GSS_COMPLETE indicates that the message was successfully verified.

   o  GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
      the received per_msg_token failed, preventing further processing
      from being performed with that token.

   o  GSS_BAD_SIG indicates that the received per_msg_token contains an
      incorrect signature for the message.

   o  GSS_DUPLICATE_TOKEN, GSS_OLD_TOKEN, and GSS_UNSEQ_TOKEN values
      appear in conjunction with the optional per-message replay
      detection features described in Section 1.2.3; their semantics are
      described in that section.

   o  GSS_CONTEXT_EXPIRED indicates that context-related data items have
      expired, so that the requested operation cannot be performed.

   o  GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
      but that its associated credentials have expired, so that the
      requested operation cannot be performed.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      GSS_Verify()  operation could not be performed for reasons
      unspecified at the GSS-API level.

   Using the security context referenced by context_handle, verify that
   the input per_msg_token contains an appropriate signature for the
   input message, and apply any active replay detection or sequencing
   features. Return an indication of the quality-of-protection applied
   to the processed message in the qop_state result.








Linn                                                           [Page 34]
^L
RFC 1508               Generic Security Interface         September 1993


2.3.3. GSS_Seal call

   Inputs:

   o  context_handle INTEGER,

   o  conf_req_flag BOOLEAN,

   o  qop_req INTEGER,-0 specifies default QOP

   o  input_message OCTET STRING

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  conf_state BOOLEAN,

   o  output_message OCTET STRING

   Return major_status codes:

   o  GSS_COMPLETE indicates that the input_message was successfully
      processed and that the output_message is ready for transmission.

   o  GSS_CONTEXT_EXPIRED indicates that context-related data items have
      expired, so that the requested operation cannot be performed.

   o  GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
      but that its associated credentials have expired, so that the
      requested operation cannot be performed.

   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      GSS_Seal()  operation could not be performed for reasons
      unspecified at the GSS-API level.

   Performs the data origin authentication and data integrity functions
   of GSS_Sign().  If the input conf_req_flag is TRUE, requests that
   confidentiality be applied to the input_message.  Confidentiality may
   not be supported in all mech_types or by all implementations; the
   returned conf_state flag indicates whether confidentiality was
   provided for the input_message. The qop_req parameter allows
   quality-of-protection control.



Linn                                                           [Page 35]
^L
RFC 1508               Generic Security Interface         September 1993


   In all cases, the GSS_Seal()  call yields a single output_message
   data element containing (optionally enciphered) user data as well as
   control information.

2.3.4. GSS_Unseal call

   Inputs:

   o  context_handle INTEGER,

   o  input_message OCTET STRING

   Outputs:

   o  conf_state BOOLEAN,

   o  qop_state INTEGER,

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_message OCTET STRING

   Return major_status codes:

   o  GSS_COMPLETE indicates that the input_message was successfully
      processed and that the resulting output_message is available.

   o  GSS_DEFECTIVE_TOKEN indicates that consistency checks performed on
      the per_msg_token extracted from the input_message failed,
      preventing further processing from being performed.

   o  GSS_BAD_SIG indicates that an incorrect signature was detected for
      the message.

   o  GSS_DUPLICATE_TOKEN, GSS_OLD_TOKEN, and GSS_UNSEQ_TOKEN values
      appear in conjunction with the optional per-message replay
      detection features described in Section 1.2.3; their semantics are
      described in that section.

   o  GSS_CONTEXT_EXPIRED indicates that context-related data items have
      expired, so that the requested operation cannot be performed.

   o  GSS_CREDENTIALS_EXPIRED indicates that the context is recognized,
      but that its associated credentials have expired, so that the
      requested operation cannot be performed.




Linn                                                           [Page 36]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_NO_CONTEXT indicates that no valid context was recognized for
      the input context_handle provided.

   o  GSS_FAILURE indicates that the context is recognized, but that the
      GSS_Unseal()  operation could not be performed for reasons
      unspecified at the GSS-API level.

   Processes a data element generated (and optionally enciphered) by
   GSS_Seal(),  provided as input_message. The returned conf_state value
   indicates whether confidentiality was applied to the input_message.
   If conf_state is TRUE, GSS_Unseal()  deciphers the input_message.
   Returns an indication of the quality-of-protection applied to the
   processed message in the qop_state result. GSS_Seal()  performs the
   data integrity and data origin authentication checking functions of
   GSS_Verify()  on the plaintext data. Plaintext data is returned in
   output_message.

2.4.  Support calls

   This group of calls provides support functions useful to GSS-API
   callers, independent of the state of established contexts. Their
   characterization with regard to blocking or non-blocking status in
   terms of network interactions is unspecified.

2.4.1.  GSS_Display_status call

   Inputs:

   o  status_value INTEGER,-GSS-API major_status or minor_status
      return value

   o  status_type INTEGER,-1 if major_status, 2 if minor_status

   o  mech_type OBJECT IDENTIFIER-mech_type to be used for minor_
      status translation

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  status_string_set SET OF OCTET STRING

   Return major_status codes:

   o  GSS_COMPLETE indicates that a valid printable status
      representation (possibly representing more than one status event



Linn                                                           [Page 37]
^L
RFC 1508               Generic Security Interface         September 1993


      encoded within the status_value) is available in the returned
      status_string_set.

   o  GSS_BAD_MECH indicates that translation in accordance with an
      unsupported mech_type was requested, so translation could not be
      performed.

   o  GSS_BAD_STATUS indicates that the input status_value was invalid,
      or that the input status_type carried a value other than 1 or 2,
      so translation could not be performed.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Provides a means for callers to translate GSS-API-returned major and
   minor status codes into printable string representations.

2.4.2.  GSS_Indicate_mechs call

   Input:

   o  (none)

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  mech_set SET OF OBJECT IDENTIFIER

   Return major_status codes:

   o  GSS_COMPLETE indicates that a set of available mechanisms has
      been returned in mech_set.

   o  GSS_FAILURE indicates that the requested operation could not
      be performed for reasons unspecified at the GSS-API level.

   Allows callers to determine the set of mechanism types available on
   the local system. This call is intended for support of specialized
   callers who need to request non-default mech_type sets from
   GSS_Acquire_cred(),  and should not be needed by other callers.

2.4.3.  GSS_Compare_name call

   Inputs:




Linn                                                           [Page 38]
^L
RFC 1508               Generic Security Interface         September 1993


   o  name1 INTERNAL NAME,

   o  name2 INTERNAL NAME

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  name_equal BOOLEAN

   Return major_status codes:

   o  GSS_COMPLETE indicates that name1 and name2 were comparable, and
      that the name_equal result indicates whether name1 and name2 were
      equal or unequal.

   o  GSS_BAD_NAMETYPE indicates that one or both of name1 and name2
      contained internal type specifiers uninterpretable by the
      supporting GSS-API implementation, or that the two names' types
      are different and incomparable, so the equality comparison could
      not be completed.

   o  GSS_BAD_NAME indicates that one or both of the input names was
      ill-formed in terms of its internal type specifier, so the
      equality comparison could not be completed.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to compare two internal name representations for
   equality.

2.4.4.  GSS_Display_name call

   Inputs:

   o  name INTERNAL NAME

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  name_string OCTET STRING,




Linn                                                           [Page 39]
^L
RFC 1508               Generic Security Interface         September 1993


   o  name_type OBJECT IDENTIFIER

   Return major_status codes:

   o  GSS_COMPLETE indicates that a valid printable name representation
      is available in the returned name_string.

   o  GSS_BAD_NAMETYPE indicates that the provided name was of a type
      uninterpretable by the supporting GSS-API implementation, so no
      printable representation could be generated.

   o  GSS_BAD_NAME indicates that the contents of the provided name were
      inconsistent with the internally-indicated name type, so no
      printable representation could be generated.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to translate an internal name representation into a
   printable form with associated namespace type descriptor. The syntax
   of the printable form is a local matter.

2.4.5.  GSS_Import_name call

   Inputs:

   o  input_name_string OCTET STRING,

   o  input_name_type OBJECT IDENTIFIER

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER,

   o  output_name INTERNAL NAME

   Return major_status codes:

   o  GSS_COMPLETE indicates that a valid name representation is output
      in output_name and described by the type value in
      output_name_type.

   o  GSS_BAD_NAMETYPE indicates that the input_name_type is unsupported
      by the GSS-API implementation, so the import operation could not
      be completed.




Linn                                                           [Page 40]
^L
RFC 1508               Generic Security Interface         September 1993


   o  GSS_BAD_NAME indicates that the provided input_name_string is
      ill-formed in terms of the input_name_type, so the import
      operation could not be completed.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to provide a printable name representation, designate
   the type of namespace in conjunction with which it should be parsed,
   and convert that printable representation to an internal form
   suitable for input to other GSS-API routines.  The syntax of the
   input_name is a local matter.

2.4.6. GSS_Release_name call

   Inputs:

   o  name INTERNAL NAME

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER

   Return major_status codes:

   o  GSS_COMPLETE indicates that the storage associated with the input
      name was successfully released.

   o  GSS_BAD_NAME indicates that the input name argument did not
      contain a valid name.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to release the storage associated with an internal
   name representation.

2.4.7. GSS_Release_buffer call

   Inputs:

   o  buffer OCTET STRING

   Outputs:

   o  major_status INTEGER,



Linn                                                           [Page 41]
^L
RFC 1508               Generic Security Interface         September 1993


   o  minor_status INTEGER

   Return major_status codes:

   o  GSS_COMPLETE indicates that the storage associated with the input
      buffer was successfully released.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to release the storage associated with an OCTET STRING
   buffer allocated by another GSS-API call.

2.4.8. GSS_Release_oid_set call

   Inputs:

   o  buffer SET OF OBJECT IDENTIFIER

   Outputs:

   o  major_status INTEGER,

   o  minor_status INTEGER

   Return major_status codes:

   o  GSS_COMPLETE indicates that the storage associated with the input
      object identifier set was successfully released.

   o  GSS_FAILURE indicates that the requested operation could not be
      performed for reasons unspecified at the GSS-API level.

   Allows callers to release the storage associated with an object
   identifier set object allocated by another GSS-API call.

3.  Mechanism-Specific Example Scenarios

   This section provides illustrative overviews of the use of various
   candidate mechanism types to support the GSS-API. These discussions
   are intended primarily for readers familiar with specific security
   technologies, demonstrating how GSS-API functions can be used and
   implemented by candidate underlying mechanisms. They should not be
   regarded as constrictive to implementations or as defining the only
   means through which GSS-API functions can be realized with a
   particular underlying technology, and do not demonstrate all GSS-API
   features with each technology.




Linn                                                           [Page 42]
^L
RFC 1508               Generic Security Interface         September 1993


3.1. Kerberos V5, single-TGT

   OS-specific login functions yield a TGT to the local realm Kerberos
   server; TGT is placed in a credentials structure for the client.
   Client calls GSS_Acquire_cred()  to acquire a cred_handle in order to
   reference the credentials for use in establishing security contexts.

   Client calls GSS_Init_sec_context().  If the requested service is
   located in a different realm, GSS_Init_sec_context()  gets the
   necessary TGT/key pairs needed to traverse the path from local to
   target realm; these data are placed in the owner's TGT cache. After
   any needed remote realm resolution, GSS_Init_sec_context()  yields a
   service ticket to the requested service with a corresponding session
   key; these data are stored in conjunction with the context. GSS-API
   code sends KRB_TGS_REQ request(s) and receives KRB_TGS_REP
   response(s) (in the successful case) or KRB_ERROR.

   Assuming success, GSS_Init_sec_context()  builds a Kerberos-formatted
   KRB_AP_REQ message, and returns it in output_token.  The client sends
   the output_token to the service.

   The service passes the received token as the input_token argument to
   GSS_Accept_sec_context(),  which verifies the authenticator, provides
   the service with the client's authenticated name, and returns an
   output_context_handle.

   Both parties now hold the session key associated with the service
   ticket, and can use this key in subsequent GSS_Sign(), GSS_Verify(),
   GSS_Seal(), and GSS_Unseal() operations.

3.2. Kerberos V5, double-TGT

   TGT acquisition as above.

   Note: To avoid unnecessary frequent invocations of error paths when
   implementing the GSS-API atop Kerberos V5, it seems appropriate to
   represent "single-TGT K-V5" and "double-TGT K-V5" with separate
   mech_types, and this discussion makes that assumption.

   Based on the (specified or defaulted) mech_type,
   GSS_Init_sec_context()  determines that the double-TGT protocol
   should be employed for the specified target. GSS_Init_sec_context()
   returns GSS_CONTINUE_NEEDED major_status, and its returned
   output_token contains a request to the service for the service's TGT.
   (If a service TGT with suitably long remaining lifetime already
   exists in a cache, it may be usable, obviating the need for this
   step.) The client passes the output_token to the service.  Note: this
   scenario illustrates a different use for the GSS_CONTINUE_NEEDED



Linn                                                           [Page 43]
^L
RFC 1508               Generic Security Interface         September 1993


   status return facility than for support of mutual authentication;
   note that both uses can coexist as successive operations within a
   single context establishment operation.

   The service passes the received token as the input_token argument to
   GSS_Accept_sec_context(),  which recognizes it as a request for TGT.
   (Note that current Kerberos V5 defines no intra-protocol mechanism to
   represent such a request.) GSS_Accept_sec_context()  returns
   GSS_CONTINUE_NEEDED major_status and provides the service's TGT in
   its output_token. The service sends the output_token to the client.

   The client passes the received token as the input_token argument to a
   continuation of GSS_Init_sec_context(). GSS_Init_sec_context() caches
   the received service TGT and uses it as part of a service ticket
   request to the Kerberos authentication server, storing the returned
   service ticket and session key in conjunction with the context.
   GSS_Init_sec_context()  builds a Kerberos-formatted authenticator,
   and returns it in output_token along with GSS_COMPLETE return
   major_status. The client sends the output_token to the service.

   Service passes the received token as the input_token argument to a
   continuation call to GSS_Accept_sec_context().
   GSS_Accept_sec_context()  verifies the authenticator, provides the
   service with the client's authenticated name, and returns
   major_status GSS_COMPLETE.

   GSS_Sign(),  GSS_Verify(), GSS_Seal(), and GSS_Unseal()  as above.

3.3.  X.509 Authentication Framework

   This example illustrates use of the GSS-API in conjunction with
   public-key mechanisms, consistent with the X.509 Directory
   Authentication Framework.

   The GSS_Acquire_cred()  call establishes a credentials structure,
   making the client's private key accessible for use on behalf of the
   client.

   The client calls GSS_Init_sec_context(),  which interrogates the
   Directory to acquire (and validate) a chain of public-key
   certificates, thereby collecting the public key of the service.  The
   certificate validation operation determines that suitable signatures
   were applied by trusted authorities and that those certificates have
   not expired. GSS_Init_sec_context()  generates a secret key for use
   in per-message protection operations on the context, and enciphers
   that secret key under the service's public key.

   The enciphered secret key, along with an authenticator quantity



Linn                                                           [Page 44]
^L
RFC 1508               Generic Security Interface         September 1993


   signed with the client's private key, is included in the output_token
   from GSS_Init_sec_context().  The output_token also carries a
   certification path, consisting of a certificate chain leading from
   the service to the client; a variant approach would defer this path
   resolution to be performed by the service instead of being asserted
   by the client. The client application sends the output_token to the
   service.

   The service passes the received token as the input_token argument to
   GSS_Accept_sec_context().  GSS_Accept_sec_context() validates the
   certification path, and as a result determines a certified binding
   between the client's distinguished name and the client's public key.
   Given that public key, GSS_Accept_sec_context() can process the
   input_token's authenticator quantity and verify that the client's
   private key was used to sign the input_token. At this point, the
   client is authenticated to the service. The service uses its private
   key to decipher the enciphered secret key provided to it for per-
   message protection operations on the context.

   The client calls GSS_Sign()  or GSS_Seal() on a data message, which
   causes per-message authentication, integrity, and (optional)
   confidentiality facilities to be applied to that message. The service
   uses the context's shared secret key to perform corresponding
   GSS_Verify()  and GSS_Unseal() calls.

4.  Related Activities

   In order to implement the GSS-API atop existing, emerging, and future
   security mechanisms:

      object identifiers must be assigned to candidate GSS-API
      mechanisms and the name types which they support

      concrete data element formats must be defined for candidate
      mechanisms

   Calling applications must implement formatting conventions which will
   enable them to distinguish GSS-API tokens from other data carried in
   their application protocols.

   Concrete language bindings are required for the programming
   environments in which the GSS-API is to be employed; such bindings
   for the C language are available in an associated RFC.








Linn                                                           [Page 45]
^L
RFC 1508               Generic Security Interface         September 1993


5.  Acknowledgments

   This proposal is the result of a collaborative effort.
   Acknowledgments are due to the many members of the IETF Security Area
   Advisory Group (SAAG) and the Common Authentication Technology (CAT)
   Working Group for their contributions at meetings and by electronic
   mail. Acknowledgments are also due to Kannan Alagappan, Doug Barlow,
   Bill Brown, Cliff Kahn, Charlie Kaufman, Butler Lampson, Richard
   Pitkin, Joe Tardo, and John Wray of Digital Equipment Corporation,
   and John Carr, John Kohl, Jon Rochlis, Jeff Schiller, and Ted T'so of
   MIT and Project Athena.  Joe Pato and Bill Sommerfeld of HP/Apollo,
   Walt Tuvell of OSF, and Bill Griffith and Mike Merritt of AT&T,
   provided inputs which helped to focus and clarify directions.
   Precursor work by Richard Pitkin, presented to meetings of the
   Trusted Systems Interoperability Group (TSIG), helped to demonstrate
   the value of a generic, mechanism-independent security service API.

6. Security Considerations

   Security issues are discussed throughout this memo.

7. Author's Address

   John Linn
   Geer Zolot Associates
   One Main St.
   Cambridge, MA  02142  USA

   Phone: +1 617.374.3700
   Email: Linn@gza.com





















Linn                                                           [Page 46]
^L
RFC 1508               Generic Security Interface         September 1993


APPENDIX  A

PACS AND AUTHORIZATION SERVICES

   Consideration has been given to modifying the GSS-API service
   interface to recognize and manipulate Privilege Attribute
   Certificates (PACs) as in ECMA 138, carrying authorization data as a
   side effect of establishing a security context, but no such
   modifications have been incorporated at this time. This appendix
   provides rationale for this decision and discusses compatibility
   alternatives between PACs and the GSS-API which do not require that
   PACs be made visible to GSS-API callers.

   Existing candidate mechanism types such as Kerberos and X.509 do not
   incorporate PAC manipulation features, and exclusion of such
   mechanisms from the set of candidates equipped to fully support the
   GSS-API seems inappropriate. Inclusion (and GSS-API visibility) of a
   feature supported by only a limited number of mechanisms could
   encourage the development of ostensibly portable applications which
   would in fact have only limited portability.

   The status quo, in which PACs are not visible across the GSS-API
   interface, does not preclude implementations in which PACs are
   carried transparently, within the tokens defined and used for certain
   mech_types, and stored within peers' credentials and context-level
   data structures. While invisible to API callers, such PACs could be
   used by operating system or other local functions as inputs in the
   course of mediating access requests made by callers. This course of
   action allows dynamic selection of PAC contents, if such selection is
   administratively-directed rather than caller-directed.

   In a distributed computing environment, authentication must span
   different systems; the need for such authentication provides
   motivation for GSS-API definition and usage. Heterogeneous systems in
   a network can intercommunicate, with globally authenticated names
   comprising the common bond between locally defined access control
   policies. Access control policies to which authentication provides
   inputs are often local, or specific to particular operating systems
   or environments. If the GSS-API made particular authorization models
   visible across its service interface, its scope of application would
   become less general. The current GSS-API paradigm is consistent with
   the precedent set by Kerberos, neither defining the interpretation of
   authorization-related data nor enforcing access controls based on
   such data.

   The GSS-API is a general interface, whose callers may reside inside
   or outside any defined TCB or NTCB boundaries. Given this
   characteristic, it appears more realistic to provide facilities which



Linn                                                           [Page 47]
^L
RFC 1508               Generic Security Interface         September 1993


   provide "value-added" security services to its callers than to offer
   facilities which enforce restrictions on those callers. Authorization
   decisions must often be mediated below the GSS-API level in a local
   manner against (or in spite of) applications, and cannot be
   selectively invoked or omitted at those applications' discretion.
   Given that the GSS-API's placement prevents it from providing a
   comprehensive solution to the authorization issue, the value of a
   partial contribution specific to particular authorization models is
   debatable.

APPENDIX  B

MECHANISM-INDEPENDENT TOKEN FORMAT

   This appendix specifies a mechanism-independent level of
   encapsulating representation for the initial token of a GSS-API
   context establishment sequence, incorporating an identifier of the
   mechanism type to be used on that context. Use of this format (with
   ASN.1-encoded data elements represented in BER, constrained in the
   interests of parsing simplicity to the Distinguished Encoding Rule
   (DER) BER subset defined in X.509, clause 8.7) is recommended to the
   designers of GSS-API implementations based on various mechanisms, so
   that tokens can be interpreted unambiguously at GSS-API peers. There
   is no requirement that the mechanism-specific innerContextToken,
   innerMsgToken, and sealedUserData data elements be encoded in ASN.1
   BER.

          -- optional top-level token definitions to
          -- frame different mechanisms

          GSS-API DEFINITIONS ::=

          BEGIN

          MechType ::= OBJECT IDENTIFIER
          -- data structure definitions

          -- callers must be able to distinguish among
          -- InitialContextToken, SubsequentContextToken,
          -- PerMsgToken, and SealedMessage data elements
          -- based on the usage in which they occur

          InitialContextToken ::=
          -- option indication (delegation, etc.) indicated within
          -- mechanism-specific token
          [APPLICATION 0] IMPLICIT SEQUENCE {
                  thisMech MechType,
                  innerContextToken ANY DEFINED BY thisMech



Linn                                                           [Page 48]
^L
RFC 1508               Generic Security Interface         September 1993


                     -- contents mechanism-specific
                  }

          SubsequentContextToken ::= innerContextToken ANY
          -- interpretation based on predecessor InitialContextToken

          PerMsgToken ::=
          -- as emitted by GSS_Sign and processed by GSS_Verify
                  innerMsgToken ANY

          SealedMessage ::=
          -- as emitted by GSS_Seal and processed by GSS_Unseal
          -- includes internal, mechanism-defined indicator
          -- of whether or not encrypted
                  sealedUserData ANY

          END

APPENDIX  C

MECHANISM DESIGN CONSTRAINTS

   The following constraints on GSS-API mechanism designs are adopted in
   response to observed caller protocol requirements, and adherence
   thereto is anticipated in subsequent descriptions of GSS-API
   mechanisms to be documented in standards-track Internet
   specifications.

   Use of the approach defined in Appendix B of this specification,
   applying a mechanism type tag to the InitialContextToken, is
   required.

   It is strongly recommended that mechanisms offering per-message
   protection services also offer at least one of the replay detection
   and sequencing services, as mechanisms offering neither of the latter
   will fail to satisfy recognized requirements of certain candidate
   caller protocols.














Linn                                                           [Page 49]
^L