File: rfc1910.txt

package info (click to toggle)
doc-rfc 20181229-2
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 570,944 kB
  • sloc: xml: 285,646; sh: 107; python: 90; perl: 42; makefile: 14
file content (2467 lines) | stat: -rw-r--r-- 98,252 bytes parent folder | download | duplicates (8)
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






Network Working Group                                  G. Waters, Editor
Request for Comments: 1910                   Bell-Northern Research Ltd.
Category: Experimental                                     February 1996


                  User-based Security Model for SNMPv2

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  This memo does not specify an Internet standard of any
   kind.  Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

Table of Contents

   1. Introduction ................................................    2
   1.1 Threats ....................................................    3
   1.2 Goals and Constraints ......................................    4
   1.3 Security Services ..........................................    5
   1.4 Mechanisms .................................................    5
   1.4.1 Digest Authentication Protocol ...........................    7
   1.4.2 Symmetric Encryption Protocol ............................    8
   2. Elements of the Model .......................................   10
   2.1 SNMPv2 Users ...............................................   10
   2.2 Contexts and Context Selectors .............................   11
   2.3 Quality of Service (qoS) ...................................   13
   2.4 Access Policy ..............................................   13
   2.5 Replay Protection ..........................................   13
   2.5.1 agentID ..................................................   14
   2.5.2 agentBoots and agentTime .................................   14
   2.5.3 Time Window ..............................................   15
   2.6 Error Reporting ............................................   15
   2.7 Time Synchronization .......................................   16
   2.8 Proxy Error Propagation ....................................   16
   2.9 SNMPv2 Messages Using this Model ...........................   16
   2.10 Local Configuration Datastore (LCD) .......................   18
   3. Elements of Procedure .......................................   19
   3.1 Generating a Request or Notification .......................   19
   3.2 Processing a Received Communication ........................   20
   3.2.1 Additional Details .......................................   28
   3.2.1.1 ASN.1 Parsing Errors ...................................   28
   3.2.1.2 Incorrectly Encoded Parameters .........................   29
   3.2.1.3 Generation of a Report PDU .............................   29
   3.2.1.4 Cache Timeout ..........................................   29
   3.3 Generating a Response ......................................   30
   4. Discovery ...................................................   30
   5. Definitions .................................................   31



Waters                        Experimental                      [Page 1]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   4.1 The USEC Basic Group .......................................   32
   4.2 Conformance Information ....................................   35
   4.2.1 Compliance Statements ....................................   35
   4.2.2 Units of Conformance .....................................   35
   6. Security Considerations .....................................   36
   6.1 Recommended Practices ......................................   36
   6.2 Defining Users .............................................   37
   6.3 Conformance ................................................   38
   7. Editor's Address ............................................   38
   8. Acknowledgements ............................................   39
   9. References ..................................................   39
   Appendix A Installation ........................................   41
   Appendix A.1 Agent Installation Parameters .....................   41
   Appendix A.2 Password to Key Algorithm .........................   43
   Appendix A.3 Password to Key Sample ............................   44

1.  Introduction

   A management system contains:  several (potentially many) nodes, each
   with a processing entity, termed an agent, which has access to
   management instrumentation; at least one management station; and, a
   management protocol, used to convey management information between
   the agents and management stations.  Operations of the protocol are
   carried out under an administrative framework which defines
   authentication, authorization, access control, and privacy policies.

   Management stations execute management applications which monitor and
   control managed elements.  Managed elements are devices such as
   hosts, routers, terminal servers, etc., which are monitored and
   controlled via access to their management information.

   The Administrative Infrastructure for SNMPv2 document [1] defines an
   administrative framework which realizes effective management in a
   variety of configurations and environments.

   In this administrative framework, a security model defines the
   mechanisms used to achieve an administratively-defined level of
   security for protocol interactions.  Although many such security
   models might be defined, it is the purpose of this document, User-
   based Security Model for SNMPv2, to define the first, and, as of this
   writing, only, security model for this administrative framework.

   This administrative framework includes the provision of an access
   control model.  The enforcement of access rights requires the means
   to identify the entity on whose behalf a request is generated.  This
   SNMPv2 security model identifies an entity on whose behalf an SNMPv2
   message is generated as a "user".




Waters                        Experimental                      [Page 2]

RFC 1910          User-based Security Model for SNMPv2     February 1996


1.1.  Threats

   Several of the classical threats to network protocols are applicable
   to the network management problem and therefore would be applicable
   to any SNMPv2 security model.  Other threats are not applicable to
   the network management problem.  This section discusses principal
   threats, secondary threats, and threats which are of lesser
   importance.

   The principal threats against which this SNMPv2 security model should
   provide protection are:

Modification of Information
     The modification threat is the danger that some unauthorized entity
     may alter in-transit SNMPv2 messages generated on behalf of an
     authorized user in such a way as to effect unauthorized management
     operations, including falsifying the value of an object.

Masquerade
     The masquerade threat is the danger that management operations not
     authorized for some user may be attempted by assuming the identity
     of another user that has the appropriate authorizations.

   Two secondary threats are also identified.  The security protocols
   defined in this memo do provide protection against:

Message Stream Modification
     The SNMPv2 protocol is typically based upon a connectionless
     transport service which may operate over any subnetwork service.
     The re-ordering, delay or replay of messages can and does occur
     through the natural operation of many such subnetwork services.
     The message stream modification threat is the danger that messages
     may be maliciously re-ordered, delayed or replayed to an extent
     which is greater than can occur through the natural operation of a
     subnetwork service, in order to effect unauthorized management
     operations.

Disclosure
     The disclosure threat is the danger of eavesdropping on the
     exchanges between managed agents and a management station.
     Protecting against this threat may be required as a matter of local
     policy.

   There are at least two threats that an SNMPv2 security protocol need
   not protect against.  The security protocols defined in this memo do
   not provide protection against:





Waters                        Experimental                      [Page 3]

RFC 1910          User-based Security Model for SNMPv2     February 1996


Denial of Service
     An SNMPv2 security protocol need not attempt to address the broad
     range of attacks by which service on behalf of authorized users is
     denied.  Indeed, such denial-of-service attacks are in many cases
     indistinguishable from the type of network failures with which any
     viable network management protocol must cope as a matter of course.

Traffic Analysis
     In addition, an SNMPv2 security protocol need not attempt to
     address traffic analysis attacks.  Indeed, many traffic patterns
     are predictable - agents may be managed on a regular basis by a
     relatively small number of management stations - and therefore
     there is no significant advantage afforded by protecting against
     traffic analysis.

1.2.  Goals and Constraints

   Based on the foregoing account of threats in the SNMP network
   management environment, the goals of this SNMPv2 security model are
   as follows.

(1)  The protocol should provide for verification that each received
     SNMPv2 message has not been modified during its transmission
     through the network in such a way that an unauthorized management
     operation might result.

(2)  The protocol should provide for verification of the identity of the
     user on whose behalf a received SNMPv2 message claims to have been
     generated.

(3)  The protocol should provide for detection of received SNMPv2
     messages, which request or contain management information, whose
     time of generation was not recent.

(4)  The protocol should provide, when necessary, that the contents of
     each received SNMPv2 message are protected from disclosure.

   In addition to the principal goal of supporting secure network
   management, the design of this SNMPv2 security model is also
   influenced by the following constraints:

(1)  When the requirements of effective management in times of network
     stress are inconsistent with those of security, the design should
     prefer the former.

(2)  Neither the security protocol nor its underlying security
     mechanisms should depend upon the ready availability of other
     network services (e.g., Network Time Protocol (NTP) or key



Waters                        Experimental                      [Page 4]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     management protocols).

(3)  A security mechanism should entail no changes to the basic SNMP
     network management philosophy.

1.3.  Security Services

   The security services necessary to support the goals of an SNMPv2
   security model are as follows.

Data Integrity
     is the provision of the property that data has not been altered or
     destroyed in an unauthorized manner, nor have data sequences been
     altered to an extent greater than can occur non-maliciously.

Data Origin Authentication
     is the provision of the property that the claimed identity of the
     user on whose behalf received data was originated is corroborated.

Data Confidentiality
     is the provision of the property that information is not made
     available or disclosed to unauthorized individuals, entities, or
     processes.

   For the protocols specified in this memo, it is not possible to
   assure the specific originator of a received SNMPv2 message; rather,
   it is the user on whose behalf the message was originated that is
   authenticated.

   For these protocols, it not possible to obtain data integrity without
   data origin authentication, nor is it possible to obtain data origin
   authentication without data integrity.  Further, there is no
   provision for data confidentiality without both data integrity and
   data origin authentication.

   The security protocols used in this memo are considered acceptably
   secure at the time of writing.  However, the procedures allow for new
   authentication and privacy methods to be specified at a future time
   if the need arises.

1.4.  Mechanisms

   The security protocols defined in this memo employ several types of
   mechanisms in order to realize the goals and security services
   described above:






Waters                        Experimental                      [Page 5]

RFC 1910          User-based Security Model for SNMPv2     February 1996


  -  In support of data integrity, a message digest algorithm is
     required.  A digest is calculated over an appropriate portion of an
     SNMPv2 message and included as part of the message sent to the
     recipient.

  -  In support of data origin authentication and data integrity, a
     secret value is both inserted into, and appended to, the SNMPv2
     message prior to computing the digest; the inserted value
     overwritten prior to transmission, and the appended value is not
     transmitted.  The secret value is shared by all SNMPv2 entities
     authorized to originate messages on behalf of the appropriate user.

  -  To protect against the threat of message delay or replay (to an
     extent greater than can occur through normal operation), a set of
     time (at the agent) indicators and a request-id are included in
     each message generated.  An SNMPv2 agent evaluates the time
     indicators to determine if a received message is recent.  An SNMPv2
     manager evaluates the time indicators to ensure that a received
     message is at least as recent as the last message it received from
     the same source.  An SNMPv2 manager uses received authentic
     messages to advance its notion of time (at the agent).  An  SNMPv2
     manager also evaluates the request-id in received Response messages
     and discards messages which do not correspond to outstanding
     requests.

     These mechanisms provide for the detection of messages whose time
     of generation was not recent in all but one circumstance; this
     circumstance is the delay or replay of a Report  message (sent to a
     manager) when the manager has has not recently communicated with
     the source of the Report message.  In this circumstance, the
     detection guarantees only that the Report message is more recent
     than the last communication between source and destination of the
     Report message.  However, Report messages do not request or contain
     management information, and thus, goal #3 in Section 1.2 above is
     met; further, Report messages can at most cause the manager to
     advance its notion of time (at the agent) by less than the proper
     amount.

     This protection against the threat of message delay or replay does
     not imply nor provide any protection against unauthorized deletion
     or suppression of messages.  Other mechanisms defined independently
     of the security protocol can also be used to detect the re-
     ordering, replay, deletion, or suppression of messages containing
     set operations (e.g., the MIB variable snmpSetSerialNo [15]).

  -  In support of data confidentiality, an encryption algorithm is
     required.  An appropriate portion of the message is encrypted prior
     to being transmitted.



Waters                        Experimental                      [Page 6]

RFC 1910          User-based Security Model for SNMPv2     February 1996


1.4.1.  Digest Authentication Protocol

   The Digest Authentication Protocol defined in this memo provides for:

  -  verifying the integrity of a received message (i.e., the message
     received is the message sent).

     The integrity of the message is protected by computing a digest
     over an appropriate portion of a message.  The digest is computed
     by the originator of the message, transmitted with the message, and
     verified by the recipient of the message.

  -  verifying the user on whose behalf the message was generated.

     A secret value known only to SNMPv2 entities authorized to generate
     messages on behalf of this user is both inserted into, and appended
     to, the message prior to the digest computation.  Thus, the
     verification of the user is implicit with the verification of the
     digest.  (Note that the use of two copies of the secret, one near
     the start and one at the end, is recommended by [14].)

  -  verifying that a message sent to/from one SNMPv2 entity cannot be
     replayed to/as-if-from another SNMPv2 entity.

     Included in each message is an identifier unique to the SNMPv2
     agent associated with the sender or intended recipient of the
     message.  Also, each message containing a Response PDU contains a
     request-id which associates the message to a recently generated
     request.

     A Report message sent by one SNMPv2 agent to one SNMPv2 manager can
     potentially be replayed to another SNMPv2 manager.  However, Report
     messages do not request or contain management information, and
     thus, goal #3 in Section 1.2 above is met; further, Report messages
     can at most cause the manager to advance its notion of time (at the
     agent) by less than the correct amount.

  -  detecting messages which were not recently generated.

     A set of time indicators are included in the message, indicating
     the time of generation.  Messages (other than those containing
     Report PDUs) without recent time indicators are not considered
     authentic.  In addition, messages containing Response PDUs have a
     request-id; if the request-id does not match that of a recently
     generated request, then the message is not considered to be
     authentic.





Waters                        Experimental                      [Page 7]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     A Report message sent by an SNMPv2 agent can potentially be
     replayed at a later time to an SNMPv2 manager which has not
     recently communicated with that agent.  However, Report messages do
     not request or contain management information, and thus, goal #3 in
     Section 1.2 above is met; further, Report messages can at most
     cause the manager to advance its notion of time (at the agent) by
     less than the correct amount.

   This protocol uses the MD5 [3] message digest algorithm.  A 128-bit
   digest is calculated over the designated portion of an SNMPv2 message
   and included as part of the message sent to the recipient.  The size
   of both the digest carried in a message and the private
   authentication key is 16 octets.

   This memo allows the same user to be defined on multiple SNMPv2
   agents and managers.  Each SNMPv2 agent maintains a value, agentID,
   which uniquely identifies the agent. This value is included in each
   message sent to/from that agent.  Messages sent from a SNMPv2 dual-
   role entity [1] to a SNMPv2 manager include the agentID value
   maintained by the dual-role entity's agent.  On receipt of a message,
   an agent checks the value to ensure it is the intended recipient, and
   a manager uses the value to ensure that the message is processed
   using the correct state information.

   Each SNMPv2 agent maintains two values, agentBoots and agentTime,
   which taken together provide an indication of time at that agent.
   Both of these values are included in an authenticated message sent
   to/received from that agent.  Authenticated messages sent from a
   SNMPv2 dual-role entity to a SNMPv2 manager include the agentBoots
   and agentTime values maintained by the dual-role entity's agent.  On
   receipt, the values are checked to ensure that the indicated time is
   within a time window of the current time.  The time window represents
   an administrative upper bound on acceptable delivery delay for
   protocol messages.

   For an SNMPv2 manager to generate a message which an agent will
   accept as authentic, and to verify that a message received from that
   agent is authentic, that manager must first achieve time
   synchronization with that agent.  Similarly, for a manger to verify
   that a message received from an SNMPv2 dual-role entity is authentic,
   that manager must first achieve time synchronization with the dual-
   role entity's agent.

1.4.2.  Symmetric Encryption Protocol

   The Symmetric Encryption Protocol defined in this memo provides
   support for data confidentiality through the use of the Data
   Encryption Standard (DES) in the Cipher Block Chaining mode of



Waters                        Experimental                      [Page 8]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   operation.  The designated portion of an SNMPv2 message is encrypted
   and included as part of the message sent to the recipient.

   Two organizations have published specifications defining the DES: the
   National Institute of Standards and Technology (NIST) [5] and the
   American National Standards Institute [6].  There is a companion
   Modes of Operation specification for each definition (see [7] and
   [8], respectively).

   The NIST has published three additional documents that implementors
   may find useful.

  -  There is a document with guidelines for implementing and using the
     DES, including functional specifications for the DES and its modes
     of operation [9].

  -  There is a specification of a validation test suite for the DES
     [10].  The suite is designed to test all aspects of the DES and is
     useful for pinpointing specific problems.

  -  There is a specification of a maintenance test for the DES [11].
     The test utilizes a minimal amount of data and processing to test
     all components of the DES.  It provides a simple yes-or-no
     indication of correct operation and is useful to run as part of an
     initialization step, e.g., when a computer reboots.

   This Symmetric Encryption Protocol specifies that the size of the
   privacy key is 16 octets, of which the first 8 octets are a DES key
   and the second 8 octets are a DES Initialization Vector.  The 64-bit
   DES key in the first 8 octets of the private key is a 56 bit quantity
   used directly by the algorithm plus 8 parity bits - arranged so that
   one parity bit is the least significant bit of each octet.  The
   setting of the parity bits is ignored by this protocol.

   The length of an octet sequence to be encrypted by the DES must be an
   integral multiple of 8.  When encrypting, the data is padded at the
   end as necessary; the actual pad value is irrelevant.

   If the length of the octet sequence to be decrypted is not an
   integral multiple of 8 octets, the processing of the octet sequence
   is halted and an appropriate exception noted.  When decrypting, the
   padding is ignored.









Waters                        Experimental                      [Page 9]

RFC 1910          User-based Security Model for SNMPv2     February 1996


2.  Elements of the Model

   This section contains definitions required to realize the security
   model defined by this memo.

2.1.  SNMPv2 Users

   Management operations using this security model make use of a defined
   set of user identities.  For any SNMPv2 user on whose behalf
   management operations are authorized at a particular SNMPv2 agent,
   that agent must have knowledge of that user.  A SNMPv2 manager that
   wishes to communicate with a particular agent must also have
   knowledge of a user known to that agent, including knowledge of the
   applicable attributes of that user.  Similarly, a SNMPv2 manager that
   wishes to receive messages from a SNMPv2 dual-role entity must have
   knowledge of the user on whose behalf the dual-role entity sends the
   message.

   A user and its attributes are defined as follows:

<userName>
     An octet string representing the name of the user.

<authProtocol>
     An indication of whether messages sent on behalf of this user can
     be authenticated, and if so, the type of authentication protocol
     which is used.  One such protocol is defined in this memo: the
     Digest Authentication Protocol.

<authPrivateKey>
     If messages sent on behalf of this user can be authenticated, the
     (private) authentication key for use with the authentication
     protocol.  Note that a user's authentication key will normally be
     different at different agents.

<privProtocol>
     An indication of whether messages sent on behalf of this user can
     be protected from disclosure, and if so, the type of privacy
     protocol which is used.  One such protocol is defined in this memo:
     the Symmetric Encryption Protocol.

<privPrivateKey>
     If messages sent on behalf of this user can be protected from
     disclosure, the (private) privacy key for use with the privacy
     protocol.  Note that a user's privacy key will normally be
     different at different agents.





Waters                        Experimental                     [Page 10]

RFC 1910          User-based Security Model for SNMPv2     February 1996


2.2.  Contexts and Context Selectors

   An SNMPv2 context is a collection of management information
   accessible (locally or via proxy) by an SNMPv2 agent.  An item of
   management information may exist in more than one context.  An SNMPv2
   agent potentially has access to many contexts.  Each SNMPv2 message
   contains a context selector which unambiguously identifies an SNMPv2
   context accessible by the SNMPv2 agent to which the message is
   directed or by the SNMPv2 agent associated with the sender of the
   message.

   For a local SNMPv2 context which is realized by an SNMPv2 entity,
   that SNMPv2 entity uses locally-defined mechanisms to access the
   management information identified by the SNMPv2 context.

   For a proxy SNMPv2 context, the SNMPv2 entity acts as a proxy SNMPv2
   agent to access the management information identified by the SNMPv2
   context.

   The term remote SNMPv2 context is used at an SNMPv2 manager to
   indicate a SNMPv2 context (either local or proxy) which is not
   realized by the local SNMPv2 entity (i.e., the local SNMPv2 entity
   uses neither locally-defined mechanisms, nor acts as a proxy SNMPv2
   agent to access the management information identified by the SNMPv2
   context).

   Proxy SNMPv2 contexts are further categorized as either local-proxy
   contexts or remote-proxy contexts.  A proxy SNMPv2 agent receives
   Get/GetNext/GetBulk/Set operations for a local-proxy context, and
   forwards them with a remote-proxy context; it receives SNMPv2-Trap
   and Inform operations for a remote-proxy context, and forwards them
   with a local-proxy context; for Response operations, a proxy SNMPv2
   agent receives them with either a local-proxy or remote-proxy
   context, and forwards them with a remote-proxy or local-proxy
   context, respectively.
















Waters                        Experimental                     [Page 11]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     For the non-proxy situation:

                      context-A
         Manager <----------------> Agent

     the type of context is:

                           +-----------------+
                           |   context-A     |
         +-----------------+-----------------+
         | Manager         |    remote       |
         +-----------------+-----------------+
         | Agent           |    local        |
         +-----------------+-----------------+
         | agentID         |   of Agent      |
         +-----------------+-----------------+
         | contextSelector | locally unique  |
         +-----------------+-----------------+

     For proxy:

                      context-B               context-C
         Manager <----------------> Proxy <----------------> Agent
                                    Agent

     the type and identity of the contexts are:

                           +-----------------+-----------------+
                           |   context-B     |    context-C    |
         +-----------------+-----------------+-----------------+
         | Manager         |    remote       |       --        |
         +-----------------+-----------------+-----------------+
         | Proxy-Agent     |  local-proxy    |   remote-proxy  |
         +-----------------+-----------------+-----------------+
         | Agent           |      --         |      local      |
         +-----------------+-----------------+-----------------+
         | agentID         | of Proxy agent  |     of Agent    |
         +-----------------+-----------------+-----------------+
         | contextSelector | locally unique  |  locally unique |
         +-----------------+-----------------+-----------------+

   The combination of an agentID value and a context selector provides a
   globally-unique identification of a context.  When a context is
   accessible by multiple agents (e.g., including by proxy SNMPv2
   agents), it has multiple such globally-unique identifications, one
   associated with each agent which can access it. In the example above,
   "context-B" and "context-C" are different names for the same context.




Waters                        Experimental                     [Page 12]

RFC 1910          User-based Security Model for SNMPv2     February 1996


2.3.  Quality of Service (qoS)

   Messages are generated with a particular Quality of Service (qoS),
   either:

  -  without authentication and privacy,

  -  with authentication but not privacy,

  -  with authentication and privacy.

   All users are capable of having messages without authentication and
   privacy generated on their behalf.  Users having an authentication
   protocol and an authentication key can have messages with
   authentication but not privacy generated on their behalf. Users
   having an authentication protocol, an authentication key, a privacy
   protocol and a privacy key can have messages with authentication and
   privacy generated on their behalf.

   In addition to its indications of authentication and privacy, the qoS
   may also indicate that the message contains an operation that may
   result in a report PDU being generated (see Section 2.6 below).

2.4.  Access Policy

   An administration's access policy determines the access rights of
   users.  For a particular SNMPv2 context to which a user has access
   using a particular qoS, that user's access rights are given by a list
   of authorized operations, and for a local context, a read-view and a
   write-view.  The read-view is the set of object instances authorized
   for the user when reading objects.  Reading objects occurs when
   processing a retrieval (get, get-next, get-bulk) operation and when
   sending a notification.  The write-view is the set of object
   instances authorized for the user when writing objects.  Writing
   objects occurs when processing a set operation.  A user's access
   rights may be different at different agents.

2.5.  Replay Protection

   Each SNMPv2 agent (or dual-role entity) maintains three objects:

  -  agentID, which is an identifier unique among all agents in (at
     least) an administrative domain;

  -  agentBoots, which is a count of the number of times the agent has
     rebooted/re-initialized since agentID was last configured; and,





Waters                        Experimental                     [Page 13]

RFC 1910          User-based Security Model for SNMPv2     February 1996


  -  agentTime, which is the number of seconds since agentBoots was last
     incremented.

   An SNMPv2 agent is always authoritative with respect to these
   variables.  It is the responsibility of an SNMPv2 manager to
   synchronize with the agent, as appropriate.  In the case of an SNMPv2
   dual-role entity sending an Inform-Request, it is that entity acting
   in an agent role which is authoritative with respect to these
   variables for the Inform-Request.

   An agent is required to maintain the values of agentID and agentBoots
   in non-volatile storage.

2.5.1.  agentID

   The agentID value contained in an authenticated message is used to
   defeat attacks in which messages from a manager are replayed to a
   different agent and/or messages from one agent (or dual-role entity)
   are replayed as if from a different agent (or dual-role entity).

   When an agent (or dual-role entity) is first installed, it sets its
   local value of agentID according to a enterprise-specific algorithm
   (see the definition of agentID in Section 4.1).

2.5.2.  agentBoots and agentTime

   The agentBoots and agentTime values contained in an authenticated
   message are used to defeat attacks in which messages are replayed
   when they are no longer valid.  Through use of agentBoots and
   agentTime, there is no requirement for an SNMPv2 agent to have a
   non-volatile clock which ticks (i.e., increases with the passage of
   time) even when the agent is powered off.  Rather, each time an
   SNMPv2 agent reboots, it retrieves, increments, and then stores
   agentBoots in non-volatile storage, and resets agentTime to zero.

   When an agent (or dual-role entity) is first installed, it sets its
   local values of agentBoots and agentTime to zero.  If agentTime ever
   reaches its maximum value (2147483647), then agentBoots is
   incremented as if the agent has rebooted and agentTime is reset to
   zero and starts incrementing again.

   Each time an agent (or dual-role entity) reboots, any SNMPv2 managers
   holding that agent's values of agentBoots and agentTime need to re-
   synchronize prior to sending correctly authenticated messages to that
   agent (see Section 2.7 for re-synchronization procedures).  Note,
   however, that the procedures do provide for a notification to be
   accepted as authentic by a manager, when sent by an agent which has
   rebooted since the manager last re-synchronized.



Waters                        Experimental                     [Page 14]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   If an agent (or dual-role entity) is ever unable to determine its
   latest agentBoots value, then it must set its agentBoots value to
   0xffffffff.

   Whenever the local value of agentBoots has the value 0xffffffff, it
   latches at that value and an authenticated message always causes an
   usecStatsNotInWindows authentication failure.

   In order to reset an agent whose agentBoots value has reached the
   value 0xffffffff, manual intervention is required.  The agent must be
   physically visited and re-configured, either with a new agentID
   value, or with new secret values for the authentication and privacy
   keys of all users known to that agent.

2.5.3.  Time Window

   The Time Window is a value that specifies the window of time in which
   a message generated on behalf of any user is valid.  This memo
   specifies that the same value of the Time Window, 150 seconds, is
   used for all users.

2.6.  Error Reporting

   While processing a received communication, an SNMPv2 entity may
   determine that the message is unacceptable (see Section 3.2).  In
   this case, the appropriate counter from the snmpGroup [15] or
   usecStatsGroup object groups is incremented and the received message
   is discarded without further processing.

   If an SNMPv2 entity acting in the agent role makes such a
   determination and the qoS indicates that a report may be generated,
   then after incrementing the appropriate counter, it is required to
   generate a message containing a report PDU, with the same user and
   context as the received message, and to send it to the transport
   address which originated the received message.  For all report PDUs,
   except those generated due to incrementing the usecStatsNotInWindows
   counter, the report PDU is unauthenticated.  For those generated due
   to incrementing usecStatsNotInWindows, the report PDU is
   authenticated only if the received message was authenticated.

   The report flag in the qoS may only be set if the message contains a
   Get, GetNext, GetBulk, Set operation.  The report flag should never
   be set for a message that contains a Response, Inform, SNMPv2-Trap or
   Report operation.  Furthermore, a report PDU is never sent by an
   SNMPv2 entity acting in a manager role.






Waters                        Experimental                     [Page 15]

RFC 1910          User-based Security Model for SNMPv2     February 1996


2.7.  Time Synchronization

   Time synchronization, required by a management entity in order to
   proceed with authentic communications, has occurred when the
   management entity has obtained local values of agentBoots and
   agentTime from the agent that are within the agent's time window.  To
   remain synchronized, the local values must remain within the agent's
   time window and thus must be kept loosely synchronized with the
   values stored at the agent.  In addition to keeping a local version
   of agentBoots and agentTime, a manager must also keep one other local
   variable, latestReceivedAgentTime.  This value records the highest
   value of agentTime that was received by the manager from the agent
   and is used to eliminate the possibility of replaying messages that
   would prevent the manager's notion of the agentTime from advancing.

   Time synchronization occurs as part of the procedures of receiving a
   message (Section 3.2, step 9d). As such, no explicit time
   synchronization procedure is required by a management entity.  Note,
   that whenever the local value of agentID is changed (e.g., through
   discovery) or when a new secret is configured, the local values of
   agentBoots and latestReceivedAgentTime should be set to zero. This
   will cause the time synchronization to occur when the next authentic
   message is received.

2.8.  Proxy Error Propagation

   When a proxy SNMPv2 agent receives a report PDU from a proxied agent
   and it is determined that a proxy-forwarded request cannot be
   delivered to the proxied agent, then the snmpProxyDrops counter [15]
   is incremented and a report PDU is generated and transmitted to the
   transport address from which the original request was received.
   (Note that the receipt of a report PDU containing snmpProxyDrops as a
   VarBind, is included among the reasons why a proxy-forwarded request
   cannot be delivered.)

2.9.  SNMPv2 Messages Using this Model

   The syntax of an SNMPv2 message using this security model differs
   from that of an SNMPv1 [2] message as follows:

  -  The version component is changed to 2.

  -  The data component contains either a PDU or an OCTET STRING
     containing an encrypted PDU.

   The SNMPv1 community string is now termed the "parameters" component
   and contains a set of administrative information for the message.




Waters                        Experimental                     [Page 16]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   Only the PDU is protected from disclosure by the privacy protocol.
   This exposes the administrative information to eavesdroppers.
   However, malicious use of this information is considered to be a
   Traffic Analysis attack against which protection is not provided.

   For an authenticated SNMPv2 message, the message digest is applied to
   the entire message given to the transport service.  As such, message
   generation first privatizes the PDU, then adds the message wrapper,
   and then authenticates the message.

   An SNMPv2 message is an ASN.1 value with the following syntax:

     Message ::=
         SEQUENCE {
             version
                 INTEGER { v2 (2) },

             parameters
                 OCTET STRING,
             -- <model=1>
             --      <qoS><agentID><agentBoots><agentTime><maxSize>
             --      <userLen><userName><authLen><authDigest>
             --      <contextSelector>

             data
                 CHOICE {
                     plaintext
                         PDUs,
                     encrypted
                         OCTET STRING
                 }
         }

where:

  parameters
     a concatenation of the following values in network-byte order.  If
     the first octet (<model>) is one, then

     <qoS>    = 8-bits of quality-of-service

              bitnumber
              7654 3210     meaning
              ---- ----     --------------------------------
              .... ..00     no authentication nor privacy
              .... ..01     authentication, no privacy
              .... ..1.     authentication and privacy
              .... .1..     generation of report PDU allowed



Waters                        Experimental                     [Page 17]

RFC 1910          User-based Security Model for SNMPv2     February 1996


              where bit 7 is the most significant bit.

     <agentID>    = 12 octets
          a unique identifier for the agent (or dual-role entity).

     <agentBoots> = 32-bits
          an unsigned quantity (0..4294967295) in network-byte order.

     <agentTime>  = 32-bits
          an unsigned quantity (0..2147483647) in network-byte order.

     <maxSize>    = 16-bits
          an unsigned quantity (484..65507) in network-byte order, which
          identifies the maximum message size which the sender of this
          message can receive using the same transport domain as used
          for this message.

     <userLen>    = 1 octet
          the length of following <userName> field.

     <userName>   = 1..16 arbitrary octets
          the user on whose behalf this message is sent.

     <authLen>    = 1 octet
          the length of following <authDigest> field.

     <authDigest> = 0..255 octets
          for authenticated messages, the authentication digest.
          Otherwise, the value has zero-length on transmission and is
          ignored on receipt.

     <contextSelector> = 0..40 arbitrary octets
          the context selector which in combination with agentID
          identifies the SNMPv2 context containing the management
          information referenced by the SNMPv2 message.

  plaintext
     an SNMPv2 PDU as defined in [12].

  encrypted
     the encrypted form of an SNMPv2 PDU.

2.10.  Local Configuration Datastore (LCD)

   Each SNMPv2 entity maintains a local conceptually database, called
   the Local Configuration Datastore (LCD), which holds its known set of
   information about SNMPv2 users and other associated (e.g., access
   control) information.  An LCD may potentially be required to hold



Waters                        Experimental                     [Page 18]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   information about multiple SNMPv2 agent entities. As such, the
   <agentID> should be used to identify a particular agent entity in the
   LCD.

   It is a local implementation issue as to whether information in the
   LCD is stored information or whether it is obtained dynamically
   (e.g., as a part of an SNMPv2 manager's API) on an as-needed basis.

3.  Elements of Procedure

   This section describes the procedures followed by an SNMPv2 entity in
   processing SNMPv2 messages.

3.1.  Generating a Request or Notification

   This section describes the procedure followed by an SNMPv2 entity
   whenever it generates a message containing a management operation
   (either a request or a notification) on behalf of a user, for a
   particular context and with a particular qoS value.

(1)  Information concerning the user is extracted from the LCD.  The
     transport domain and transport address to which the operation is to
     be sent is determined.  The context is resolved into an agentID
     value and a contextSelector value.

(2)  If the qoS specifies that the message is to be protected from
     disclosure, but the user does not support both an authentication
     and a privacy protocol, or does not have configured authentication
     and privacy keys, then the operation cannot be sent.

(3)  If the qoS specifies that the message is to be authenticated, but
     the user does not support an authentication protocol, or does not
     have a configured authentication key, then the operation cannot be
     sent.

(4)  The operation is serialized (i.e., encoded) according to the
     conventions of [13] and [12] into a PDUs value.

(5)  If the operation is a Get, GetNext, GetBulk, or Set then the report
     flag in the qoS is set to the value 1.

(6)  An SNMPv2 message is constructed using the ASN.1 Message syntax:

     - the version component is set to the value 2.

     - if the qoS specifies that the message is to be protected from
       disclosure, then the octet sequence representing the serialized
       PDUs value is encrypted according to the user's privacy protocol



Waters                        Experimental                     [Page 19]

RFC 1910          User-based Security Model for SNMPv2     February 1996


       and privacy key, and the encrypted data is encoded as an octet
       string and is used as the data component of the message.

     - if the qoS specifies that the message is not to be protected from
       disclosure, then the serialized PDUs value is used directly as
       the value of the data component.

     - the parameters component is constructed using:

       - the requested qoS, userName, agentID and context selector,

       - if the qoS specifies that the message is to be authenticated or
         the management operation is a notification, then the current
         values of agentBoots, and agentTime corresponding to agentID
         from the LCD are used.  Otherwise, the <agentBoots> and
         <agentTime> fields are set to zero-filled octets.

       - the <maxSize> field is set to the maximum message size which
         the local SNMPv2 entity can receive using the transport domain
         which will be used to send this message.

       - if the qoS specifies that the message is to be authenticated,
         then the <authDigest> field is temporarily set to the user's
         authentication key.  Otherwise, the <authDigest> field is set
         to the zero-length string.

(7)  The constructed Message value is serialized (i.e., encoded)
     according to the conventions of [13] and [12].

(8)  If the qoS specifies that the message is to be authenticated, then
     an MD5 digest value is computed over the octet sequence
     representing the concatenation of the serialized Message value and
     the user's authentication key.  The <authDigest> field is then set
     to the computed digest value.

(9)  The serialized Message value is transmitted to the determined
     transport address.

3.2.  Processing a Received Communication

   This section describes the procedure followed by an SNMPv2 entity
   whenever it receives an SNMPv2 message.  This procedure is
   independent of the transport service address at which the message was
   received.  For clarity, some of the details of this procedure are
   left out and are described in Section 3.2.1 and its sub-sections.

(1)  The snmpInPkts counter [15] is incremented.  If the received
     message is not the serialization (according to the conventions of



Waters                        Experimental                     [Page 20]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     [13]) of a Message value, then the snmpInASNParseErrs counter [15]
     is incremented, and the message is discarded without further
     processing.

(2)  If the value of the version component has a value other than 2,
     then the message is either processed according to some other
     version of this protocol, or the snmpInBadVersions counter [15] is
     incremented, and the message is discarded without further
     processing.

(3)  The value of the <model> field is extracted from the parameters
     component of the Message value.  If the value of the <model> field
     is not 1, then either the message is processed according to some
     other security model, or the usecStatsBadParameters counter is
     incremented, and the message is discarded without further
     processing.

(4)  The values of the rest of the fields are extracted from the
     parameters component of the Message value.

(5)  If the <agentID> field contained in the parameters is unknown then:

     - a manager that performs discovery may optionally create a new LCD
       entry and continue processing; or

     - the usecStatsUnknownContexts counter is incremented, a report PDU
       is generated, and the received message is discarded without
       further processing.

(6)  The LCD is consulted for information about the SNMPv2 context
     identified by the combination of the <agentID> and
     <contextSelector> fields.  If information about this SNMPv2 context
     is absent from the LCD, then the usecStatsUnknownContexts counter
     is incremented, a report PDU is generated, and the received message
     is discarded without further processing.

(7)  Information about the value of the <userName> field is extracted
     from the LCD.  If no information is available, then the
     usecStatsUnknownUserNames counter is incremented, a report PDU [1]
     is generated, and the received message is discarded without further
     processing.

(8)  If the information about the user indicates that it does not
     support the quality of service indicated by the <qoS> field, then
     the usecStatsUnsupportedQoS counter is incremented, a report PDU is
     generated, and the received message is discarded without further
     processing.




Waters                        Experimental                     [Page 21]

RFC 1910          User-based Security Model for SNMPv2     February 1996


(9)  If the <qoS> field indicates an authenticated message and the
     user's authentication protocol is the Digest Authentication
     Protocol described in this memo, then:

     a) the local values of agentBoots and agentTime corresponding to
        the value of the <agentID> field are extracted from the LCD.

     b) the value of <authDigest> field is temporarily saved.  A new
        serialized Message is constructed which differs from that
        received in exactly one respect: that the <authDigest> field
        within it has the value of the user's authentication key.  An
        MD5 digest value is computed over the octet sequence
        representing the concatenation of the new serialized Message and
        the user's authentication key.

     c) if the LCD information indicates the SNMPv2 context is of type
        local (i.e., an agent), then:

        - if the computed digest differs from the saved authDigest
          value, then the usecStatsWrongDigestValues counter is
          incremented, a report PDU is generated, and the received
          message is discarded without further processing. However, if
          the snmpEnableAuthenTraps object [15] is enabled, then the
          SNMPv2 entity sends authenticationFailure traps [15] according
          to its configuration.

        - if any of the following conditions is true, then the message
          is considered to be outside of the Time Window:

          - the local value of agentBoots is 0xffffffff;

          - the <agentBoots> field differs from the local value of
            agentBoots; or,

          - the value of the <agentTime> field differs from the local
            notion of agentTime by more than +/- 150 seconds.

        - if the message is considered to be outside of the Time Window
          then the usecStatsNotInWindows counter is incremented, an
          authenticated report PDU is generated (see section 2.7), and
          the received message is discarded without further processing.

     d) if the LCD information indicates the SNMPv2 context is not
        realized by the local SNMPv2 entity (i.e., a manager), then:

        - if the computed digest differs from the saved authDigest
          value, then the usecStatsWrongDigestValues counter is
          incremented and the received message is discarded without



Waters                        Experimental                     [Page 22]

RFC 1910          User-based Security Model for SNMPv2     February 1996


          further processing.

        - if all of the following conditions are true:

             - if the <qoS> field indicates that privacy is not in use;

             - the SNMPv2 operation type determined from the ASN.1 tag
               value associated with the PDU's component is a Report;

             - the Report was generated due to a usecStatsNotInWindows
               error condition; and,

             - the <agentBoots> field is greater than the local value of
               agentBoots, or the <agentBoots> field is equal to the
               local value of agentBoots and the <agentTime> field is
               greater than the value of latestReceivedAgentTime,

          then the LCD entry corresponding to the value of the <agentID>
          field is updated, by setting the local value of agentBoots
          from the <agentBoots> field, the value latestReceivedAgentTime
          from the <agentTime> field, and the local value of agentTime
          from the <agentTime> field.

        - if any of the following conditions is true, then the message
          is considered to be outside of the Time Window:

          - the local value of agentBoots is 0xffffffff;

          - the <agentBoots> field is less than the local value of
            agentBoots; or,

          - the <agentBoots> field is equal to the local value of
            agentBoots and the <agentTime> field is more than 150
            seconds less than the local notion of agentTime.

        - if the message is considered to be outside of the Time Window
          then the usecStatsNotInWindows counter is incremented, and the
          received message is discarded without further processing;
          however, time synchronization procedures may be invoked.  Note
          that this procedure allows for <agentBoots> to be greater than
          the local value of agentBoots to allow for received messages
          to be accepted as authentic when received from an agent that
          has rebooted since the manager last re-synchronized.

        - if at least one of the following conditions is true:

             - the <agentBoots> field is greater than the local value of
               agentBoots; or,



Waters                        Experimental                     [Page 23]

RFC 1910          User-based Security Model for SNMPv2     February 1996


             - the <agentBoots> field is equal to the local value of
               agentBoots and the <agentTime> field is greater than the
               value of latestReceivedAgentTime,

          then the LCD entry corresponding to the value of the <agentID>
          field is updated, by setting the local value of agentBoots
          from the <agentBoots> field, the local value
          latestReceivedAgentTime from the <agentTime> field, and the
          local value of agentTime from the <agentTime> field.

(10) If the <qoS> field indicates use of a privacy protocol, then the
     octet sequence representing the data component is decrypted
     according to the user's privacy protocol to obtain a serialized
     PDUs value.  Otherwise the data component is assumed to directly
     contain the PDUs value.

(11) The SNMPv2 operation type is determined from the ASN.1 tag value
     associated with the PDUs component.

(12) If the SNMPv2 operation type is a Report, then the request-id in
     the PDU is correlated to an outstanding request, and if the
     correlation is successful, the appropriate action is taken (e.g.,
     time synchronization, proxy error propagation, etc.); in
     particular, if the report PDU indicates a usecStatsNotInWindows
     condition, then the outstanding request may be retransmitted (since
     the procedure in Step 9d above should have resulted in time
     synchronization).

(13) If the SNMPv2 operation type is either a Get, GetNext, GetBulk, or
     Set operation, then:

     a) if the LCD information indicates that the SNMPv2 context is of
        type remote or remote-proxy, then the
        usecStatsUnauthorizedOperations counter is incremented, a report
        PDU is generated, and the received message is discarded without
        further processing.

     b) the LCD is consulted for access rights authorized for
        communications using the indicated qoS, on behalf of the
        indicated user, and concerning management information in the
        indicated SNMPv2 context for the particular SNMPv2 operation
        type.

     c) if the SNMPv2 operation type is not among the authorized access
        rights, then the usecStatsUnauthorizedOperations counter is
        incremented, a report PDU is generated, and the received message
        is discarded without further processing.




Waters                        Experimental                     [Page 24]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     d) The information extracted from the LCD concerning the user and
        the SNMPv2 context, together with the sending transport address
        of the received message is cached for later use in generating a
        response message.

     e) if the LCD information indicates the SNMPv2 context is of type
        local, then the management operation represented by the PDUs
        value is performed by the receiving SNMPv2 entity with respect
        to the relevant MIB view within the SNMPv2 context according to
        the procedures set forth in [12], where the relevant MIB view is
        determined according to the user, the agentID, the
        contextSelector, the qoS values and the type of operation
        requested.

     f) if the LCD information indicates the SNMPv2 context is of type
        local-proxy, then:

        i. the user, qoS, agentID, contextSelector and transport address
           to be used to forward the request are extracted from the LCD.
           If insufficient information concerning the user is currently
           available, then snmpProxyDrops counter [15] is incremented, a
           report PDU is generated, and the received message is
           discarded.

        ii. if an administrative flag in the LCD indicates that the
           message is to be forwarded using the SNMPv1 administrative
           framework, then the procedures described in [4] are invoked.
           Otherwise, a new SNMPv2 message is constructed: its PDUs
           component is copied from that in the received message except
           that the contained request-id is replaced by a unique value
           (this value will enable a subsequent response message to be
           correlated with this request); the <userName>, <qoS>,
           <agentID> and <contextSelector> fields are set to the values
           extracted from the LCD; the <maxSize> field is set to the
           minimum of the value in the received message and the local
           system's maximum message size for the transport domain which
           will be used to forward the message; and finally, the message
           is authenticated and/or protected from disclosure according
           to the qoS value.

        iii. the information cached in Step 13d above is augmented with
           the request-id of the received message as well as the
           request-id, agentID and contextSelector of the constructed
           message.

        iv. the constructed message is forwarded to the extracted
           transport address.




Waters                        Experimental                     [Page 25]

RFC 1910          User-based Security Model for SNMPv2     February 1996


(14) If the SNMPv2 operation type is an Inform, then:

     a) if the LCD information indicates the SNMPv2 context is of type
        local or local-proxy then the usecStatsUnauthorizedOperations
        counter is incremented, a report PDU is generated, and the
        received message is discarded without further processing.

     b) if the LCD information indicates the SNMPv2 context is of type
        remote, then the Inform operation represented by the PDUs value
        is performed by the receiving SNMPv2 entity according to the
        procedures set forth in [12].

     c) if the LCD information indicates the SNMPv2 context is of type
        remote-proxy, then:

        i. a single unique request-id is selected for use by all
           forwarded copies of this request.  This value will enable the
           first response message to be correlated with this request;
           other responses are not required and should be discarded when
           received, since the agent that originated the Inform only
           requires one response to its Inform.

        ii. information is extracted from the LCD concerning all
           combinations of userName, qoS, agentID, contextSelector and
           transport address with which the received message is to be
           forwarded.

        iii. for each such combination whose access rights permit Inform
           operations to be forwarded, a new SNMPv2 message is
           constructed, as follows: its PDUs component is copied from
           that in the received message except that the contained
           request-id is replaced by the value selected in Step i above;
           its <userName>, <qoS>, <agentID> and <contextSelector> fields
           are set to the values extracted in Step ii above; and its
           <maxSize> field is set to the minimum of the value in the
           received message and the local system's maximum message size
           for the transport domain which will be used to forward this
           message.

        iv. for each constructed SNMPv2 message, information concerning
           the <userName>, <qoS>, <agentID>, <contextSelector>,
           request-id and sending transport address of the received
           message, as well as the request- id, agentID and
           contextSelector of the constructed message, is cached for
           later use in generating a response message.

        v. each constructed message is forwarded to the appropriate
           transport address extracted from the LCD in step ii above.



Waters                        Experimental                     [Page 26]

RFC 1910          User-based Security Model for SNMPv2     February 1996


(15) If the SNMPv2 operation type is a Response, then:

     a) if the LCD information indicates the SNMPv2 context is of type
        local, then the usecStatsUnauthorizedOperations counter is
        incremented, a report PDU is generated, and the received message
        is discarded without further processing.

     b) if the LCD information indicates the SNMPv2 context is of type
        remote, then the Response operation represented by the PDUs
        value is performed by the receiving SNMPv2 entity according to
        the procedures set forth in [12].

     c) if the LCD information indicates the SNMPv2 context is of type
        local-proxy or remote-proxy, then:

        i. the request-id is extracted from the PDUs component of the
           received message.  The context's agentID and contextSelector
           values together with the extracted request-id are used to
           correlate this response message to the corresponding values
           for a previously forwarded request by inspecting the cache of
           information as augmented in Substep iii of Step 13f above or
           in Substep iv of 14c above.  If no such correlated
           information is found, then the received message is discarded
           without further processing.

        ii. a new SNMPv2 message is constructed: its PDUs component is
           copied from that in the received message except that the
           contained request-id is replaced by the value saved in the
           correlated information from the original request; its
           <userName>, <qoS>, <agentID> and <contextSelector> fields are
           set to the values saved from the received message. The
           <maxSize> field is set to the minimum of the value in the
           received message and the local system's maximum message size
           for the transport domain which will be used to forward the
           message. The message is authenticated and/or protected from
           disclosure according to the saved qoS value.

        iii. the constructed message is forwarded to the transport
           address saved in the correlated information as the sending
           transport address of the original request.

        iv. the correlated information is deleted from the cache of
           information.

(16) If the SNMPv2 operation type is a SNMPv2-Trap, then:

     a) if the LCD information indicates the SNMPv2 context is of type
        local or local-proxy, then the usecStatsUnauthorizedOperations



Waters                        Experimental                     [Page 27]

RFC 1910          User-based Security Model for SNMPv2     February 1996


        counter is incremented, a report PDU is generated, and the
        received message is discarded without further processing.

     b) if the LCD information indicates the SNMPv2 context is of type
        remote, then the SNMPv2-Trap operation represented by the PDUs
        value is performed by the receiving SNMPv2 entity according to
        the procedures set forth in [12].

     c) if the LCD information indicates the SNMPv2 context is of type
        remote-proxy, then:

        i. a unique request-id is selected for use in forwarding the
           message.

        ii. information is extracted from the LCD concerning all
           combinations of userName, qoS, agentID, contextSelector and
           transport address with which the received message is to be
           forwarded.

        iii. for each such combination whose access rights permit
           SNMPv2-Trap operations to be forwarded, a new SNMPv2 message
           is constructed, as follows: its PDUs component is copied from
           that in the received message except that the contained
           request-id is replaced by the value selected in Step i above;
           its <userName>, <qoS>, <agentID> and <contextSelector> fields
           are set to the values extracted in Step ii above.

        iv. each constructed message is forwarded to the appropriate
           transport address extracted from the LCD in step ii above.

3.2.1.  Additional Details

   For the sake of clarity and to prevent the above procedure from being
   even longer, the following details were omitted from the above
   procedure.

3.2.1.1.  ASN.1 Parsing Errors

   For ASN.1 parsing errors, the snmpInASNParseErrs counter [15] is
   incremented and a report PDU is generated whenever such an ASN.1
   parsing error is discovered.  However, if the parsing error causes
   the information able to be extracted from the message to be
   insufficient for generating a report PDU, then the report PDU is not
   sent.







Waters                        Experimental                     [Page 28]

RFC 1910          User-based Security Model for SNMPv2     February 1996


3.2.1.2.  Incorrectly Encoded Parameters

   For an incorrectly encoded parameters component of the Message value
   (e.g., incorrect or inconsistent value of the <userLen> or <authLen>
   fields), the usecStatsBadParameters counter is incremented. Since the
   encoded parameters are in error, the report flag in the qoS cannot be
   reliably determined. Thus, no report PDU is generated for the
   incorrectly encoded parameters error condition.

3.2.1.3.  Generation of a Report PDU

   Some steps specify that the received message is discarded without
   further processing whenever a report PDU is generated.  However:

  -  An SNMPv2 manager never generates a report PDU.

  -  If the operation type can reliably be determined and it is
     determined to be a Report, SNMPv2-Trap, Inform, or a Response then
     a report PDU is not generated.

  -  A report PDU is only generated when the report flag in the qoS is
     set to the value 1.

   A generated report PDU must always use the current values of agentID,
   agentBoots, and agentTime from the LCD.  In addition, a generated
   report PDU must whenever possible contain the same request-id value
   as in the PDU contained in the received message.  Meeting this
   constraint normally requires the message to be further processed just
   enough so as to extract its request-id. There are two situations in
   which the SNMPv2 request-id cannot be determined. The first situation
   occurs when the userName is unknown and the qoS indicates that the
   message is encrypted.  The other situation is when there is an ASN.1
   parsing error.  In cases where the the request-id cannot be
   determined, the default request-id value 2147483647 is used.

3.2.1.4.  Cache Timeout

   Some steps specify that information is cached so that a Response
   operation may be correlated to the appropriate Request operation.
   However, a number of situations could cause the cache to grow without
   bound. One such situation is when the Response operation does not
   arrive or arrives "late" at the entity. In order to ensure that the
   cache does not grow without bound, it is recommended that cache
   entries be deleted when they are determined to be no longer valid. It
   is an implementation dependent decision as to how long cache entries
   remain valid, however, caching entries more than 150 seconds is not
   useful since any use of the cache entry after that time would
   generate a usecStatsNotInWindows error condition.



Waters                        Experimental                     [Page 29]

RFC 1910          User-based Security Model for SNMPv2     February 1996


3.3.  Generating a Response

   The procedure for generating a response to an SNMPv2 management
   request is identical to the procedure for transmitting a request (see
   Section 3.1), with these exceptions:

  -  The response is sent on behalf of the same user and with the same
     value of the agentID and contextSelector as the request.

  -  The PDUs value of the responding Message value is the response
     which results from performing the operation specified in the
     original PDUs value.

  -  The authentication protocol and other relevant information for the
     user is obtained, not from the LCD, but rather from information
     cached (in Step 13d) when processing the original message.

  -  The serialized Message value is transmitted using any transport
     address belonging to the agent for the transport domain from which
     the corresponding request originated - even if that is different
     from any transport information obtained from the LCD.

  -  If the qoS specifies that the message is to be authenticated or the
     response is being generated by a SNMPv2 entity acting in an agent
     role, then the current values of agentBoots and agentTime from the
     LCD are used.  Otherwise, the <agentBoots> and <agentTime> fields
     are set to zero-filled octets.

  -  The report flag in the qoS is set to the value 0.

4.  Discovery

   This security model requires that a discovery process obtain
   sufficient information about an SNMPv2 entity's agent in order to
   communicate with it.  Discovery requires the SNMPv2 manager to learn
   the agent's agentID value before communication may proceed.  This may
   be accomplished by formulating a get-request communication with the
   qoS set to noAuth/noPriv, the userName set to "public", the agentID
   set to all zeros (binary), the contextSelector set to "", and the
   VarBindList left empty.  The response to this message will be an
   reportPDU that contains the agentID within the <parameters> field
   (and containing the usecStatsUnknownContexts counter in the
   VarBindList). If authenticated communication is required then the
   discovery process may invoke the procedure described in Section 2.7
   to synchronize the clocks.






Waters                        Experimental                     [Page 30]

RFC 1910          User-based Security Model for SNMPv2     February 1996


5.  Definitions

SNMPv2-USEC-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Counter32, Unsigned32,
    snmpModules
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION
        FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP
        FROM SNMPv2-CONF;


usecMIB MODULE-IDENTITY
    LAST-UPDATED "9601120000Z"
    ORGANIZATION "IETF SNMPv2 Working Group"
    CONTACT-INFO
            "        Glenn W. Waters

             Postal: Bell-Northern Research, Ltd.
                     P.O. Box 3511, Station C
                     Ottawa, ON, K1Y 4H7
                     Canada

                Tel: +1 613 763 3933

             E-mail: gwaters@bnr.ca"
    DESCRIPTION
            "The MIB module for SNMPv2 entities implementing the user-
            based security model."
    ::= { snmpModules 6 }


usecMIBObjects OBJECT IDENTIFIER ::= { usecMIB 1 }


-- Textual Conventions

AgentID ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "An agent's administratively-unique identifier.

            The value for this object may not be all zeros or all 'ff'H.

            The initial value for this object may be configured via an
            operator console entry or via an algorithmic function.  In



Waters                        Experimental                     [Page 31]

RFC 1910          User-based Security Model for SNMPv2     February 1996


            the later case, the following guidelines are recommended:

              1) The first four octets are set to the binary equivalent
                 of the agent's SNMP network management private
                 enterprise number as assigned by the Internet Assigned
                 Numbers Authority (IANA).  For example, if Acme
                 Networks has been assigned { enterprises 696 }, the
                 first four octets would be assigned '000002b8'H.

              2) The remaining eight octets are the cookie whose
                 contents are determined via one or more enterprise-
                 specific methods.  Such methods must be designed so as
                 to maximize the possibility that the value of this
                 object will be unique in the agent's administrative
                 domain.  For example, the cookie may be the IP address
                 of the agent, or the MAC address of one of the
                 interfaces, with each address suitably padded with
                 random octets.  If multiple methods are defined, then
                 it is recommended that the cookie be further divided
                 into one octet that indicates the method being used and
                 seven octets which are a function of the method."
    SYNTAX     OCTET STRING (SIZE (12))


-- the USEC Basic group
--
-- a collection of objects providing basic instrumentation of
-- the SNMPv2 entity implementing the user-based security model


usecAgent       OBJECT IDENTIFIER ::= { usecMIBObjects 1 }

agentID OBJECT-TYPE
    SYNTAX     AgentID
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The agent's administratively-unique identifier."
    ::= { usecAgent 1 }

agentBoots OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The number of times that the agent has re-initialized
            itself since its initial configuration."
    ::= { usecAgent 2 }



Waters                        Experimental                     [Page 32]

RFC 1910          User-based Security Model for SNMPv2     February 1996


agentTime OBJECT-TYPE
    SYNTAX     Unsigned32 (0..2147483647)
    UNITS      "seconds"
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The number of seconds since the agent last incremented the
            agentBoots object."
    ::= { usecAgent 3 }

agentSize OBJECT-TYPE
    SYNTAX     INTEGER (484..65507)
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The maximum length in octets of an SNMPv2 message which
            this agent will accept using any transport mapping."
    ::= { usecAgent 4 }


-- USEC statistics
--
-- a collection of objects providing basic instrumentation of
-- the SNMPv2 entity implementing the user-based security model

usecStats      OBJECT IDENTIFIER ::= { usecMIBObjects 2 }


usecStatsUnsupportedQoS OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because they requested a quality-of-
            service that was unknown to the agent or otherwise
            unavailable."
    ::= { usecStats 1 }

usecStatsNotInWindows OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because they appeared outside of the
            agent's window."
    ::= { usecStats 2 }



Waters                        Experimental                     [Page 33]

RFC 1910          User-based Security Model for SNMPv2     February 1996


usecStatsUnknownUserNames OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because they referenced a user that was
            not known to the agent."
    ::= { usecStats 3 }

usecStatsWrongDigestValues OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because they didn't contain the expected
            digest value."
    ::= { usecStats 4 }

usecStatsUnknownContexts OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because they referenced a context that
            was not known to the agent."
    ::= { usecStats 5 }

usecStatsBadParameters OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because the <parameters> field was
            improperly encoded or had invalid syntax."
    ::= { usecStats 6 }

usecStatsUnauthorizedOperations OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The total number of packets received by the SNMPv2 entity
            which were dropped because the PDU type referred to an
            operation that is invalid or not authorized."



Waters                        Experimental                     [Page 34]

RFC 1910          User-based Security Model for SNMPv2     February 1996


    ::= { usecStats 7 }


-- conformance information

usecMIBConformance
               OBJECT IDENTIFIER ::= { usecMIB 2 }

usecMIBCompliances
               OBJECT IDENTIFIER ::= { usecMIBConformance 1 }
usecMIBGroups  OBJECT IDENTIFIER ::= { usecMIBConformance 2 }


-- compliance statements

usecMIBCompliance MODULE-COMPLIANCE
    STATUS  current
    DESCRIPTION
            "The compliance statement for SNMPv2 entities which
            implement the SNMPv2 USEC model."
    MODULE  -- this module
        MANDATORY-GROUPS { usecBasicGroup,
                          usecStatsGroup }
    ::= { usecMIBCompliances 1 }


-- units of conformance

usecBasicGroup OBJECT-GROUP
    OBJECTS { agentID,
              agentBoots,
              agentTime,
              agentSize }
    STATUS  current
    DESCRIPTION
            "A collection of objects providing identification, clocks,
            and capabilities of an SNMPv2 entity which implements the
            SNMPv2 USEC model."
    ::= { usecMIBGroups 1 }

usecStatsGroup OBJECT-GROUP
    OBJECTS { usecStatsUnsupportedQoS,
              usecStatsNotInWindows,
              usecStatsUnknownUserNames,
              usecStatsWrongDigestValues,
              usecStatsUnknownContexts,
              usecStatsBadParameters,
              usecStatsUnauthorizedOperations }



Waters                        Experimental                     [Page 35]

RFC 1910          User-based Security Model for SNMPv2     February 1996


    STATUS  current
    DESCRIPTION
            "A collection of objects providing basic error statistics of
            an SNMPv2 entity which implements the SNMPv2 USEC model."
    ::= { usecMIBGroups 2 }

END

6.  Security Considerations

6.1.  Recommended Practices

   This section describes practices that contribute to the secure,
   effective operation of the mechanisms defined in this memo.

  -  A management station must discard SNMPv2 responses for which
     neither the request-id component nor the represented management
     information corresponds to any currently outstanding request.

     Although it would be typical for a management station to do this as
     a matter of course, when using these security protocols it is
     significant due to the possibility of message duplication
     (malicious or otherwise).

  -  A management station must generate unpredictable request-ids in
     authenticated messages in order to protect against the possibility
     of message duplication (malicious or otherwise).

  -  A management station should perform time synchronization using
     authenticated messages in order to protect against the possibility
     of message duplication (malicious or otherwise).

  -  When sending state altering messages to a managed agent, a
     management station should delay sending successive messages to the
     managed agent until a positive acknowledgement is received for the
     previous message or until the previous message expires.

     No message ordering is imposed by the SNMPv2. Messages may be
     received in any order relative to their time of generation and each
     will be processed in the ordered received. Note that when an
     authenticated message is sent to a managed agent, it will be valid
     for a period of time of approximately 150 seconds under normal
     circumstances, and is subject to replay during this period.
     Indeed, a management station must cope with the loss and re-
     ordering of messages resulting from anomalies in the network as a
     matter of course.





Waters                        Experimental                     [Page 36]

RFC 1910          User-based Security Model for SNMPv2     February 1996


     However, a managed object, snmpSetSerialNo [15], is specifically
     defined for use with SNMPv2 set operations in order to provide a
     mechanism to ensure the processing of SNMPv2 messages occurs in a
     specific order.

  -  The frequency with which the secrets of an SNMPv2 user should be
     changed is indirectly related to the frequency of their use.

     Protecting the secrets from disclosure is critical to the overall
     security of the protocols. Frequent use of a secret provides a
     continued source of data that may be useful to a cryptanalyst in
     exploiting known or perceived weaknesses in an algorithm.  Frequent
     changes to the secret avoid this vulnerability.

     Changing a secret after each use is generally regarded as the most
     secure practice, but a significant amount of overhead may be
     associated with that approach.

     Note, too, in a local environment the threat of disclosure may be
     less significant, and as such the changing of secrets may be less
     frequent.  However, when public data networks are the communication
     paths, more caution is prudent.

6.2.  Defining Users

   The mechanisms defined in this document employ the notion of "users"
   having access rights.  How "users" are defined is subject to the
   security policy of the network administration. For example, users
   could be individuals (e.g., "joe" or "jane"), or a particular role
   (e.g., "operator" or "administrator"), or a combination (e.g., "joe-
   operator", "jane-operator" or "joe-admin").  Furthermore, a "user"
   may be a logical entity, such as a manager station application or set
   of manager station applications, acting on behalf of a individual or
   role, or set of individuals, or set of roles, including combinations.

   Appendix A describes an algorithm for mapping a user "password" to a
   16 octet value for use as either a user's authentication key or
   privacy key (or both).  Passwords are often generated, remembered,
   and input by a human.  Human-generated passwords may be less than the
   16 octets required by the authentication and privacy protocols, and
   brute force attacks can be quite easy on a relatively short ASCII
   character set.  Therefore, the algorithm is Appendix A performs a
   transformation on the password.  If the Appendix A algorithm is used,
   agent implementations (and agent configuration applications) must
   ensure that passwords are at least 8 characters in length.

   Because the Appendix A algorithm uses such passwords (nearly)
   directly, it is very important that they not be easily guessed.  It



Waters                        Experimental                     [Page 37]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   is suggested that they be composed of mixed-case alphanumeric and
   punctuation characters that don't form words or phrases that might be
   found in a dictionary.  Longer passwords improve the security of the
   system.  Users may wish to input multiword phrases to make their
   password string longer while ensuring that it is memorable.

   Note that there is security risk in configuring the same "user" on
   multiple systems where the same password is used on each system,
   since the compromise of that user's secrets on one system results in
   the compromise of that user on all other systems having the same
   password.

   The algorithm in Appendix A avoids this problem by including the
   agent's agentID value as well as the user's password in the
   calculation of a user's secrets; this results in the user's secrets
   being different at different agents; however, if the password is
   compromised the algorithm in Appendix A is not effective.

6.3.  Conformance

   To be termed a "Secure SNMPv2 implementation", an SNMPv2
   implementation:

 - must implement the Digest Authentication Protocol.

 - must, to the maximal extent possible, prohibit access to the
   secret(s) of each user about which it maintains information in a LCD,
   under all circumstances except as required to generate and/or
   validate SNMPv2 messages with respect to that user.

 - must implement the SNMPv2 USEC MIB.

   In addition, an SNMPv2 agent must provide initial configuration in
   accordance with Appendix A.1.

   Implementation of the Symmetric Encryption Protocol is optional.

7.  Editor's Address

   Glenn W. Waters
   Bell-Northern Research Ltd.
   P.O. Box 3511, Station C
   Ottawa, Ontario  K1Y 4H7
   CA

   Phone: +1 613 763 3933
   EMail: gwaters@bnr.ca




Waters                        Experimental                     [Page 38]

RFC 1910          User-based Security Model for SNMPv2     February 1996


8.  Acknowledgements

   This document is the result of significant work by three major
   contributors:

     Keith McCloghrie (Cisco Systems, kzm@cisco.com)
     Marshall T. Rose (Dover Beach Consulting, mrose@dbc.mtview.ca.us)
     Glenn W. Waters (Bell-Northern Research Ltd., gwaters@bnr.ca)

   The authors wish to acknowledge James M. Galvin of Trusted
   Information Systems who contributed significantly to earlier work on
   which this memo is based, and the general contributions of members of
   the SNMPv2 Working Group, and, in particular, Aleksey Y. Romanov and
   Steven L. Waldbusser.

   A special thanks is extended for the contributions of:

     Uri Blumenthal (IBM)
     Shawn Routhier (Epilogue)
     Barry Sheehan (IBM)
     Bert Wijnen (IBM)

9.  References

[1]  McCloghrie, K., Editor, "An Administrative Infrastructure for
     SNMPv2", RFC 1909, Cisco Systems, January 1996.

[2]  Case, J., Fedor, M., Schoffstall, M., and J. Davin, "Simple
     Network Management Protocol", STD 15, RFC 1157, SNMP Research,
     Performance Systems International, MIT Laboratory for Computer
     Science, May 1990.

[3]  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, MIT
     Laboratory for Computer Science, April 1992.

[4]  The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S. Waldbusser, "Coexistence between Version 1 and Version 2 of
     the Internet-standard Network Management Framework", RFC 1908,
     January 1996.

[5]  Data Encryption Standard, National Institute of Standards and
     Technology.  Federal Information Processing Standard (FIPS)
     Publication 46-1.  Supersedes FIPS Publication 46, (January, 1977;
     reaffirmed January, 1988).

[6]  Data Encryption Algorithm, American National Standards Institute.
     ANSI X3.92-1981, (December, 1980).




Waters                        Experimental                     [Page 39]

RFC 1910          User-based Security Model for SNMPv2     February 1996


[7]  DES Modes of Operation, National Institute of Standards and
     Technology.  Federal Information Processing Standard (FIPS)
     Publication 81, (December, 1980).

[8]  Data Encryption Algorithm - Modes of Operation, American National
     Standards Institute.  ANSI X3.106-1983, (May 1983).

[9]  Guidelines for Implementing and Using the NBS Data Encryption
     Standard, National Institute of Standards and Technology.  Federal
     Information Processing Standard (FIPS) Publication 74, (April,
     1981).

[10] Validating the Correctness of Hardware Implementations of the NBS
     Data Encryption Standard, National Institute of Standards and
     Technology.  Special Publication 500-20.

[11] Maintenance Testing for the Data Encryption Standard, National
     Institute of Standards and Technology.  Special Publication 500-61,
     (August, 1980).

[12] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S., Waldbusser, "Protocol Operations for Version 2 of the Simple
     Network Management Protocol (SNMPv2)", RFC 1905, January 1996.

[13] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S. Waldbusser, "Transport Mappings for Version 2 of the Simple
     Network Management Protocol (SNMPv2)", RFC 1906, January 1996.

[14] Krawczyk, H., "Keyed-MD5 for Message Authentication", Work in
     Progress, IBM, June 1995.

[15] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
     S. Waldbusser, "Management Information Base for Version 2 of the
     Simple Network Management Protocol (SNMPv2)", RFC 1907
     January 1996.
















Waters                        Experimental                     [Page 40]

RFC 1910          User-based Security Model for SNMPv2     February 1996


APPENDIX A - Installation

A.1.   Agent Installation Parameters

During installation, an agent is configured with several parameters.
These include:

(1)  a security posture

     The choice of security posture determines the extent of the view
     configured for unauthenticated access.  One of three possible
     choices is selected:

          minimum-secure,
          semi-secure, or
          very-secure.

(2)  one or more transport service addresses

     These parameters may be specified explicitly, or they may be
     specified implicitly as the same set of network-layer addresses
     configured for other uses by the device together with the well-
     known transport-layer "port" information for the appropriate
     transport domain [13].  The agent listens on each of these
     transport service addresses for messages sent on behalf of any user
     it knows about.

(3)  one or more secrets

     These are the authentication/privacy secrets for the first user to
     be configured.

     One way to accomplish this is to have the installer enter a
     "password" for each required secret. The password is then
     algorithmically converted into the required secret by:

     - forming a string of length 1,048,576 octets by repeating the
       value of the password as often as necessary, truncating
       accordingly, and using the resulting string as the input to the
       MD5 algorithm. The resulting digest, termed "digest1", is used in
       the next step.

     - a second string of length 44 octets is formed by concatenating
       digest1, the agent's agentID value, and digest1. This string is
       used as input to the MD5 algorithm. The resulting digest is the
       required secret (see Appendix A.2).





Waters                        Experimental                     [Page 41]

RFC 1910          User-based Security Model for SNMPv2     February 1996


   With these configured parameters, the agent instantiates the
   following user, context, views and access rights.  This configuration
   information should be readOnly (persistent).

  -  One user:

                         privacy not supported   privacy supported
                         ---------------------   -----------------
       <userName>        "public"                "public"
       <authProtocol>    Digest Auth. Protocol   Digest Auth. Protocol
       <authPrivateKey>  authentication key      authentication key
       <privProtocol>    none                    Symmetric Privacy Protocol
       <privPrivateKey>  --                      privacy key

  -  One local context with its <contextSelector> as the empty-string.

  -  One view for authenticated access:

          - the <all> MIB view is the "internet" subtree.

  -  A second view for unauthenticated access.  This view is configured
     according to the selected security posture.  For the "very-secure"
     posture:

          - the <restricted> MIB view is the union of the "snmp" [15],
          "usecAgent" and "usecStats" subtrees.

     For the "semi-secure" posture:

          - the <restricted> MIB view is the union of the "snmp" [15],
          "usecAgent", "usecStats" and "system" subtrees.

     For the "minimum-secure" posture:

          - the <restricted> MIB view is the "internet" subtree.

  -  Access rights to allow:

        - read-only access for unauthenticated messages on behalf of the
          user "public" to the <restricted> MIB view of contextSelector
          "".

        - read-write access for authenticated but not private messages
          on behalf of the user "public" to the <all> MIB view of
          contextSelector "".

        - if privacy is supported, read-write access for authenticated
          and private messages on behalf of the user "public" to the



Waters                        Experimental                     [Page 42]

RFC 1910          User-based Security Model for SNMPv2     February 1996


          <all> MIB view of contextSelector "".

A.2.   Password to Key Algorithm

   The following code fragment demonstrates the password to key
   algorithm which can be used when mapping a password to an
   authentication or privacy key. (The calls to MD5 are as documented in
   RFC 1321.)

void password_to_key(password, passwordlen, agentID, key)
    u_char *password;       /* IN */
    u_int   passwordlen;    /* IN */
    u_char *agentID;        /* IN - pointer to 12 octet long agentID */
    u_char *key;            /* OUT - caller supplies pointer to 16
                               octet buffer */ {
    MD5_CTX     MD;
    u_char      *cp, password_buf[64];
    u_long      password_index = 0;
    u_long      count = 0, i;

    MD5Init (&MD);   /* initialize MD5 */

    /* loop until we've done 1 Megabyte */
    while (count < 1048576) {
        cp = password_buf;
        for(i = 0; i < 64; i++) {
            *cp++ = password[ password_index++ % passwordlen ];
            /*
             * Take the next byte of the password, wrapping to the
             * beginning of the password as necessary.
             */
        }
        MDupdate (&MD, password_buf, 64);
        count += 64;
    }
    MD5Final (key, &MD);              /* tell MD5 we're done */

    /* localize the key with the agentID and pass through MD5
      to produce final key */
    memcpy (password_buf, key, 16);
    memcpy (password_buf+16, agentID, 12);
    memcpy (password_buf+28, key, 16);

    MD5Init (&MD);
    MDupdate (&MD, password_buf, 44);
    MD5Final (key, &MD);

    return; }



Waters                        Experimental                     [Page 43]

RFC 1910          User-based Security Model for SNMPv2     February 1996


A.3.   Password to Key Sample

   The following shows a sample output of the password to key algorithm.

   With a password of "maplesyrup" the output of the password to key
   algorithm before the key is localized with the agent's agentID is:

    '9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63'H

   After the intermediate key (shown above) is localized with the
   agentID value of:

    '00 00 00 00 00 00 00 00 00 00 00 02'H

   the final output of the password to key algorithm is:

    '52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b'H


































Waters                        Experimental                     [Page 44]