idnits 2.17.1 draft-ietf-snmpv3-usm-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-25) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 11 longer pages, the longest (page 67) being 60 lines == It seems as if not all pages are separated by form feeds - found 66 form feeds but 68 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There is 1 instance of too long lines in the document, the longest one being 26 characters in excess of 72. ** The abstract seems to contain references ([SNMP-ARCH]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 2878 has weird spacing: '...support priva...' == Line 2884 has weird spacing: '...rotocol usmMD...' == Line 2909 has weird spacing: '... u_int pass...' == Line 2911 has weird spacing: '... u_int engi...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (14 July 1997) is 9782 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'SNMP-USM' is mentioned on line 186, but not defined == Missing Reference: 'SNMP-MP' is mentioned on line 712, but not defined == Missing Reference: 'Localized-key' is mentioned on line 2717, but not defined == Missing Reference: 'RFC1321' is mentioned on line 2899, but not defined -- Looks like a reference, but probably isn't: '64' on line 2915 == Unused Reference: 'RFC1902' is defined on line 2752, but no explicit reference was found in the text == Unused Reference: 'RFC1905' is defined on line 2757, but no explicit reference was found in the text == Unused Reference: 'RFC1908' is defined on line 2772, but no explicit reference was found in the text == Unused Reference: 'SNMP-v3MP' is defined on line 2784, but no explicit reference was found in the text == Unused Reference: 'SNMP-ACM' is defined on line 2789, but no explicit reference was found in the text ** Obsolete normative reference: RFC 1905 (ref. 'RFC1902') (Obsoleted by RFC 3416) -- Duplicate reference: RFC1905, mentioned in 'RFC1905', was also mentioned in 'RFC1902'. ** Obsolete normative reference: RFC 1905 (Obsoleted by RFC 3416) ** Obsolete normative reference: RFC 1906 (Obsoleted by RFC 3417) ** Obsolete normative reference: RFC 1907 (Obsoleted by RFC 3418) ** Obsolete normative reference: RFC 1908 (Obsoleted by RFC 2576) == Outdated reference: A later version (-06) exists of draft-ietf-snmpv3-next-gen-arch-03 == Outdated reference: A later version (-05) exists of draft-ietf-snmpv3-mpc-03 == Outdated reference: A later version (-04) exists of draft-ietf-snmpv3-acm-01 -- Possible downref: Non-RFC (?) normative reference: ref. 'Localized-Key' -- Possible downref: Non-RFC (?) normative reference: ref. 'KEYED-MD5' ** Downref: Normative reference to an Informational RFC: RFC 1321 (ref. 'MD5') -- Possible downref: Non-RFC (?) normative reference: ref. 'DES-NIST' -- Possible downref: Non-RFC (?) normative reference: ref. 'DES-ANSI' -- Possible downref: Non-RFC (?) normative reference: ref. 'DESO-NIST' -- Possible downref: Non-RFC (?) normative reference: ref. 'DESO-ANSI' -- Possible downref: Non-RFC (?) normative reference: ref. 'DESG-NIST' -- Possible downref: Non-RFC (?) normative reference: ref. 'DEST-NIST' -- Possible downref: Non-RFC (?) normative reference: ref. 'DESM-NIST' Summary: 17 errors (**), 0 flaws (~~), 21 warnings (==), 14 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 User-based Security Model (USM) for version 3 of the 3 Simple Network Management Protocol (SNMPv3) 5 14 July 1997 7 U. Blumenthal 8 IBM T. J. Watson Research 9 uri@watson.ibm.com 11 B. Wijnen 12 IBM T. J. Watson Research 13 wijnen@vnet.ibm.com 15 17 Status of this Memo 19 This document is an Internet-Draft. Internet-Drafts are working 20 documents of the Internet Engineering Task Force (IETF), its areas, 21 and its working groups. Note that other groups may also distribute 22 working documents as Internet-Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six months 25 and may be updated, replaced, or obsoleted by other documents at any 26 time. It is inappropriate to use Internet- Drafts as reference 27 material or to cite them other than as ``work in progress.'' 29 To learn the current status of any Internet-Draft, please check the 30 ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow 31 Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), 32 ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). 34 Abstract 36 This document describes the User-based Security Model (USM) for SNMP 37 version 3 for use in the SNMP architecture [SNMP-ARCH]. It defines 38 the Elements of Procedure for providing SNMP message level security. 39 This document also includes a MIB for remotely monitoring/managing 40 the configuration parameters for this Security Model. 42 Blumenthal/Wijnen Expires December 1997 [Page 1] 43 0. Issues and Change Log 45 0.1. Current Open Issues 46 - Is it OK to use MD5 for KeyChange Algorithm ?? 47 - Improve acknowledgements and sync it up with other documents 48 - Should the USM define checking such that a received Response 49 messages used the same or better LoS than the Request message 50 that this is a response to. 51 In section 3.1 step 9, we return a completed outgoing message 52 to the calling module (Message Processing). We believe it is 53 the Message Processing Subsystem that should cache information 54 about outgoing messages regarding msgID and such so that a 55 possible Response Message can be mapped to an outstanding 56 request. At the same time that piece of code can then ensure 57 that the same securityModel and the same (or better??) LoS 58 has been used for the Response Message. So in step 9 we do 59 not save any cachedSecurityData for outgoing messages. 60 - Can you all please review section 3.1 steps 7a and 7b to 61 ensure that we have the timeliness checking and the 62 automagic timeliness sync up correct? Quite some text changed 63 in this writeup compared to what we used to see in SNMPv2u 64 and SNMPv2*. I think the current text is much better and 65 makes things simpler. But we need to make sure we cover 66 everything. 68 0.2. Change Log 70 [version 1.8] 71 - Add reference to RFC2119 about use of SHOULD and MUST 72 - paginate and generate table of contents 73 - posted as I-D on 15 July 1997 75 [version 1.7] 76 - Changed the KeyChange description so it allows for other 77 hash algorithms instead of MD5. If in the future the MD5 gets 78 replaced by another Authentication -- algorithm, then it seems 79 we also need to use that new algorithm to -- calculate the 80 digest during KeyChange. 81 - Updated the password to key code fragment to cater for the 82 variable length of the snmpEngineID. 83 - Added issue on cacheing of data on outgoing messages and one 84 on required review of timeliness handling. 86 [version 1.4 - version 1.6] 87 - Editorial changes because of internal review by authors 88 - Adapt to latest list of Primitive names and parameters 89 - Change USEC to USM 90 - Changes based on comments from Jeff Case. 91 - Checked MIB with SMICng 93 [version 1.3] 95 Blumenthal/Wijnen Expires December 1997 [Page 2] 96 - Too many changes have taken place, so marking it was skipped 97 The most important changes are listed here. 98 However, changes that just split text on different lines 99 and changes like different capitalization of words/terms 100 has not been listed. Also changes to fit new terms and such 101 have not been listed. 102 - Split/Join some lines to ensure we stay within 72 columns 103 as required by RFC guidelines. 104 - Addressed Dave Perkins comments: 105 1) Section 1.3, last para's, timeliness was left off. -done 106 2) Section 1.5.1, the operations need to be made general, since 107 additional one may be added later. - done 108 3) Section 1.5.2, the field "request-id" is used throughout 109 this section when it should be field "msgID" - done 110 4) The document must allow the value of engineID in the 111 security to be a zero length string. There are several 112 places that are affected by this change. An actual value is 113 never needed, since secrets are never the same on different 114 agents (see your paper). - done 115 5) Last sentence of description for object usmUserCloneFrom is 116 not correct, since the object has a OID data type - done 117 - Removed groupName from usmUserTable. 118 Now done in Access Control as agreed at 2nd interim 119 - Stats counters back in this document as agreed at 2nd interim 120 - Use AutonomousType for usmUserPrivProtocol and 121 usmUserAuthProtocol. Also use OBJECT-IDENTITY for the 122 protocol OIDs (John Flick). 123 - Changed "SNMPv3 engine" to "SNMP engine" at various places 124 - added appendix with sample encoding of securityParameters 125 - cleanup elements of procedure to use consistent terms 126 - fix up some problems in elements of procedure 127 - Do not use IMPLIED on usmUserTable as agreed at 2nd interim. 128 For one thing, SNMPv1 cannot handle it. 129 - cleanup section 2.3 and 3.3 step 7b based on comments by 130 Dave Levi. 132 [version 1.2] 133 - changed (simplified) time sync in section 3 item 7. 134 - added usmUserMiId 135 - cleaned up text 136 - defined IV "salt" generation 137 - removed Statistics counters (now in MPC) and Report PDU 138 generation (now in MPC) 139 - Removed auth and DES MIBs which are now merged into 140 User-based Security MIB 141 - specified where cachedSecurityData needs to be discarded 142 - added abstract service interface definitions 143 - removed section on error reporting (is MPC responsibility) 144 - removed auth/priv protocol definitions, they are in ARCH now 145 - removed MIB definitions for snmpEngineID, Time, Boots. They 146 are in ARCH now. 148 Blumenthal/Wijnen Expires December 1997 [Page 3] 150 [version 1.1] 151 - removed . 152 - added , . 153 - added abstract function interface description of 154 inter-module communications. 155 - modified IV generation process to accommodate messages produced 156 faster than one-per-second (still open). 157 - always update the clock regardless of whether incoming message 158 was Report or not (if the message was properly authenticated 159 and its time-stamp is ahead of our notion of their clock). 161 [version 1.0] 162 - first version posted to the SNMPv3 editor's mailing list. 163 - based on v2adv slides, v2adv items and issues list and on 164 RFC1910 and SNMPv2u and SNMPv2* documents. 165 - various iterations were done by the authors via private email. 167 Blumenthal/Wijnen Expires December 1997 [Page 4] 168 1. Introduction 170 The Architecture for describing Internet Management Frameworks 171 [SNMP-ARCH] is composed of multiple subsystems: 173 1) a Message Processing Subsystem, 174 2) a Security Subsystem, 175 3) an Access Control Subsystem, 177 Applications make use of the services of these subsystems. 179 It is important to understand the SNMP architecture and the 180 terminology of the architecture to understand where the Security 181 Model described in this document fits into the architecture and 182 interacts with other subsystems within the architecture. The 183 reader is expected to have read and understood the description of 184 the SNMP architecture, as defined in [SNMP-ARCH]. 186 This memo [SNMP-USM] describes the User-based Security Model as it 187 is used within the SNMP Architecture. The main idea is that we use 188 the traditional concept of a user (identified by a userName) to 189 associate security information with. 191 This memo describes the use of Keyed-MD5 as the authentication 192 protocol and the use of CBC-DES as the privacy protocol. 193 The User-based Security Model however allows for other such 194 protocols to be used instead of or concurrent with these protocols. 195 Therefore, the description of Keyed-MD5 and CBC-DES are in separate 196 sections to reflect their self-contained nature and to indicate 197 that they can be replaced or supplemented in the future. 199 1.1. Threats 201 Several of the classical threats to network protocols are 202 applicable to the network management problem and therefore would 203 be applicable to any SNMP Security Model. Other threats are not 204 applicable to the network management problem. This section 205 discusses principal threats, secondary threats, and threats which 206 are of lesser importance. 208 The principal threats against which this SNMP Security Model 209 should provide protection are: 211 - Modification of Information 212 The modification threat is the danger that some unauthorized 213 entity may alter in-transit SNMP messages generated on behalf 214 of an authorized user in such a way as to effect unauthorized 215 management operations, including falsifying the value of an 216 object. 218 - Masquerade 220 Blumenthal/Wijnen Expires December 1997 [Page 5] 221 The masquerade threat is the danger that management operations 222 not authorized for some user may be attempted by assuming the 223 identity of another user that has the appropriate authorizations. 225 Two secondary threats are also identified. The Security Model 226 defined in this memo provides limited protection against: 228 - Disclosure 229 The disclosure threat is the danger of eavesdropping on the 230 exchanges between managed agents and a management station. 231 Protecting against this threat may be required as a matter of 232 local policy. 234 - Message Stream Modification 235 The SNMP protocol is typically based upon a connection-less 236 transport service which may operate over any sub-network service. 237 The re-ordering, delay or replay of messages can and does occur 238 through the natural operation of many such sub-network services. 239 The message stream modification threat is the danger that 240 messages may be maliciously re-ordered, delayed or replayed to 241 an extent which is greater than can occur through the natural 242 operation of a sub-network service, in order to effect 243 unauthorized management operations. 245 There are at least two threats that an SNMP Security Model need 246 not protect against. The security protocols defined in this memo 247 do not provide protection against: 249 - Denial of Service 250 This SNMP Security Model does not attempt to address the broad 251 range of attacks by which service on behalf of authorized users 252 is denied. Indeed, such denial-of-service attacks are in many 253 cases indistinguishable from the type of network failures with 254 which any viable network management protocol must cope as a 255 matter of course. 256 - Traffic Analysis 257 This SNMP Security Model does not attempt to address traffic 258 analysis attacks. Indeed, many traffic patterns are predictable 259 - devices may be managed on a regular basis by a relatively small 260 number of management applications - and therefore there is no 261 significant advantage afforded by protecting against traffic 262 analysis. 264 1.2. Goals and Constraints 266 Based on the foregoing account of threats in the SNMP network 267 management environment, the goals of this SNMP Security Model 268 are as follows. 270 1) Provide for verification that each received SNMP message has 271 not been modified during its transmission through the network. 273 Blumenthal/Wijnen Expires December 1997 [Page 6] 274 2) Provide for verification of the identity of the user on whose 275 behalf a received SNMP message claims to have been generated. 277 3) Provide for detection of received SNMP messages, which request 278 or contain management information, whose time of generation was 279 not recent. 281 4) Provide, when necessary, that the contents of each received 282 SNMP message are protected from disclosure. 284 In addition to the principal goal of supporting secure network 285 management, the design of this SNMP Security Model is also 286 influenced by the following constraints: 288 1) When the requirements of effective management in times of 289 network stress are inconsistent with those of security, the 290 design should prefer the former. 292 2) Neither the security protocol nor its underlying security 293 mechanisms should depend upon the ready availability of other 294 network services (e.g., Network Time Protocol (NTP) or key 295 management protocols). 297 3) A security mechanism should entail no changes to the basic 298 SNMP network management philosophy. 300 1.3. Security Services 302 The security services necessary to support the goals of this SNMP 303 Security Model are as follows: 305 - Data Integrity 306 is the provision of the property that data has not been altered 307 or destroyed in an unauthorized manner, nor have data sequences 308 been altered to an extent greater than can occur non-maliciously. 310 - Data Origin Authentication 311 is the provision of the property that the claimed identity of 312 the user on whose behalf received data was originated is 313 corroborated. 315 - Data Confidentiality 316 is the provision of the property that information is not made 317 available or disclosed to unauthorized individuals, entities, 318 or processes. 320 - Message timeliness and limited replay protection 321 is the provision of the property that a message whose generation 322 time is outside of a specified time window is not accepted. 323 Note that message reordering is not dealt with and can occur in 325 Blumenthal/Wijnen Expires December 1997 [Page 7] 326 normal conditions too. 328 For the protocols specified in this memo, it is not possible to 329 assure the specific originator of a received SNMP message; rather, 330 it is the user on whose behalf the message was originated that is 331 authenticated. 333 For these protocols, it not possible to obtain data integrity 334 without data origin authentication, nor is it possible to obtain 335 data origin authentication without data integrity. Further, 336 there is no provision for data confidentiality without both data 337 integrity and data origin authentication. 339 The security protocols used in this memo are considered acceptably 340 secure at the time of writing. However, the procedures allow for 341 new authentication and privacy methods to be specified at a future 342 time if the need arises. 344 1.4. Module Organization 346 The security protocols defined in this memo are split in three 347 different modules and each has its specific responsibilities such 348 that together they realize the goals and security services 349 described above: 351 - The authentication module MUST provide for: 353 - Data Integrity, 355 - Data Origin Authentication 357 - The timeliness module MUST provide for: 359 - Protection against message delay or replay (to an extent 360 greater than can occur through normal operation) 362 - The privacy module MUST provide for 364 - Protection against disclosure of the message payload. 366 The timeliness module is fixed for the User-based Security Model 367 while there is provision for multiple authentication and/or 368 privacy modules, each of which implements a specific authentication 369 or privacy protocol respectively. 371 1.4.1. Timeliness Module 373 Section 3 (Elements of Procedure) uses the timeliness values in an 374 SNMP message to do timeliness checking. The timeliness check is 375 only performed if authentication is applied to the message. Since 376 the complete message is checked for integrity, we can assume that 378 Blumenthal/Wijnen Expires December 1997 [Page 8] 379 the timeliness values in a message that passes the authentication 380 module are trustworthy. 382 1.4.2. Authentication Protocol 384 Section 6 describes the Keyed-MD5 authentication protocol which 385 is the first authentication protocol to be used with the 386 User-based Security Model. In the future additional or 387 replacement authentication protocols may be defined as new 388 needs arise. 390 The User-based Security Model prescribes that, if authentication 391 is used, then the complete message is checked for integrity in 392 the authentication module. 394 For a message to be authenticated, it needs to pass authentication 395 check by the authentication module and the timeliness check which 396 is a fixed part of this User-based Security model. 398 1.4.3. Privacy Protocol 400 Section 7 describes the CBC-DES Symmetric Encryption Protocol 401 which is the first privacy protocol to be used with the 402 User-based Security Model. In the future additional or 403 replacement privacy protocols may be defined as new needs arise. 405 The User-based Security Model prescribes that the scopedPDU 406 is protected from disclosure when a message is sent with privacy. 408 The User-based Security Model also prescribes that a message 409 needs to be authenticated if privacy is in use. 411 1.5. Protection against Message Replay, Delay and Redirection 413 1.5.1. Authoritative SNMP engine 415 In order to protect against message replay, delay and redirection, 416 one of the SNMP engines involved in each communication is 417 designated to be the authoritative SNMP engine. When an SNMP 418 message contains a payload which expects a response (for example 419 a Get, GetNext, GetBulk, Set or Inform PDU), then the receiver of 420 such messages is authoritative. When an SNMP message contains a 421 payload which does not expect a response (for example an 422 SNMPv2-Trap, Response or Report PDU), then the sender of such a 423 message is authoritative. 425 1.5.2. Mechanisms 427 The following mechanisms are used: 429 - To protect against the threat of message delay or replay (to an 431 Blumenthal/Wijnen Expires December 1997 [Page 9] 432 extent greater than can occur through normal operation), a set 433 of timeliness (at the authoritative source) indicators and a 434 msgID are included in each message generated. An SNMP engine 435 evaluates the timeliness indicators to determine if a received 436 message is recent. An SNMP engine may evaluate the timeliness 437 indicators to ensure that a received message is at least as 438 recent as the last message it received from the same source. 439 A non-authoritative SNMP engine uses received authentic messages 440 to advance its notion of the timeliness indicators at the remote 441 authoritative source. An SNMP engine also evaluates the msgID in 442 received Response messages and discards those Response messages 443 which do not correspond to an outstanding Request message. 445 These mechanisms provide for the detection of messages whose 446 time of generation was not recent in all but one circumstance; 447 this circumstance is the delay or replay of a Report message 448 (sent to a receiver) when the receiver has not recently 449 communicated with the source of the Report message. In this 450 circumstance, the detection guarantees only that the Report 451 message is more recent than the last communication between 452 source and destination of the Report message. 453 However, Report messages do not request or contain sensitive 454 management information, and thus, goal #3 in Section 1.2 above 455 is met; further, Report messages can at most cause the receiver 456 to advance its notion of the timeliness indicators (at the source) 457 by less than the proper amount. 459 This protection against the threat of message delay or replay 460 does not imply nor provide any protection against unauthorized 461 deletion or suppression of messages. Also, an SNMP engine may 462 not be able to detect message reordering if all the messages 463 involved are sent within the Time Window interval. Other 464 mechanisms defined independently of the security protocol can 465 also be used to detect the re-ordering replay, deletion, or 466 suppression of messages containing Set operations (e.g., the 467 MIB variable snmpSetSerialNo [RFC1907]). 469 - verifying that a message sent to/from one SNMP engine cannot 470 be replayed to/as-if-from another SNMP engine. 472 Included in each message is an identifier unique to the SNMP 473 engine associated with the sender or intended recipient of the 474 message. Also, each message containing a Response PDU contains 475 a msgID which associates the message with a recently generated 476 Request message. 478 A Report message sent by one SNMP engine to a second SNMP 479 engine can potentially be replayed to another SNMP engine but 480 that is not considered a threat (see above); 482 - detecting messages which were not recently generated. 484 A set of time indicators are included in the message, indicating 485 the time of generation. Messages (other than those containing 486 Report PDUs) without recent time indicators are not considered 487 authentic. In addition, messages containing Response PDUs have 488 a msgID; if the msgID does not match that of a recently 489 generated Request message, then the message is not considered 490 to be authentic. 492 A Report message sent by an SNMP engine can potentially be 493 replayed at a later time to an SNMP engine which has not 494 recently communicated with that source engine, which is 495 not a threat (see above). 497 This memo allows the same user to be defined on multiple SNMP 498 engines. Each SNMP engine maintains a value, snmpEngineID, 499 which uniquely identifies the SNMP engine. This value is included 500 in each message sent to/from the SNMP engine that is authoritative 501 (see section 1.5.1). On receipt of a message, an authoritative 502 SNMP engine checks the value to ensure that it is the intended 503 recipient, and a non-authoritative SNMP engine uses the value to 504 ensure that the message is processed using the correct state 505 information. 507 Each SNMP engine maintains two values, snmpEngineBoots and 508 snmpEngineTime, which taken together provide an indication of 509 time at that SNMP engine. Both of these values are included in 510 an authenticated message sent to/received from that SNMP engine. 511 On receipt, the values are checked to ensure that the indicated 512 timeliness value is within a Time Window of the current time. 513 The Time Window represents an administrative upper bound on 514 acceptable delivery delay for protocol messages. 516 For an SNMP engine to generate a message which an authoritative 517 SNMP engine will accept as authentic, and to verify that a message 518 received from that authoritative SNMP engine is authentic, such an 519 SNMP engine must first achieve timeliness synchronization with the 520 authoritative SNMP engine. See section 2.3. 522 2. Elements of the Model 524 This section contains definitions required to realize the security 525 model defined by this memo. 527 2.1. User-based Security Model Users 529 Management operations using this Security Model make use of a 530 defined set of user identities. For any user on whose behalf 531 management operations are authorized at a particular SNMP engine, 532 that SNMP engine must have knowledge of that user. An SNMP engine 533 that wishes to communicate with another SNMP engine must also have 534 knowledge of a user known to that engine, including knowledge of 535 the applicable attributes of that user. 537 A user and its attributes are defined as follows: 539 userName 540 A string representing the name of the user. 542 securityName 543 A human-readable string representing the user in a format that 544 is Security Model independent. 546 authProtocol 547 An indication of whether messages sent on behalf of this user can 548 be authenticated, and if so, the type of authentication protocol 549 which is used. One such protocol is defined in this memo: the 550 Digest Authentication Protocol. 552 authKey 553 If messages sent on behalf of this user can be authenticated, 554 the (private) authentication key for use with the authentication 555 protocol. Note that a user's authentication key will normally 556 be different at different authoritative SNMP engines. 557 The authKey is not accessible via SNMP. 559 authKeyChange and authOwnKeyChange 560 The only way to remotely update the authentication key. Does 561 that in a secure manner, so that the update can be completed 562 without the need to employ privacy protection. 564 privProtocol 565 An indication of whether messages sent on behalf of this user 566 can be protected from disclosure, and if so, the type of privacy 567 protocol which is used. One such protocol is defined in this 568 memo: the DES-based Encryption Protocol. 570 privKey 571 If messages sent on behalf of this user can be en/decrypted, 572 the (private) privacy key for use with the privacy protocol. 574 Note that a user's privacy key will normally be different at 575 different authoritative SNMP engines. The privKey is not 576 accessible via SNMP. 578 privKeyChange and privOwnKeyChange 579 The only way to remotely update the encryption key. Does that 580 in a secure manner, so that the update can be completed without 581 the need to employ privacy protection. 583 2.2. Replay Protection 585 Each SNMP engine maintains three objects: 587 - snmpEngineID, which (at least within an administrative domain) 588 uniquely and unambiguously identifies an SNMP engine. 590 - snmpEngineBoots, which is a count of the number of times the 591 SNMP engine has re-booted/re-initialized since snmpEngineID 592 was last configured; and, 594 - snmpEngineTime, which is the number of seconds since the 595 snmpEngineBoots counter was last incremented. 597 Each SNMP engine is always authoritative with respect to these 598 objects in its own SNMP entity. It is the responsibility of a 599 non-authoritative SNMP engine to synchronize with the 600 authoritative SNMP engine, as appropriate. 602 An authoritative SNMP engine is required to maintain the values of 603 its snmpEngineID and snmpEngineBoots in non-volatile storage. 605 2.2.1. authEngineID 607 The authEngineID value contained in an authenticated message is 608 used to defeat attacks in which messages from one SNMP engine to 609 another SNMP engine are replayed to a different SNMP engine. 610 It represents the snmpEngineID at the authoritative SNMP engine 611 involved in the exchange of the message. 613 When an authoritative SNMP engine is first installed, it sets its 614 local value of snmpEngineID according to a enterprise-specific 615 algorithm (see the definition of the Textual Convention for 616 SnmpEngineID in the SNMP Architecture document [SNMP-ARCH]). 618 2.2.2. authEngineBoots and authEngineTime 620 The authEngineBoots and authEngineTime values contained in an 621 authenticated message are used to defeat attacks in which messages 622 are replayed when they are no longer valid. They represent the 623 snmpEngineBoots and snmpEngineTime values at the authoritative 624 SNMP engine involved in the exchange of the message. 626 Through use of snmpEngineBoots and snmpEngineTime, there is no 627 requirement for an SNMP engine to have a non-volatile clock which 628 ticks (i.e., increases with the passage of time) even when the 629 SNMP engine is powered off. Rather, each time an SNMP engine 630 re-boots, it retrieves, increments, and then stores snmpEngineBoots 631 in non-volatile storage, and resets snmpEngineTime to zero. 633 When an SNMP engine is first installed, it sets its local values 634 of snmpEngineBoots and snmpEngineTime to zero. If snmpEngineTime 635 ever reaches its maximum value (2147483647), then snmpEngineBoots 636 is incremented as if the SNMP engine has re-booted and 637 snmpEngineTime is reset to zero and starts incrementing again. 639 Each time an authoritative SNMP engine re-boots, any SNMP engines 640 holding that authoritative SNMP engine's values of snmpEngineBoots 641 and snmpEngineTime need to re-synchronize prior to sending 642 correctly authenticated messages to that authoritative SNMP engine 643 (see Section 2.3 for (re-)synchronization procedures). Note, 644 however, that the procedures do provide for a notification to be 645 accepted as authentic by a receiving SNMP engine, when sent by an 646 authoritative SNMP engine which has re-booted since the receiving 647 SNMP engine last (re-)synchronized. 649 If an authoritative SNMP engine is ever unable to determine its 650 latest snmpEngineBoots value, then it must set its snmpEngineBoots 651 value to 0xffffffff. 653 Whenever the local value of snmpEngineBoots has the value 654 0xffffffff, it latches at that value and an authenticated message 655 always causes an notInTimeWindow authentication failure. 657 In order to reset an SNMP engine whose snmpEngineBoots value has 658 reached the value 0xffffffff, manual intervention is required. 659 The engine must be physically visited and re-configured, either 660 with a new snmpEngineID value, or with new secret values for the 661 authentication and privacy protocols of all users known to that 662 SNMP engine. 664 2.2.3. Time Window 666 The Time Window is a value that specifies the window of time in 667 which a message generated on behalf of any user is valid. This 668 memo specifies that the same value of the Time Window, 150 seconds, 669 is used for all users. 671 2.3. Time Synchronization 673 Time synchronization, required by a non-authoritative SNMP engine 674 in order to proceed with authentic communications, has occurred 675 when the non-authoritative SNMP engine has obtained a local notion 676 of the authoritative SNMP engine's values of snmpEngineBoots and 677 snmpEngineTime from the authoritative SNMP engine. These values 678 must be (and remain) within the authoritative SNMP engine's Time 679 Window. So the local notion of the authoritative SNMP engine's 680 values must be kept loosely synchronized with the values stored 681 at the authoritative SNMP engine. In addition to keeping a local 682 copy of snmpEngineBoots and snmpEngineTime from the authoritative 683 SNMP engine, a non-authoritative SNMP engine must also keep one 684 local variable, latestReceivedEngineTime. This value records the 685 highest value of snmpEngineTime that was received by the 686 non-authoritative SNMP engine from the authoritative SNMP engine 687 and is used to eliminate the possibility of replaying messages 688 that would prevent the non-authoritative SNMP engine's notion of 689 the snmpEngineTime from advancing. 691 A non-authoritative SNMP engine must keep local notions of these 692 values for each authoritative SNMP engine with which it wishes to 693 communicate. Since each authoritative SNMP engine is uniquely 694 and unambiguously identified by its value of snmpEngineID, the 695 non-authoritative SNMP engine may use this value as a key in 696 order to cache its local notions of these values. 698 Time synchronization occurs as part of the procedures of receiving 699 an SNMP message (Section 3.2, step 7b). As such, no explicit time 700 synchronization procedure is required by a non-authoritative SNMP 701 engine. Note, that whenever the local value of snmpEngineID is 702 changed (e.g., through discovery) or when secure communications 703 are first established with an authoritative SNMP engine, the local 704 values of snmpEngineBoots and latestReceivedEngineTime should be 705 set to zero. This will cause the time synchronization to occur 706 when the next authentic message is received. 708 2.4. SNMP Messages Using this Security Model 710 The syntax of an SNMP message using this Security Model adheres 711 to the message format defined in the version-specific Message 712 Processing Model document (for example [SNMP-MP]). 713 The securityParameters in the message are defined as an 714 OCTET STRING. The format of that OCTET STRING for the User-based 715 Security Model is as follows: 717 securityParameters ::= 718 SEQUENCE { 719 -- global User-based security parameters 720 authEngineID 721 OCTET STRING (SIZE(12)), 722 authEngineBoots 723 Unsigned32 (0..4294967295), 724 authEngineTime 725 Unsigned32 (0..2147483647), 726 userName 727 OCTET STRING (SIZE(1..16)), 728 -- authentication protocol specific parameters 729 authParameters 730 OCTET STRING, 731 -- privacy protocol specific parameters 732 privParameters 733 OCTET STRING, 734 } 735 END 737 The authEngineID is the snmpEngineID of the authoritative SNMP 738 engine involved in the exchange of the message. 740 The authEngineBoots is the snmpEngineBoots value at the 741 authoritative SNMP engine involved in the exchange of the message. 743 The authEngineTime is the snmpEngineTime value at the 744 authoritative SNMP engine involved in the exchange of the message. 746 The authParameters are defined by the authentication protocol in 747 use for the message (as defined by the authProtocol column in 748 the user's entry in the usmUserTable). 750 The privParameters are defined by the privacy protocol in 751 use for the message (as defined by the privProtocol column in 752 the user's entry in the usmUserTable). 754 See appendix A.4 for en example of the encoding. 756 2.5. Services provided by the User-based Security Model 758 This section describes the services provided by the User-based 759 Security Model with their inputs and outputs. 761 The services are described as primitives of an abstract service 762 interface and the inputs and outputs are described as abstract 763 data elements as they are passed in these abstract service 764 interface primitives. 766 2.5.1. Services for Generating an Outgoing SNMP Message 768 When the Message Processing (MP) Subsystem invokes the User-based 769 Security module to secure an outgoing SNMP message, it must use 770 the appropriate service as provided by the Security module. These 771 two services are provided: 773 1) A service to generate a Request message. 775 2) A service to generate a Response message. 777 Upon completion of the process, the User-based Security module 778 returns statusInformation and, if the process was successful, 779 the completed message with privacy and authentication applied 780 if such was requested by the specified Level of Security (LoS). 782 The abstract service interface primitives are: 784 generateRequestMsg( 785 messageProcessingModel -- typically, SNMP version 786 msgID -- for the outgoing message 787 mms -- of the sending SNMP entity 788 msgFlags -- for the outgoing message 789 securityParameters -- filled in by Security Module 790 securityModel -- for the outgoing message 791 securityName -- on behalf of this principal 792 LoS -- Level of Security requested 793 snmpEngineID -- authoritative SNMP entity 794 scopedPDU -- message (plaintext) payload 795 ) 797 generateResponseMsg( 798 messageProcessingModel -- typically, SNMP version 799 msgID -- for the outgoing message 800 mms -- of the sending SNMP entity 801 msgFlags -- for the outgoing message 802 securityParameters -- filled in by Security Module 803 securityModel -- for the outgoing message 804 scopedPDU -- message (plaintext) payload 805 securityStateReference -- reference to security state 806 -- information, as received in 807 ) -- processPdu primitive 809 returnGeneratedMsg( 810 wholeMsg -- complete generated message 811 wholeMsgLength -- length of the generated message 812 statusInformation -- errorIndication or success 813 ) 815 Where: 817 messageProcessingModel 818 The SNMP version number for the message to be generated. 819 This data is not used by the User-based Security module. 820 It is part of the globalData of the message. 821 msgID 822 The msgID for the message to be generated. 823 This data is not used by the User-based Security module. 824 It is part of the globalData of the message. 825 mms 826 The maximum message size to be included as mms in the message. 827 This data is not used by the User-based Security module. 828 It is part of the globalData of the message. 829 msgFlags 830 The msgFlags to be included in the message. 831 This data is not used by the User-based Security module. 832 It is part of the globalData of the message. 833 It should be consistent with the LoS that is passed. 834 securityParameters 835 These are the security parameters. They will be filled in 836 by the User-based Security module. 837 securityModel 838 The securityModel in use. 839 Should be the User-based Security Model. 840 This data is not used by the User-based Security module. 841 It is part of the globalData of the message. 842 securityName 843 Together with the snmpEngineID it identifies a row in the 844 usmUserTable that is to be used for securing the message. 845 The securityName has a format that is independent of the 846 Security Model. 847 LoS 848 The Level of Security (LoS) from which the User-based Security 849 module determines if the message needs to be protected from 850 disclosure and if the message needs to be authenticated. 851 snmpEngineID 852 The snmpEngineID of the authoritative SNMP engine to which the 853 Request message is to be sent or from which the Response 854 message originates. In case of a response the snmpEngineID 855 is implied to be the processing SNMP engine's snmpEngineID. 856 scopedPDU 857 The message payload. The data is opaque as far as the 858 User-based Security Model is concerned. 859 securityStateReference 860 A handle/reference to cached security data to be used when 861 securing an outgoing Response message. This is the exact same 862 handle/reference as it was generated by the User-based Security 863 module when processing the incoming Request message to which 864 this is the Response message. 866 wholeMsg 867 The fully encoded and secured message ready for sending on 868 the wire. 869 wholeMsgLength 870 The length of the encoded and secured message (wholeMsg). 871 statusInformation 872 An indication of whether the encoding and securing of the 873 message was successful. If not it is an indication of the 874 problem. 876 2.5.2. Services for Processing an Incoming SNMP Message 878 When the Message Processing (MP) Subsystem invokes the User-based 879 Security module to verify proper security of an incoming message, 880 it must use the service provided for an incoming message. 882 Upon completion of the process, the User-based Security module 883 returns statusInformation and, if the process was successful, 884 the additional data elements for further processing of the message. 886 The abstract service interface primitives are: 888 processMsg( 889 messageProcessingModel -- typically, SNMP version 890 msgID -- of the received message 891 mms -- of the sending SNMP entity 892 msgFlags -- for the received message 893 securityParameters -- for the received message 894 securityModel -- for the received message 895 LoS -- Level of Security 896 wholeMsg -- as received on the wire 897 wholeMsgLength -- length as received on the wire 898 ) 900 returnProcessedMsg( 901 securityName -- identification of the principal 902 scopedPDU, -- message (plaintext) payload 903 maxSizeResponseScopedPDU -- maximum size of the Response PDU 904 securityStateReference -- reference to security state 905 -- information, needed for response 906 statusInformation -- errorIndication or success 907 ) -- error counter OID/value if error 909 Where: 911 messageProcessingModel 912 The SNMP version number as received in the message. 913 This data is not used by the User-based Security module. 914 It is part of the globalData of the message. 915 msgID 916 The msgID as received in the message. 917 This data is not used by the User-based Security module. 918 It is part of the globalData of the message. 919 mms 920 The maximum message size as received in the message. 921 It is part of the globalData of the message. 922 The USM module uses this information to calculate the 923 maxSizeResponseScopedPDU that it returns upon completion. 924 msgFlags 925 The msgFlags as received in the message. 926 This data is not used by the User-based Security module. 927 It is part of the globalData of the message. 928 It should be consistent with the LoS that is passed. 929 securityParameters 930 These are the security parameters as received in the message. 931 securityModel 932 The securityModel in use. 933 Should be the User-based Security Model. 934 This data is not used by the User-based Security module. 935 It is part of the globalData of the message. 936 LoS 937 The Level of Security (LoS) from which the User-based Security 938 module determines if the message needs to be protected from 939 disclosure and if the message needs to be authenticated. 940 wholeMsg 941 The whole message as it was received. 942 wholeMsgLength 943 The length of the message as it was received (wholeMsg). 945 securityName 946 The security name representing the user on whose behalf the 947 message was received. The securityName has a format that is 948 independent of the Security Model. 949 scopedPDU 950 The message payload. The data is opaque as far as the 951 User-based Security Model is concerned. 952 maxSizeResponseScopedPDU 953 The maximum size of a scopedPDU to be included in a possible 954 Response message. The User-base Security module calculates 955 this size based on the mms (as received in the message) and 956 the space required for the message header (including the 957 securityParameters) for such a Response message. 958 securityStateReference 959 A handle/reference to cached security data to be used when 960 securing an outgoing Response message. When the Message 961 Processing Subsystem calls the User-based Security module to 962 generate a response to this incoming message it must pass this 963 handle/reference. 964 statusInformation 965 An indication of whether the process was successful or not. 966 If not, then the statusInformation includes the OID and the 967 value of the error counter that was incremented. 969 3. Elements of Procedure 971 This section describes the security related procedures followed by 972 an SNMP engine when processing SNMP messages according to the 973 User-based Security Model. 975 3.1. Generating an Outgoing SNMP Message 977 This section describes the procedure followed by an SNMP engine 978 whenever it generates a message containing a management operation 979 (like a request, a response, a notification, or a report) on 980 behalf of a user, with a particular Level of Security (LoS). 982 1) a) If any securityStateReference is passed (Response message), 983 then information concerning the user is extracted from the 984 cachedSecurityData. The snmpEngineID and the Level of 985 Security (LoS) are extracted from the cachedSecurityData. 986 The cachedSecurityData can now be discarded. 988 Otherwise, 990 b) based on the securityName, information concerning the 991 user at the destination snmpEngineID is extracted from 992 the Local Configuration Datastore (LCD, usmUserTable). 993 If information about the user is absent from the LCD, 994 then an error indication (unknownSecurityName) is 995 returned to the calling module. 997 2) If the Level of Security (LoS) specifies that the message 998 is to be protected from disclosure, but the user does not 999 support both an authentication and a privacy protocol then 1000 the message cannot be sent. An error indication 1001 (unsupportedLoS) is returned to the calling module. 1003 3) If the Level of Security (LoS) specifies that the message 1004 is to be authenticated, but the user does not support an 1005 authentication protocol, then the message cannot be sent. 1006 An error indication (unsupportedLoS) is returned to the 1007 calling module. 1009 4) a) If the Level of Security (LoS) specifies that the 1010 message is to be protected from disclosure, then the 1011 octet sequence representing the serialized scopedPDU 1012 is encrypted according to the user's privacy protocol. 1013 To do so a call is made to the privacy module that 1014 implements the user's privacy protocol according to 1015 the abstract service interface primitive: 1017 encryptData( 1018 cryptKey -- user's privKey 1019 dataToEncrypt) -- serialized scopedPDU 1021 The user's private privKey is the secret key that can 1022 be used by the encryption algorithm. The serialized 1023 scopedPDU is the data that must be encrypted. 1025 Upon completion the privacy module returns the result 1026 according to the abstract service interface primitive: 1028 returnEncryptedData( 1029 encryptedData -- serialized encryptedPDU 1030 privParameters -- serialized privParameters 1031 statusInformation) -- success or failure 1033 The encryptedPDU represents the encrypted scopedPDU, 1034 encoded as an OCTET STRING. 1035 The privParameters represents the privacy parameters, 1036 encoded as an OCTET STRING. 1037 The statusInformation indicates if the scopedPDU was 1038 encrypted successfully or not. 1040 If the privacy module returns failure, then the message 1041 cannot be sent and an error indication (encryptionFailure) 1042 is returned to the calling module. 1044 If the privacy module returns success, then the 1045 privParameters field is put into the securityParameters 1046 and the encryptedPDU serves as the payload of the message 1047 being prepared. 1049 Otherwise, 1051 b) If the Level of Security (LoS) specifies that the message 1052 is not to be protected from disclosure, then the NULL 1053 string is encoded as an OCTET STRING and put into the 1054 privParameters field of the securityParameters and the 1055 plaintext scopedPDU serves as the payload of the message 1056 being prepared. 1058 5) The snmpEngineID is encoded as an OCTET STRING into the 1059 authEngineID field of the securityParameters. 1061 6) a) If the Level of Security (LoS) specifies that the message 1062 is to be authenticated, then the current values of 1063 snmpEngineBoots and snmpEngineTime corresponding to the 1064 snmpEngineID from the LCD are used. 1066 Otherwise, 1068 b) If this is a Response message, then the current value of 1069 snmpEngineBoots and snmpEngineTime corresponding to the 1070 local snmpEngineID from the LCD are used. 1072 Otherwise, 1074 c) If this is a Request message, then a zero value is used 1075 for both snmpEngineBoots and snmpEngineTime. 1077 The values are encoded as Unsigned32 into the authEngineBoots 1078 and authEngineTime fields of the securityParameters. 1080 7) The userName is encoded as an OCTET STRING into the userName 1081 field of the securityParameters. 1083 8) a) If the Level of Security (LoS) specifies that the message 1084 is to be authenticated, the message is authenticated 1085 according to the user's authentication protocol. 1086 To do so a call is made to the authentication module that 1087 implements the user's authentication protocol according to 1088 the abstract service interface primitive: 1090 authenticateOutgoingMsg( 1091 authKey -- the user's authKey 1092 wholeMsg) -- the complete serialized message 1094 The user's private authKey is the secret key that can 1095 be used by the authentication algorithm. 1096 The wholeMsg is the complete serialized message that 1097 must be authenticated. 1099 Upon completion the authentication module returns the result 1100 according to the abstract service interface primitive: 1102 returnAuthenticatedOutgoingMsg( 1103 wholeMsg -- secured serialized message 1104 statusInformation) -- success or failure 1106 The wholeMsg is the same as the input given to the 1107 authenticateOutgoingMsg service, but with authParameters 1108 properly filled in. 1109 The statusInformation indicates if the message was 1110 successfully processed by the authentication module or not. 1112 If the authentication module returns failure, then the 1113 message cannot be sent and an error indication 1114 (authenticationFailure) is returned to the calling module. 1116 If the authentication module returns success, then the 1117 authParameters field is put into the securityParameters 1118 and the wholeMsg represents the serialization of the 1119 authenticated message being prepared. 1121 Otherwise, 1123 b) If the Level of Security (LoS) specifies that the message 1124 is not to be authenticated then the NULL string is encoded 1125 as an OCTET STRING into the authParameters field of the 1126 securityParameters. The wholeMsg is now serialized and 1127 then represents the unauthenticated message being prepared. 1129 9) The completed message with its length is returned to the 1130 calling module with the statusInformation set to success. 1131 This is done according to the following abstract service 1132 interface primitive: 1134 returnGeneratedMsg( 1135 wholeMsg -- LoS secured serialized message 1136 wholeMsgLength -- length of message 1137 statusInformation) -- success 1139 3.2. Processing an Incoming SNMP Message 1141 This section describes the procedure followed by an SNMP engine 1142 whenever it receives a message containing a management operation 1143 on behalf of a user, with a particular Level of Security (LoS). 1145 1) If the received securityParameters is not the serialization 1146 (according to the conventions of [RFC1906]) of an OCTET STRING 1147 formatted according to the securityParameters defined in 1148 section 2.4, then the snmpInASNParseErrs counter [RFC1907] is 1149 incremented, and an error indication (parseError) together 1150 with the OID and value of the incremented counter is returned 1151 to the calling module. 1153 2) The values of the security parameter fields are extracted from 1154 the securityParameters. 1156 3) If the value of the authEngineID contained in the 1157 securityParameters is unknown then: 1159 a) a manager that performs discovery may optionally create a 1160 new entry in its Local Configuration Datastore (LCD) 1161 and continue processing; 1163 or 1165 b) the usmStatsUnknownEngineIDs counter is incremented, and 1166 an error indication (unknownEngineID) together with the 1167 OID and value of the incremented counter is returned to 1168 the calling module. 1170 4) Information about the value of the userName and authEngineID 1171 fields is extracted from the Local Configuration Datastore 1172 (LCD, usmUserTable). If no information is available for 1173 the user, then the usmStatsUnknownUserNames counter is 1174 incremented and an error indication (unknownSecurityName) 1175 together with the OID and value of the incremented counter 1176 is returned to the calling module. 1178 5) If the information about the user indicates that it does not 1179 support the Level of Security indicated by the LoS parameter, 1180 then the usmStatsUnsupportedLoS counter is incremented and 1181 an error indication (unsupportedLoS) together with the OID 1182 and value of the incremented counter is returned to the 1183 calling module. 1185 6) If the Level of Security (LoS) specifies that the message 1186 is to be authenticated, then the message is authenticated 1187 according to the user's authentication protocol. 1188 To do so a call is made to the authentication module that 1189 implements the user's authentication protocol according to 1190 the abstract service interface primitive: 1192 authenticateIncomingMsg( 1193 authKey -- the user's authKey 1194 authParameters -- as received on the wire 1195 wholeMsg) -- as received on the wire 1197 The user's private authKey is the secret key that can 1198 be used by the authentication algorithm. 1199 The authParameters and the wholeMsg are passed as received 1200 on the wire. 1202 Upon completion the authentication module returns the result 1203 according to the abstract service interface primitive: 1205 returnAuthenticatedIncomingMsg( 1206 wholeMsg -- authenticated serialized message 1207 statusInformation) -- success or failure 1209 The wholeMsg is the same as the input given to the 1210 authenticateIncomingMsg service. 1211 The statusInformation indicates if the message was successfully 1212 authenticated by the authentication module or not. 1214 If the authentication module returns failure, then the message 1215 cannot trusted, so the usmStatsWrongDigests counter is 1216 incremented and an error indication (authenticationFailure) 1217 together with the OID and value of the incremented counter is 1218 returned to the calling module. 1220 If the authentication module returns success, then the message 1221 is authentic and can be trusted so processing continues. 1223 7) If the Level of Security (LoS) indicates an authenticated 1224 message, then the local values of snmpEngineBoots and 1225 snmpEngineTime corresponding to the value of the authEngineID 1226 field are extracted from the Local Configuration Datastore. 1228 a) If the extracted value of authEngineID is the same as 1229 the value of SnmpEngineID of the processing SNMP engine 1230 (meaning this is the authoritative SNMP engine), then 1231 if any of the following conditions is true, then the 1232 message is considered to be outside of the Time Window: 1234 - the local value of snmpEngineBoots is 0xffffffff; 1236 - the value of the authEngineBoots field differs from 1237 the local value of snmpEngineBoots; or, 1239 - the value of the authEngineTime field differs from 1240 the local notion of snmpEngineTime by more than 1241 +/- 150 seconds. 1243 If the message is considered to be outside of the Time 1244 Window then the usmStatsNotInTimeWindows counter is 1245 incremented and an error indication (notInTimeWindow) 1246 together with the OID and value of the incremented counter 1247 is returned to the calling module. 1249 b) If the extracted value of authEngineID is not the same as 1250 the value snmpEngineID of the processing SNMP engine 1251 (meaning this is not the authoritative SNMP engine), then: 1253 1) if at least one of the following conditions is true: 1255 - the extracted value of the authEngineBoots field is 1256 greater than the local notion of the value of 1257 snmpEngineBoots; or, 1259 - the extracted value of the authEngineBoots field is 1260 equal to the local notion of the value of 1261 snmpEngineBoots and the extracted value of 1262 authEngineTime field is greater than the value of 1263 latestReceivedEngineTime, 1265 then the LCD entry corresponding to the extracted value 1266 of the authEngineID field is updated, by setting: 1268 - the local notion of the value of snmpEngineBoots 1269 to the value of the authEngineBoots field, 1270 - the local notion of the value of snmpEngineTime 1271 to the value of the authEngineTime field, and 1272 - the latestReceivedEngineTime to the value of the 1273 authEngineTime field. 1275 2) if any of the following conditions is true, then the 1276 message is considered to be outside of the Time Window: 1278 - the local notion of the value of snmpEngineBoots is 1279 0xffffffff; 1281 - the value of the authEngineBoots field is less than 1282 the local notion of the value of snmpEngineBoots; or, 1284 - the value of the authEngineBoots field is equal to 1285 the local notion of the value of snmpEngineBoots 1286 and the value of the authEngineTime field is more 1287 than 150 seconds less than the local notion of 1288 of the value of snmpEngineTime. 1290 If the message is considered to be outside of the Time 1291 Window then an error indication (notInTimeWindow) is 1292 returned to the calling module; 1294 Note that this means that a too old (possibly replayed) 1295 message has been detected and is deemed unauthentic. 1297 Note that this procedure allows for the value of 1298 authEngineBoots in the message to be greater than the 1299 local notion of the value of snmpEngineBoots to allow 1300 for received messages to be accepted as authentic when 1301 received from an authoritative SNMP engine that has 1302 re-booted since the receiving SNMP engine last 1303 (re-)synchronized. 1305 8) a) If the Level of Security (LoS) indicates that the message 1306 was protected from disclosure, then the OCTET STRING 1307 representing the encryptedPDU is decrypted according to 1308 the user's privacy protocol to obtain an unencrypted 1309 serialized scopedPDU value. 1310 To do so a call is made to the privacy module that 1311 implements the user's privacy protocol according to 1312 the abstract service interface primitive: 1314 decryptData( 1315 decryptKey -- user's privKey 1316 privParameters -- as received on the wire 1317 encryptedData) -- encryptedPDU received on wire 1319 The user's private privKey is the secret key that can 1320 be used by the decryption algorithm. The serialized 1321 encryptedPDU is the data that must be decrypted. 1323 Upon completion the privacy module returns the result 1324 according to the abstract service interface primitive: 1326 returnDecryptedData( 1327 decryptedData -- serialized decrypted scopedPDU 1328 statusInformation) -- success or failure 1330 The statusInformation indicates if the scopedPDU was 1331 decrypted successfully or not. 1333 If the privacy module returns failure, then the message can 1334 not be processed, so the usmStatsDecryptionErrors counter 1335 is incremented and an error indication (encryptionFailure) 1336 together with the OID and value of the incremented counter 1337 is returned to the calling module. 1339 If the privacy module returns success, then the decrypted 1340 scopedPDU is the message payload to be returned to the 1341 calling module. 1343 Otherwise, 1345 b) The scopedPDU component is assumed to be in plain text 1346 and is the message payload to be returned to the calling 1347 module. 1349 9) The maxSizeResponseScopedPDU is calculated. This is the 1350 maximum size allowed for a scopedPDU for a possible Response 1351 message. Provision is made for a message header that allows 1352 the same Level of Security as the received Request. 1354 10) The securityName for the user is retrieved from the 1355 usmUserTable. 1357 11) The security data is cached as cachedSecurityData, so that a 1358 possible response to this message can and will use the same 1359 authentication and privacy secrets, the same Level of Security 1360 and the same authEngineID. Information to be saved/cached is 1361 as follows: 1363 usmUserName, LoS 1364 usmUserAuthProtocol, usmUserAuthKey 1365 usmUserPrivProtocol, usmUserPrivKey 1366 authEngineID 1368 12) The statusInformation is set to success and a return is made 1369 to the calling module according to this abstract service interface primitive: 1371 returnProcessedMsg( 1372 securityName -- identification of the principal 1373 scopedPDU, -- message (plaintext) payload 1374 maxSizeResponseScopedPDU -- maximum size of the Response PDU 1375 securityStateReference -- reference to security state 1376 -- information, needed for response 1377 statusInformation -- errorIndication or success 1378 ) -- error counter OID/value if error 1380 4. Discovery 1382 The User-based Security Model requires that a discovery process 1383 obtains sufficient information about other SNMP engines in order 1384 to communicate with them. Discovery requires an non-authoritative 1385 SNMP engine to learn the authoritative SNMP engine's snmpEngineID 1386 value before communication may proceed. This may be accomplished 1387 by generating a Request message with a Level of Security (LoS) of 1388 noAuthNoPriv, a userName of "initial", an authEngineID value of 1389 zero length or all zeroes (binary), and the varBindList left empty. 1390 The response to this message will be a Report message containing 1391 the snmpEngineID of the authoritative SNMP engine as the value of 1392 the authEngineID field within the securityParameters field. It 1393 also contains a Report PDU with the usmStatsUnknownEngineIDs 1394 counter in the varBindList. 1396 If authenticated communication is required, then the discovery 1397 process should also establish time synchronization with the 1398 authoritative SNMP engine. This may be accomplished by sending an 1399 authenticated Request message with the value of authEngineID set 1400 to the newly learned snmpEngineID and with the values of 1401 authEngineBoots and authEngineTime set to zero. 1402 The response to this authenticated message will be a Report message 1403 containing the up to date values of the authoritative SNMP engine's 1404 snmpEngineBoots and snmpEngineTime as the value of the 1405 authEngineBoots and authEngineTime fields respectively. It also 1406 contains the usmStatsNotInTimeWindows counter in the varBindList 1407 of the Report PDU. The time synchronization then happens 1408 automatically as part of the procedures in section 3.2 step 7b. 1409 See also section 2.3. 1411 5. Definitions 1413 SNMP-USER-BASED-SM-MIB DEFINITIONS ::= BEGIN 1415 IMPORTS 1416 MODULE-IDENTITY, OBJECT-TYPE, 1417 OBJECT-IDENTITY, 1418 snmpModules, Counter32 FROM SNMPv2-SMI 1419 TEXTUAL-CONVENTION, TestAndIncr, 1420 RowStatus, RowPointer, 1421 StorageType, AutonomousType FROM SNMPv2-TC 1422 MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF 1423 SnmpAdminString, SnmpLoS, 1424 SnmpEngineID, SnmpSecurityModel, 1425 snmpAuthProtocols, snmpPrivProtocols FROM SNMP-FRAMEWORK-MIB; 1427 snmpUsmMIB MODULE-IDENTITY 1428 LAST-UPDATED "9707140000Z" -- 14 July 1997, midnight 1429 ORGANIZATION "SNMPv3 Working Group" 1430 CONTACT-INFO "WG-email: snmpv3@tis.com 1431 Subscribe: majordomo@tis.com 1432 In msg body: subscribe snmpv3 1434 Chair: Russ Mundy 1435 Trusted Information Systems 1436 postal: 3060 Washington Rd 1437 Glenwood MD 21738 1438 USA 1439 email: mundy@tis.com 1440 phone: +1-301-854-6889 1442 Co-editor Uri Blumenthal 1443 IBM T. J. Watson Research 1444 postal: 30 Saw Mill River Pkwy, 1445 Hawthorne, NY 10532 1446 USA 1447 email: uri@watson.ibm.com 1448 phone: +1-914-784-7964 1450 Co-editor: Bert Wijnen 1451 IBM T. J. Watson Research 1452 postal: Schagen 33 1453 3461 GL Linschoten 1454 Netherlands 1455 email: wijnen@vnet.ibm.com 1456 phone: +31-348-432-794 1457 " 1459 DESCRIPTION "The management information definitions for the 1460 SNMP User-based Security Model. 1461 " 1463 ::= { snmpModules 9 } -- to be verified with IANA 1465 -- Administrative assignments **************************************** 1467 usmAdmin OBJECT IDENTIFIER ::= { snmpUsmMIB 1 } 1468 usmMIBObjects OBJECT IDENTIFIER ::= { snmpUsmMIB 2 } 1469 usmMIBConformance OBJECT IDENTIFIER ::= { snmpUsmMIB 3 } 1471 -- Identification of Authentication and Privacy Protocols ************ 1473 usmNoAuthProtocol OBJECT-IDENTITY 1474 STATUS current 1475 DESCRIPTION "No Authentication Protocol." 1476 ::= { snmpAuthProtocols 1 } 1478 usmMD5AuthProtocol OBJECT-IDENTITY 1479 STATUS current 1480 DESCRIPTION "The Keyed MD5 Digest Authentication Protocol." 1481 REFERENCE "Rivest, R., Message Digest Algorithm MD5, RFC1321." 1482 ::= { snmpAuthProtocols 2 } 1484 usmNoPrivProtocol OBJECT-IDENTITY 1485 STATUS current 1486 DESCRIPTION "No Privacy Protocol." 1487 ::= { snmpPrivProtocols 1 } 1489 usmDESPrivProtocol OBJECT-IDENTITY 1490 STATUS current 1491 DESCRIPTION "The CBC-DES Symmetric Encryption Protocol." 1492 REFERENCE "- Data Encryption Standard, National Institute of 1493 Standards and Technology. Federal Information 1494 Processing Standard (FIPS) Publication 46-1. 1495 Supersedes FIPS Publication 46, 1496 (January, 1977; reaffirmed January, 1988). 1498 - Data Encryption Algorithm, American National 1499 Standards Institute. ANSI X3.92-1981, 1500 (December, 1980). 1502 - DES Modes of Operation, National Institute of 1503 Standards and Technology. Federal Information 1504 Processing Standard (FIPS) Publication 81, 1505 (December, 1980). 1507 - Data Encryption Algorithm - Modes of Operation, 1508 American National Standards Institute. 1509 ANSI X3.106-1983, (May 1983). 1510 " 1511 ::= { snmpPrivProtocols 2 } 1513 -- Textual Conventions *********************************************** 1514 -- Editor's note: 1515 -- If in the future the MD5 gets replaced by another Authentication 1516 -- algorithm, then it seems we also need to use that new algorithm to 1517 -- calculate the digest during KeyChange. So this TC has been changed 1518 -- End Editor's note 1520 KeyChange ::= TEXTUAL-CONVENTION 1521 STATUS current 1522 DESCRIPTION 1523 "Every definition of an object with this syntax must identify 1524 a protocol, P, a secret key, K, and a hash algorithm, H. 1525 The object's value is a manager-generated, partially-random 1526 value which, when modified, causes the value of the secret 1527 key, K, to be modified via a one-way function. 1529 The value of an instance of this object is the concatenation 1530 of two components: a 'random' component and a 'delta' 1531 component. The lengths of the random and delta components 1532 are given by the corresponding value of the protocol, P; 1533 if P requires K to be a fixed length, the length of both the 1534 random and delta components is that fixed length; if P 1535 allows the length of K to be variable up to a particular 1536 maximum length, the length of the random component is that 1537 maximum length and the length of the delta component is any 1538 length less than or equal to that maximum length. 1539 For example, usmMD5AuthProtocol requires K to be a fixed 1540 length of 16 octets. Other protocols may define other 1541 sizes, as deemed appropriate. 1543 When an instance of this object is modified to have a new 1544 value by the management protocol, the agent generates a new 1545 value of K as follows: 1547 - a temporary variable is initialized to the existing value 1548 of K; 1549 - if the length of the delta component is greater than 16 1550 bytes, then: 1551 - the random component is appended to the value of the 1552 temporary variable, and the result is input to the 1553 the hash algorithm H to produce a digest value, and 1554 the temporary variable is set to this digest value; 1555 - the value of the temporary variable is XOR-ed with 1556 the first (next) 16-bytes of the delta component to 1557 produce the first (next) 16-bytes of the new value 1558 of K. 1559 - the above two steps are repeated until the unused 1560 portion of the delta component is 16 bytes or less, 1561 - the random component is appended to the value of the 1562 temporary variable, and the result is input to the 1563 hash algorithm H to produce a digest value; 1565 - this digest value, truncated if necessary to be the same 1566 length as the unused portion of the delta component, is 1567 XOR-ed with the unused portion of the delta component to 1568 produce the (final portion of the) new value of K. 1570 for example, using MD5 as the hash algorithm H: 1572 iterations = (lenOfDelta - 1)/16; /* integer division */ 1573 temp = keyOld; 1574 for (i = 0; i < iterations; i++) { 1575 temp = MD5 (temp || random); 1576 keyNew[i*16 .. (i*16)+15] = 1577 temp XOR delta[i*16 .. (i*16)+15]; 1578 } 1579 temp = MD5 (temp || random); 1580 keyNew[i*16 .. lenOfDelta-1] = 1581 temp XOR delta[i*16 .. lenOfDelta-1]; 1583 The value of an object with this syntax, whenever it is 1584 retrieved by the management protocol, is always the zero 1585 length string. 1586 " 1587 SYNTAX OCTET STRING 1589 -- Statistics for the User-based Security Model ********************** 1591 usmStats OBJECT IDENTIFIER ::= { usmMIBObjects 1 } 1593 usmStatsUnsupportedLoS OBJECT-TYPE 1594 SYNTAX Counter32 1595 MAX-ACCESS read-only 1596 STATUS current 1597 DESCRIPTION "The total number of packets received by the SNMP 1598 engine which were dropped because they requested 1599 a Level of Security (LoS) that was unknown to the 1600 SNMP engine or otherwise unavailable. 1601 " 1602 ::= { usmStats 1 } 1604 usmStatsNotInTimeWindows OBJECT-TYPE 1605 SYNTAX Counter32 1606 MAX-ACCESS read-only 1607 STATUS current 1608 DESCRIPTION "The total number of packets received by the SNMP 1609 engine which were dropped because they appeared 1610 outside of the authoritative SNMP engine's window. 1611 " 1612 ::= { usmStats 2 } 1614 usmStatsUnknownUserNames OBJECT-TYPE 1615 SYNTAX Counter32 1616 MAX-ACCESS read-only 1617 STATUS current 1618 DESCRIPTION "The total number of packets received by the SNMP 1619 engine which were dropped because they referenced a 1620 user that was not known to the SNMP engine. 1621 " 1622 ::= { usmStats 3 } 1624 usmStatsUnknownEngineIDs OBJECT-TYPE 1625 SYNTAX Counter32 1626 MAX-ACCESS read-only 1627 STATUS current 1628 DESCRIPTION "The total number of packets received by the SNMP 1629 engine which were dropped because they referenced an 1630 snmpEngineID that was not known to the SNMP engine. 1631 " 1632 ::= { usmStats 4 } 1634 usmStatsWrongDigests OBJECT-TYPE 1635 SYNTAX Counter32 1636 MAX-ACCESS read-only 1637 STATUS current 1638 DESCRIPTION "The total number of packets received by the SNMP 1639 engine which were dropped because they didn't 1640 contain the expected digest value. 1641 " 1642 ::= { usmStats 5 } 1644 usmStatsDecryptionErrors OBJECT-TYPE 1645 SYNTAX Counter32 1646 MAX-ACCESS read-only 1647 STATUS current 1648 DESCRIPTION "The total number of packets received by the SNMP 1649 engine which were dropped because they could not be 1650 decrypted. 1651 " 1652 ::= { usmStats 6 } 1654 -- The usmUser Group ************************************************ 1656 usmUser OBJECT IDENTIFIER ::= { usmMIBObjects 2 } 1658 usmUserSpinLock OBJECT-TYPE 1659 SYNTAX TestAndIncr 1660 MAX-ACCESS read-write 1661 STATUS current 1662 DESCRIPTION "An advisory lock used to allow several cooperating 1663 Command Generator Applications to coordinate their 1664 use of facilities to alter secrets in the 1665 usmUserTable. 1666 " 1668 ::= { usmUser 1 } 1670 -- The table of valid users for the User-based Security Model ******** 1672 usmUserTable OBJECT-TYPE 1673 SYNTAX SEQUENCE OF UsmUserEntry 1674 MAX-ACCESS not-accessible 1675 STATUS current 1676 DESCRIPTION "The table of users configured in the SNMP engine's 1677 Local Configuration Datastore (LCD)." 1678 ::= { usmUser 2 } 1680 usmUserEntry OBJECT-TYPE 1681 SYNTAX UsmUserEntry 1682 MAX-ACCESS not-accessible 1683 STATUS current 1684 DESCRIPTION "A user configured in the SNMP engine's Local 1685 Configuration Datastore (LCD) for the User-based 1686 Security Model. 1687 " 1688 INDEX { usmUserEngineID, 1689 usmUserName 1690 } 1691 ::= { usmUserTable 1 } 1693 UsmUserEntry ::= SEQUENCE 1694 { 1695 usmUserEngineID SnmpEngineID, 1696 usmUserName SnmpAdminString, 1697 usmUserSecurityName SnmpAdminString, 1698 usmUserCloneFrom RowPointer, 1699 usmUserAuthProtocol AutonomousType, 1700 usmUserAuthKeyChange KeyChange, 1701 usmUserOwnAuthKeyChange KeyChange, 1702 usmUserPrivProtocol AutonomousType, 1703 usmUserPrivKeyChange KeyChange, 1704 usmUserOwnPrivKeyChange KeyChange, 1705 usmUserPublic OCTET STRING, 1706 usmUserStorageType StorageType, 1707 usmUserStatus RowStatus 1708 } 1710 usmUserEngineID OBJECT-TYPE 1711 SYNTAX SnmpEngineID 1712 MAX-ACCESS not-accessible 1713 STATUS current 1714 DESCRIPTION "An SNMP engine's administratively-unique identifier. 1716 In a simple agent, this value is always that agent's 1717 own snmpEngineID value. 1719 The value can also take the value of the snmpEngineID 1720 of a remote SNMP engine with which this user can 1721 communicate. 1722 " 1723 ::= { usmUserEntry 1 } 1725 usmUserName OBJECT-TYPE 1726 SYNTAX SnmpAdminString (SIZE(1..16)) 1727 MAX-ACCESS not-accessible 1728 STATUS current 1729 DESCRIPTION "A human readable string representing the name of 1730 the user. 1732 This is the (User-based Security) Model dependent 1733 security ID. 1734 " 1735 ::= { usmUserEntry 2 } 1737 usmUserSecurityName OBJECT-TYPE 1738 SYNTAX SnmpAdminString 1739 MAX-ACCESS read-only 1740 STATUS current 1741 DESCRIPTION "A human readable string representing the user in 1742 Security Model independent format. 1744 The default transformation of the User-based Security 1745 Model dependent security ID to the securityName and 1746 vice versa is the identity function so that the 1747 securityName is the same as the userName. 1748 " 1749 ::= { usmUserEntry 3 } 1751 usmUserCloneFrom OBJECT-TYPE 1752 SYNTAX RowPointer 1753 MAX-ACCESS read-create 1754 STATUS current 1755 DESCRIPTION "A pointer to another conceptual row in this 1756 usmUserTable. The user in this other conceptual 1757 row is called the clone-from user. 1759 When a new user is created (i.e., a new conceptual 1760 row is instantiated in this table), the privacy and 1761 authentication parameters of the new user are cloned 1762 from its clone-from user. 1764 The first time an instance of this object is set by 1765 a management operation (either at or after its 1766 instantiation), the cloning process is invoked. 1767 Subsequent writes are successful but invoke no 1768 action to be taken by the receiver. 1769 The cloning process fails with an 'inconsistentName' 1770 error if the conceptual row representing the 1771 clone-from user is not in an active state when the 1772 cloning process is invoked. 1774 Cloning also causes the initial values of the secret 1775 authentication key and the secret encryption key of 1776 the new user to be set to the same value as the 1777 corresponding secret of the clone-from user. 1779 When this object is read, the ZeroDotZero OID 1780 is returned. 1781 " 1782 ::= { usmUserEntry 4 } 1784 usmUserAuthProtocol OBJECT-TYPE 1785 SYNTAX AutonomousType 1786 MAX-ACCESS read-create 1787 STATUS current 1788 DESCRIPTION "An indication of whether messages sent on behalf of 1789 this user to/from the SNMP engine identified by 1790 usmUserEngineID, can be authenticated, and if so, 1791 the type of authentication protocol which is used. 1793 An instance of this object is created concurrently 1794 with the creation of any other object instance for 1795 the same user (i.e., as part of the processing of 1796 the set operation which creates the first object 1797 instance in the same conceptual row). Once created, 1798 the value of an instance of this object can not be 1799 changed. 1800 " 1801 DEFVAL { usmMD5AuthProtocol } 1802 ::= { usmUserEntry 5 } 1804 usmUserAuthKeyChange OBJECT-TYPE 1805 SYNTAX KeyChange -- typically (SIZE (0..32)) 1806 MAX-ACCESS read-create 1807 STATUS current 1808 DESCRIPTION "An object, which when modified, causes the secret 1809 authentication key used for messages sent on behalf 1810 of this user to/from the SNMP engine identified by 1811 usmUserEngineID, to be modified via a one-way 1812 function. 1814 The associated protocol is the usmUserAuthProtocol. 1815 The associated secret key is the user's secret 1816 authentication key (authKey). The associated hash 1817 algorithm is the algorithm used by the user's 1818 usmUserAuthProtocol. 1820 When creating a new user, it is an 'inconsistentName' 1821 error for a Set operation to refer to this object 1822 unless it is previously or concurrently initialized 1823 through a set operation on the corresponding value 1824 of usmUserCloneFrom. 1825 " 1826 DEFVAL { ''H } -- the empty string 1827 ::= { usmUserEntry 6 } 1829 usmUserOwnAuthKeyChange OBJECT-TYPE 1830 SYNTAX KeyChange -- typically (SIZE (0..32)) 1831 MAX-ACCESS read-create 1832 STATUS current 1833 DESCRIPTION "Behaves exactly as usmUserAuthKeyChange, with one 1834 notable difference: in order for the Set operation 1835 to succeed, the usmUserName of the operation 1836 requester must match the usmUserName that 1837 indexes the row which is targeted by this 1838 operation. 1840 The idea here is that access to this column can be 1841 public, since it will only allow a user to change 1842 his own secret authentication key (authKey). 1843 " 1844 DEFVAL { ''H } -- the empty string 1845 ::= { usmUserEntry 7 } 1847 usmUserPrivProtocol OBJECT-TYPE 1848 SYNTAX AutonomousType 1849 MAX-ACCESS read-create 1850 STATUS current 1851 DESCRIPTION "An indication of whether messages sent on behalf of 1852 this user to/from the SNMP engine identified by 1853 usmUserEngineID, can be protected from disclosure, 1854 and if so, the type of privacy protocol which is used. 1856 An instance of this object is created concurrently 1857 with the creation of any other object instance for 1858 the same user (i.e., as part of the processing of 1859 the set operation which creates the first object 1860 instance in the same conceptual row). Once created, 1861 the value of an instance of this object can not be 1862 changed. 1863 " 1864 DEFVAL { usmNoPrivProtocol } 1865 ::= { usmUserEntry 8 } 1867 usmUserPrivKeyChange OBJECT-TYPE 1868 SYNTAX KeyChange -- typically (SIZE (0..32)) 1869 MAX-ACCESS read-create 1870 STATUS current 1871 DESCRIPTION "An object, which when modified, causes the secret 1872 encryption key used for messages sent on behalf 1873 of this user to/from the SNMP engine identified by 1874 usmUserEngineID, to be modified via a one-way 1875 function. 1877 The associated protocol is the usmUserPrivProtocol. 1878 The associated secret key is the user's secret 1879 privacy key (privKey). The associated hash 1880 algorithm is the algorithm used by the user's 1881 usmUserAuthProtocol. 1883 When creating a new user, it is an 'inconsistentName' 1884 error for a set operation to refer to this object 1885 unless it is previously or concurrently initialized 1886 through a set operation on the corresponding value 1887 of usmUserCloneFrom. 1888 " 1889 DEFVAL { ''H } -- the empty string 1890 ::= { usmUserEntry 9 } 1892 usmUserOwnPrivKeyChange OBJECT-TYPE 1893 SYNTAX KeyChange -- typically (SIZE (0..32)) 1894 MAX-ACCESS read-create 1895 STATUS current 1896 DESCRIPTION "Behaves exactly as usmUserPrivKeyChange, with one 1897 notable difference: in order for the Set operation 1898 to succeed, the usmUserName of the operation 1899 requester must match the usmUserName that indexes 1900 the row which is targeted by this operation. 1902 The idea here is that access to this column can be 1903 public, since it will only allow a user to change 1904 his own secret privacy key (privKey). 1905 " 1906 DEFVAL { ''H } -- the empty string 1907 ::= { usmUserEntry 10 } 1909 usmUserPublic OBJECT-TYPE 1910 SYNTAX OCTET STRING (SIZE(0..32)) 1911 MAX-ACCESS read-create 1912 STATUS current 1913 DESCRIPTION "A publicly-readable value which is written as part 1914 of the procedure for changing a user's secret 1915 authentication and/or privacy key, and later read to 1916 determine whether the change of the secret was 1917 effected. 1918 " 1919 DEFVAL { ''H } -- the empty string 1920 ::= { usmUserEntry 11 } 1922 usmUserStorageType OBJECT-TYPE 1923 SYNTAX StorageType 1924 MAX-ACCESS read-create 1925 STATUS current 1926 DESCRIPTION "The storage type for this conceptual row. 1928 Conceptual rows having the value 'permanent' 1929 must allow write-access at a minimum to: 1931 - usmUserAuthKeyChange, usmUserOwnAuthKeyChange 1932 and usmUserPublic for a user who employs 1933 authentication, and 1934 - usmUserPrivKeyChange, usmUserOwnPrivKeyChange 1935 and usmUserPublic for a user who employs 1936 privacy. 1938 Note that any user who employs authentication or 1939 privacy must allow its secret(s) to be updated and 1940 thus cannot be 'readOnly'. 1941 " 1942 DEFVAL { nonVolatile } 1943 ::= { usmUserEntry 12 } 1945 usmUserStatus OBJECT-TYPE 1946 SYNTAX RowStatus 1947 MAX-ACCESS read-create 1948 STATUS current 1949 DESCRIPTION "The status of this conceptual row. 1951 Until instances of all corresponding columns are 1952 appropriately configured, the value of the 1953 corresponding instance of the usmUserStatus column 1954 is 'notReady'. 1956 In particular, a newly created row cannot be made 1957 active until the corresponding usmUserCloneFrom, 1958 usmUserAuthKeyChange, usmUserOwnAuthKeyChange, 1959 usmUserPrivKeyChange and usmUserOwnPrivKeyChange 1960 have all been set. 1962 The value of this object has no effect on whether 1963 other objects in this conceptual row can be modified. 1964 " 1965 ::= { usmUserEntry 13 } 1967 -- Conformance Information ******************************************* 1969 usmMIBCompliances OBJECT IDENTIFIER ::= { usmMIBConformance 1 } 1970 usmMIBGroups OBJECT IDENTIFIER ::= { usmMIBConformance 2 } 1972 -- Compliance statements 1973 usmMIBCompliance MODULE-COMPLIANCE 1974 STATUS current 1975 DESCRIPTION "The compliance statement for SNMP engines which 1976 implement the SNMP-USER-BASED-SM-MIB. 1977 " 1979 MODULE -- this module 1980 MANDATORY-GROUPS { usmMIBBasicGroup } 1982 OBJECT usmUserAuthProtocol 1983 MIN-ACCESS read-only 1984 DESCRIPTION "Write access is not required." 1986 OBJECT usmUserPrivProtocol 1987 MIN-ACCESS read-only 1988 DESCRIPTION "Write access is not required." 1990 ::= { usmMIBCompliances 1 } 1992 -- Units of compliance 1994 usmMIBBasicGroup OBJECT-GROUP 1995 OBJECTS { 1996 usmStatsUnsupportedLoS, 1997 usmStatsNotInTimeWindows, 1998 usmStatsUnknownUserNames, 1999 usmStatsUnknownEngineIDs, 2000 usmStatsWrongDigests, 2001 usmStatsDecryptionErrors, 2002 usmUserSpinLock, 2003 usmUserSecurityName, 2004 usmUserCloneFrom, 2005 usmUserAuthProtocol, 2006 usmUserAuthKeyChange, 2007 usmUserOwnAuthKeyChange, 2008 usmUserPrivProtocol, 2009 usmUserPrivKeyChange, 2010 usmUserOwnPrivKeyChange, 2011 usmUserPublic, 2012 usmUserStorageType, 2013 usmUserStatus 2014 } 2015 STATUS current 2016 DESCRIPTION "A collection of objects providing for configuration 2017 of an SNMP engine which implements the SNMP 2018 User-based Security Model. 2019 " 2020 ::= { usmMIBGroups 1 } 2022 END 2023 6. MD5 Authentication Protocol 2025 This section describes the Keyed-MD5 authentication protocol. 2026 This protocol is the first authentication protocol defined for 2027 the User-based Security Model. 2029 This protocol is identified by usmMD5AuthProtocol. 2031 Over time, other authentication protocols may be defined either 2032 as a replacement of this protocol or in addition to this protocol. 2034 6.1. Mechanisms 2036 - In support of data integrity, a message digest algorithm is 2037 required. A digest is calculated over an appropriate portion 2038 of an SNMP message and included as part of the message sent 2039 to the recipient. 2041 - In support of data origin authentication and data integrity, 2042 a secret value is both inserted into, and appended to, the 2043 SNMP message prior to computing the digest; the inserted value 2044 is overwritten prior to transmission, and the appended value 2045 is not transmitted. The secret value is shared by all SNMP 2046 engines authorized to originate messages on behalf of the 2047 appropriate user. 2049 - In order to not expose the shared secrets (keys) at all SNMP 2050 engines in case one of the SNMP engines is compromised, such 2051 secrets (keys) are localized for each authoritative SNMP 2052 engine, see [Localized-Key]. 2054 6.1.1. Digest Authentication Protocol 2056 The Digest Authentication Protocol defined in this memo provides 2057 for: 2059 - verification of the integrity of a received message 2060 (i.e., the message received is the message sent). 2062 The integrity of the message is protected by computing a digest 2063 over an appropriate portion of the message. The digest is 2064 computed by the originator of the message, transmitted with the 2065 message, and verified by the recipient of the message. 2067 - verification of the user on whose behalf the message was 2068 generated. 2070 A secret value known only to SNMP engines authorized to generate 2071 messages on behalf of a user is both inserted into, and appended 2072 to, the message prior to the digest computation. Thus, the 2073 verification of the user is implicit with the verification of the 2074 digest. Note that the use of two copies of the secret, one near 2075 the start and one at the end, is recommended by [KEYED-MD5]. 2077 This protocol uses the MD5 [MD5] message digest algorithm. 2078 A 128-bit digest is calculated over the designated portion of an 2079 SNMP message and included as part of the message sent to the 2080 recipient. The size of both the digest carried in a message and 2081 the private authentication key (the secret) is 16 octets. 2083 6.2. Elements of the Digest Authentication Protocol 2085 This section contains definitions required to realize the 2086 authentication module defined by this memo. 2088 6.2.1. Users 2090 Authentication using this Digest Authentication protocol makes use 2091 of a defined set of userNames. For any user on whose behalf a 2092 message must be authenticated at a particular SNMP engine, that 2093 SNMP engine must have knowledge of that user. An SNMP engine that 2094 wishes to communicate with another SNMP engine must also have 2095 knowledge of a user known to that engine, including knowledge of 2096 the applicable attributes of that user. 2098 A user and its attributes are defined as follows: 2100 2101 A string representing the name of the user. 2102 2103 A user's secret key to be used when calculating a digest. 2105 6.2.2. authEngineID 2107 The authEngineID value contained in an authenticated message 2108 specifies the authoritative SNMP engine for that particular 2109 message (see the definition of SnmpEngineID in the SNMP 2110 Architecture document [SNMP-ARCH]). 2112 The user's (private) authentication key is normally different at 2113 each authoritative SNMP engine and so the snmpEngineID is used 2114 to select the proper key for the authentication process. 2116 6.2.3. SNMP Messages Using this Authentication Protocol 2118 Messages using this authentication protocol carry an authParameters 2119 field as part of the securityParameters. For this protocol, the 2120 authParameters field is the serialized OCTET STRING representing 2121 the MD5 digest of the wholeMsg. 2123 The digest is calculated over the wholeMsg so if a message is 2124 authenticated, that also means that all the fields in the message 2125 are intact and have not been tampered with. 2127 6.2.4. Services provided by the MD5 Authentication Module 2129 This section describes the inputs and outputs that the MD5 2130 Authentication module expects and produces when the User-based 2131 Security module calls the MD5 Authentication module for services. 2133 6.2.4.1. Services for Generating an Outgoing SNMP Message 2135 This MD5 authentication protocol assumes that the selection of the 2136 authKey is done by the caller and that the caller passes the 2137 secret key to be used. 2139 Upon completion the authentication module returns statusInformation 2140 and, if the message digest was correctly calculated, the wholeMsg 2141 with the digest inserted at the proper place. 2143 The abstract service interfaces are: 2145 authenticateOutgoingMsg( 2146 authKey -- secret key for authentication 2147 wholeMsg -- complete message 2148 ) 2150 returnAuthenticatedOutgoingMsg( 2151 wholeMsg -- complete authenticated message 2152 statusInformation -- success or errorIndication 2153 ) 2155 Where: 2157 authKey 2158 The secret key to be used by the authentication algorithm. 2159 wholeMsg 2160 The message to be authenticated on input or the authenticated 2161 message (including inserted digest) on output. 2162 statusInformation 2163 An indication of whether the authentication process was 2164 successful. If not it is an indication of the problem. 2166 Note, that authParameters field is filled by the authentication 2167 module and this field should be already present in the wholeMsg 2168 before the Message Authentication Code (MAC) is generated. 2170 6.2.4.2. Services for Processing an Incoming SNMP Message 2172 This MD5 authentication protocol assumes that the selection of the 2173 authKey is done by the caller and that the caller passes 2174 the secret key to be used. 2176 Upon completion the authentication module returns statusInformation 2177 and, if the message digest was correctly calculated, the wholeMsg 2178 as it was processed. 2180 The abstract service interfaces are: 2182 authenticateIncomingMsg( 2183 authKey -- secret key for authentication 2184 authParameters -- filled in by service provider 2185 wholeMsg -- as received on the wire 2186 ) 2188 returnAuthenticatedIncomingMsg( 2189 wholeMsg -- complete authenticated message 2190 statusInformation -- success or errorIndication 2191 ) 2193 Where: 2195 authKey 2196 The secret key to be used by the authentication algorithm. 2197 authParameters 2198 The authParameters from the incoming message. 2199 wholeMsg 2200 The message to be authenticated on input and the authenticated 2201 message on output. 2203 6.3. Elements of Procedure 2205 This section describes the procedures for the Keyed-MD5 2206 authentication protocol. 2208 6.3.1. Processing an Outgoing Message 2210 This section describes the procedure followed by an SNMP engine 2211 whenever it must authenticate an outgoing message using the 2212 usmMD5AuthProtocol. 2214 1) The authParameters field is set to the serialization according 2215 to the rules in [RFC1906] of an OCTET STRING representing the 2216 secret (localized) authKey. 2218 2) The secret (localized) authKey is then appended to the end of 2219 the wholeMsg. 2221 3) The MD5-Digest is calculated according to [MD5]. Then the 2222 authParameters field is replaced with the calculated digest. 2224 4) The wholeMsg (excluding the appended secret key) is then 2225 returned to the caller together with statusInformation 2226 indicating success. 2228 6.3.2. Processing an Incoming Message 2230 This section describes the procedure followed by an SNMP engine 2231 whenever it must authenticate an incoming message using the 2232 usmMD5AuthProtocol. 2234 1) If the digest received in the authParameters field is not 2235 16 octets long, then an error indication (authenticationError) 2236 is returned to the calling module. 2238 2) The digest received in the authParameters field is saved. 2240 3) The digest in the authParameters field is replaced by the 2241 secret (localized) authKey. 2243 4) The secret (localized) authKey is then appended to the end of 2244 the wholeMsg. 2246 5) The MD5-Digest is calculated according to [MD5]. 2247 The authParameters field is replaced with the digest value 2248 that was saved in step 2). 2250 6) Then the newly calculated digest is compared with the digest 2251 saved in step 2). If the digests do not match, then an error 2252 indication (authenticationFailure) is returned to the calling 2253 module. 2255 7) The wholeMsg (excluding the appended secret key) and 2256 statusInformation indicating success are then returned to 2257 the caller. 2259 7. DES Privacy Protocol 2261 This section describes the DES privacy protocol. 2262 This protocol is the first privacy protocol defined for the 2263 User-based Security Model. 2265 This protocol is identified by usmDESPrivProtocol. 2267 Over time, other privacy protocols may be defined either 2268 as a replacement of this protocol or in addition to this protocol. 2270 7.1. Mechanisms 2272 - In support of data confidentiality, an encryption algorithm is 2273 required. An appropriate portion of the message is encrypted 2274 prior to being transmitted. The User-based Security Model 2275 specifies that the scopedPDU is the portion of the message 2276 that needs to be encrypted. 2278 - A secret value in combination with a timeliness value is used 2279 to create the en/decryption key and the initialization vector. 2280 The secret value is shared by all SNMP engines authorized to 2281 originate messages on behalf of the appropriate user. 2283 - In order to not expose the shared secrets (keys) at all SNMP 2284 engines in case one of the SNMP engines is compromised, such 2285 secrets (keys) are localized for each authoritative SNMP engine, 2286 see [Localized-Key]. 2288 7.1.1. Symmetric Encryption Protocol 2290 The Symmetric Encryption Protocol defined in this memo provides 2291 support for data confidentiality. The designated portion of an 2292 SNMP message is encrypted and included as part of the message 2293 sent to the recipient. 2295 Two organizations have published specifications defining the DES: 2296 the National Institute of Standards and Technology (NIST) 2297 [DES-NIST] and the American National Standards Institute 2298 [DES-ANSI]. There is a companion Modes of Operation specification 2299 for each definition ([DESO-NIST] and [DESO-ANSI], respectively). 2301 The NIST has published three additional documents that implementors 2302 may find useful. 2304 - There is a document with guidelines for implementing and using 2305 the DES, including functional specifications for the DES and 2306 its modes of operation [DESG-NIST]. 2308 - There is a specification of a validation test suite for the DES 2310 [DEST-NIST]. The suite is designed to test all aspects of the 2311 DES and is useful for pinpointing specific problems. 2313 - There is a specification of a maintenance test for the DES 2314 [DESM-NIST]. The test utilizes a minimal amount of data and 2315 processing to test all components of the DES. It provides a 2316 simple yes-or-no indication of correct operation and is useful 2317 to run as part of an initialization step, e.g., when a computer 2318 re-boots. 2320 7.1.1.1. DES key and Initialization Vector. 2322 The first 8 bytes of the 16-byte secret (private privacy key) are 2323 used as a DES key. Since DES uses only 56 bits, the Least 2324 Significant Bit in each byte is disregarded. 2326 The Initialization Vector for encryption is obtained using the 2327 following procedure. 2329 The last 8 bytes of the 16-byte secret (private privacy key) 2330 are used as pre-IV. 2332 In order to ensure that the IV for two different packets encrypted 2333 by the same key, are not the same (i.e. the IV does not repeat) we 2334 need to "salt" the pre-IV with something unique per packet. 2335 An 8-byte octet string is used as the "salt". The concatenation 2336 of the generating SNMP engine's 32-bit snmpEngineBoots and a local 2337 32-bit integer, that the encryption engine maintains, is input to 2338 the "salt". The 32-bit integer is initialized to an arbitrary 2339 value at boot time. 2340 The 32-bit snmpEngineBoots is converted to the first 4 bytes 2341 (Most Significant Byte first) of our "salt". The 32-bit integer 2342 is then converted to the last 4 bytes (Most Significant Byte first) 2343 of our "salt". The resulting "salt" is then XOR-ed with the 2344 pre-IV. The 8-byte "salt" is then put into the privParameters 2345 field encoded as an OCTET STRING. The "salt" integer is then 2346 modified. We recommend that it be incremented by one and wrap 2347 when it reaches the maximum value. 2349 How exactly the value of the "salt" (and thus of the IV) varies, 2350 is an implementation issue, as long as the measures are taken to 2351 avoid producing a duplicate IV. 2353 The "salt" must be placed in the privParameters field to enable the 2354 receiving entity to compute the correct IV and to decrypt the 2355 message. 2357 7.1.1.2. Data Encryption. 2359 The data to be encrypted is treated as sequence of octets. Its 2360 length should be an integral multiple of 8 - and if t is not, the 2361 data is padded at the end as necessary. The actual pad value 2362 is irrelevant. 2364 The data is encrypted in Cipher Block Chaining mode. 2365 The plaintext is divided into 64-bit blocks. 2367 The plaintext for each block is XOR-ed with the ciphertext 2368 of the previous block, the result is encrypted and the output 2369 of the encryption is the ciphertext for the block. 2370 This procedure is repeated until there are no more plaintext 2371 blocks. 2373 For the very first block, the Initialization Vector is used 2374 instead of the ciphertext of the previous block. 2376 7.1.1.3. Data Decryption 2378 Before decryption, the encrypted data length is verified. 2379 If the length of the OCTET STRING to be decrypted is not an 2380 integral multiple of 8 octets, the decryption process is halted 2381 and an appropriate exception noted. When decrypting, the padding 2382 is ignored. 2384 The first ciphertext block is decrypted, the decryption output is 2385 XOR-ed with the Initialization Vector, and the result is the first 2386 plaintext block. 2388 For each subsequent block, the ciphertext block is decrypted, 2389 the decryption output is XOR-ed with the previous ciphertext 2390 block and the result is the plaintext block. 2392 7.2. Elements of the DES Privacy Protocol 2394 This section contains definitions required to realize the privacy 2395 module defined by this memo. 2397 7.2.1. Users 2399 Data en/decryption using this Symmetric Encryption Protocol makes 2400 use of a defined set of userNames. For any user on whose behalf 2401 a message must be en/decrypted at a particular SNMP engine, that 2402 SNMP engine must have knowledge of that user. An SNMP engine that 2403 wishes to communicate with another SNMP engine must also have 2404 knowledge of a user known to that SNMP engine, including knowledge 2405 of the applicable attributes of that user. 2407 A user and its attributes are defined as follows: 2409 2410 An octet string representing the name of the user. 2411 2412 A user's secret key to be used as input for the DES key and IV. 2414 7.2.2. authEngineID 2416 The authEngineID value contained in an authenticated message 2417 specifies the authoritative SNMP engine for that particular 2418 message (see the definition of SnmpEngineID in the SNMP 2419 Architecture document [SNMP-ARCH]). 2421 The user's (private) privacy key is normally different at 2422 each authoritative SNMP engine and so the snmpEngineID is used 2423 to select the proper key for the en/decryption process. 2425 7.2.3. SNMP Messages Using this Privacy Protocol 2427 Messages using this privacy protocol carry a privParameters 2428 field as part of the securityParameters. For this protocol, the 2429 privParameters field is the serialized octet string representing 2430 the "salt" that was used to create the IV. 2432 7.2.4. Services provided by the DES Privacy Module 2434 This section describes the inputs and outputs that the DES Privacy 2435 module expects and produces when the User-based Security module 2436 invokes the DES Privacy module for services. 2438 7.2.4.1. Services for Encrypting Outgoing Data 2440 This DES privacy protocol assumes that the selection of the 2441 privKey is done by the caller and that the caller passes 2442 the secret key to be used. 2444 Upon completion the privacy module returns statusInformation 2445 and, if the encryption process was successful, the encryptedPDU 2446 and the privParameters encoded as an OCTET STRING. 2448 The abstract service interface primitives are: 2450 encryptData( 2451 encryptKey -- secret key for encryption 2452 dataToEncrypt -- data to encrypt (scopedPDU) 2453 ) 2455 returnEncryptedData( 2456 encryptedData -- encrypted data (encryptedPDU) 2457 privParameters -- filled in by service provider 2458 statusInformation -- success or errorIndication 2459 ) 2461 Where: 2463 encryptKey 2464 The secret key to be used by the encryption algorithm. 2465 dataToEncrypt 2466 The data that must be encrypted. 2468 encryptedData 2469 The encrypted data upon successful completion. 2470 privParameters 2471 The privParameters encoded as an OCTET STRING. 2472 statusInformation 2473 An indication of the success or failure of the encryption 2474 process. In case of failure, it is an indication of the 2475 error. 2477 7.2.4.2. Services for Decrypting Incoming Data 2479 This DES privacy protocol assumes that the selection of the 2480 privKey is done by the caller and that the caller passes 2481 the secret key to be used. 2483 Upon completion the privacy module returns statusInformation 2484 and, if the decryption process was successful, the scopedPDU 2485 in plain text. 2487 The abstract service interface primitives are: 2489 decryptData( 2490 decryptKey -- secret key for decryption 2491 privParameters -- as received on the wire 2492 encryptedData -- encrypted data (encryptedPDU) 2494 returnDecryptedData( 2495 decryptedData -- decrypted data (scopedPDU) 2496 statusInformation -- success or errorIndication 2497 ) 2499 Where: 2501 decryptKey 2502 The secret key to be used by the decryption algorithm. 2503 privParameters 2504 The "salt" to be used to calculate the IV. 2505 encryptedData 2506 The data to be decrypted. 2508 decryptedData 2509 The decrypted data. 2510 statusInformation 2511 An indication whether the data was successfully decrypted 2512 and if not an indication of the error. 2514 7.3. Elements of Procedure. 2516 This section describes the procedures for the DES privacy protocol. 2518 7.3.1. Processing an Outgoing Message 2520 This section describes the procedure followed by an SNMP engine 2521 whenever it must encrypt part of an outgoing message using the 2522 usmDESPrivProtocol. 2524 1) The secret (localized) cryptKey is used to construct the DES 2525 encryption key, the "salt" and the DES pre-IV (as described 2526 in section 7.1.1.1). 2528 2) The privParameters field is set to the serialization according 2529 to the rules in [RFC1906] of an OCTET STRING representing the 2530 the "salt" string. 2532 2) The scopedPDU is encrypted (as described in section 7.1.1.2) 2533 and the encrypted data is serialized according to the rules 2534 in [RFC1906] as an OCTET STRING. 2536 3) The the serialized OCTET STRING representing the encrypted 2537 scopedPDU together with the privParameters and statusInformation 2538 indicating success is returned to the calling module. 2540 7.3.2. Processing an Incoming Message 2542 This section describes the procedure followed by an SNMP engine 2543 whenever it must decrypt part of an incoming message using the 2544 usmDESPrivProtocol. 2546 1) If the privParameters field is not an 8-byte OCTET STRING, 2547 then an error indication (decryptionError) is returned to 2548 the calling module. 2550 2) The "salt" is extracted from the privParameters field. 2552 3) The secret (localized) cryptKey and the "salt" are then used 2553 to construct the DES decryption key and pre-IV (as described 2554 in section 7.1.1.1). 2556 4) The encryptedPDU is then decrypted (as described in 2557 section 7.1.1.3). 2559 5) If the encryptedPDU cannot be decrypted, then an error 2560 indication (decryptionError) is returned to the calling module. 2562 6) The decrypted scopedPDU and statusInformation indicating 2563 success are returned to the calling module. 2565 8. Editor's Addresses 2567 Co-editor Uri Blumenthal 2568 IBM T. J. Watson Research 2569 postal: 30 Saw Mill River Pkwy, 2570 Hawthorne, NY 10532 2571 USA 2572 email: uri@watson.ibm.com 2573 phone: +1-914-784-7064 2575 Co-editor: Bert Wijnen 2576 IBM T. J. Watson Research 2577 postal: Schagen 33 2578 3461 GL Linschoten 2579 Netherlands 2580 email: wijnen@vnet.ibm.com 2581 phone: +31-348-432-794 2583 9. Acknowledgements 2585 This document is based on the recommendations of the SNMP Security and 2586 Administrative Framework Evolution team, comprised of 2588 David Harrington (Cabletron Systems Inc.) 2589 Jeff Johnson (Cisco) 2590 David Levi (SNMP Research Inc.) 2591 John Linn (Openvision) 2592 Russ Mundy (Trusted Information Systems) chair 2593 Shawn Routhier (Epilogue) 2594 Glenn Waters (Nortel) 2595 Bert Wijnen (IBM T. J. Watson Research) 2597 Further a lot of "cut and paste" material comes from RFC1910 and from 2598 earlier draft documents from the SNMPv2u and SNMPv2* series. 2600 Further more a special thanks is due to the SNMPv3 WG, specifically: 2601 .... 2603 10. Security Considerations 2605 10.1. Recommended Practices 2607 This section describes practices that contribute to the secure, 2608 effective operation of the mechanisms defined in this memo. 2610 - An SNMP engine must discard SNMP Response messages for which 2611 the msgID component does not correspond to any currently 2612 outstanding Request message. 2613 An SNMP Command Generator Application must discard any Response 2614 PDU for which the request-id component or the represented 2615 management information does not correspond to any currently 2616 outstanding Request PDU. 2618 Although it would be typical for an SNMP engine and an SNMP 2619 Command Generator Application to do this as a matter of course, 2620 when using these security protocols it is significant due to 2621 the possibility of message duplication (malicious or otherwise). 2623 - An SNMP engine must generate unpredictable msgIDs and an SNMP 2624 Command Generator or Notification Originator Application must 2625 generate unpredictable request-ids in authenticated messages in 2626 order to protect against the possibility of message duplication 2627 (malicious or otherwise). 2628 For example, starting operations with a msgID and/or request-id 2629 value of zero is not a good idea. Initializing them with an 2630 unpredictable number (so they do not start out the same after 2631 each reboot) and then incrementing by one would be acceptable. 2633 - An SNMP engine should perform time synchronization using 2634 authenticated messages in order to protect against the 2635 possibility of message duplication (malicious or otherwise). 2637 - When sending state altering messages to a managed authoritative 2638 SNMP engine, a Command Generator Application should delay sending 2639 successive messages to that managed SNMP engine until a positive 2640 acknowledgement is received for the previous message or until 2641 the previous message expires. 2643 No message ordering is imposed by the SNMP. Messages may be 2644 received in any order relative to their time of generation and 2645 each will be processed in the ordered received. Note that when 2646 an authenticated message is sent to a managed SNMP engine, it 2647 will be valid for a period of time of approximately 150 seconds 2648 under normal circumstances, and is subject to replay during this 2649 period. Indeed, an SNMP engine and SNMP Command Generator 2650 Applications must cope with the loss and re-ordering of messages 2651 resulting from anomalies in the network as a matter of course. 2653 However, a managed object, snmpSetSerialNo [RFC1907], is 2654 specifically defined for use with SNMP Set operations in order 2655 to provide a mechanism to ensure that the processing of SNMP 2656 messages occurs in a specific order. 2658 - The frequency with which the secrets of a User-based Security 2659 Model user should be changed is indirectly related to the 2660 frequency of their use. 2662 Protecting the secrets from disclosure is critical to the overall 2663 security of the protocols. Frequent use of a secret provides a 2664 continued source of data that may be useful to a cryptanalyst in 2665 exploiting known or perceived weaknesses in an algorithm. 2666 Frequent changes to the secret avoid this vulnerability. 2668 Changing a secret after each use is generally regarded as the 2669 most secure practice, but a significant amount of overhead may 2670 be associated with that approach. 2672 Note, too, in a local environment the threat of disclosure may be 2673 less significant, and as such the changing of secrets may be less 2674 frequent. However, when public data networks are used as the 2675 communication paths, more caution is prudent. 2677 10.2 Defining Users 2679 The mechanisms defined in this document employ the notion of users 2680 on whose behalf messages are sent. How "users" are defined is 2681 subject to the security policy of the network administration. 2682 For example, users could be individuals (e.g., "joe" or "jane"), 2683 or a particular role (e.g., "operator" or "administrator"), or a 2684 combination (e.g., "joe-operator", "jane-operator" or "joe-admin"). 2685 Furthermore, a user may be a logical entity, such as an SNMP 2686 Application or a set of SNMP Applications, acting on behalf of an 2687 individual or role, or set of individuals, or set of roles, 2688 including combinations. 2690 Appendix A describes an algorithm for mapping a user "password" to 2691 a 16 octet value for use as either a user's authentication key or 2692 privacy key (or both). Note however, that using the same password 2693 (and therefore the same key) for both authentication and privacy 2694 is very poor security practice and should be strongly discouraged. 2695 Passwords are often generated, remembered, and input by a human. 2696 Human-generated passwords may be less than the 16 octets required 2697 by the authentication and privacy protocols, and brute force 2698 attacks can be quite easy on a relatively short ASCII character 2699 set. Therefore, the algorithm is Appendix A performs a 2700 transformation on the password. If the Appendix A algorithm is 2701 used, SNMP implementations (and SNMP configuration applications) 2702 must ensure that passwords are at least 8 characters in length. 2704 Because the Appendix A algorithm uses such passwords (nearly) 2705 directly, it is very important that they not be easily guessed. 2706 It is suggested that they be composed of mixed-case alphanumeric 2707 and punctuation characters that don't form words or phrases that 2708 might be found in a dictionary. Longer passwords improve the 2709 security of the system. Users may wish to input multiword 2710 phrases to make their password string longer while ensuring that 2711 it is memorable. 2713 Since it is infeasible for human users to maintain different 2714 passwords for every SNMP engine, but security requirements 2715 strongly discourage having the same key for more than one SNMP 2716 engine, the User-based Security Model employs a compromise 2717 proposed in [Localized-key]. It derives the user keys for the 2718 SNMP engines from user's password in such a way that it is 2719 practically impossible to either determine the user's password, 2720 or user's key for another SNMP engine from any combination of 2721 user's keys on SNMP engines. 2723 Note however, that if user's password is disclosed, key 2724 localization will not help and network security may be 2725 compromised in this case. 2727 10.3. Conformance 2729 To be termed a "Secure SNMP implementation" based on the 2730 User-based Security Model, an SNMP implementation MUST: 2732 - implement one or more Authentication Protocol(s). The MD5 2733 Authentication Protocol defined in this memo is one such 2734 protocol. 2736 - to the maximum extent possible, prohibit access to the 2737 secret(s) of each user about which it maintains information 2738 in a Local Configuration Datastore (LCD) under all 2739 circumstances except as required to generate and/or 2740 validate SNMP messages with respect to that user. 2742 - implement the SNMP-USER-BASE-SM-MIB. 2744 In addition, an authoritative SNMP engine SHOULD [RFC2119] provide 2745 initial configuration in accordance with Appendix A.1. 2747 Implementation of a Privacy Protocol (the DES Symmetric Encryption 2748 Protocol defined in this memo is one such protocol) is optional. 2750 11. References 2752 [RFC1902] The SNMPv2 Working Group, Case, J., McCloghrie, K., 2753 Rose, M., and S., Waldbusser, "Structure of Management 2754 Information for Version 2 of the Simple Network Management 2755 Protocol (SNMPv2)", RFC 1905, January 1996. 2757 [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K., 2758 Rose, M., and S., Waldbusser, "Protocol Operations for 2759 Version 2 of the Simple Network Management Protocol (SNMPv2)", 2760 RFC 1905, January 1996. 2762 [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K., 2763 Rose, M., and S. Waldbusser, "Transport Mappings for 2764 Version 2 of the Simple Network Management Protocol (SNMPv2)", 2765 RFC 1906, January 1996. 2767 [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K., 2768 Rose, M., and S. Waldbusser, "Management Information Base for 2769 Version 2 of the Simple Network Management Protocol (SNMPv2)", 2770 RFC 1907 January 1996. 2772 [RFC1908] The SNMPv2 Working Group, Case, J., McCloghrie, K., 2773 Rose, M., and S. Waldbusser, "Coexistence between Version 1 2774 and Version 2 of the Internet-standard Network Management 2775 Framework", RFC 1908, January 1996. 2777 [RFC2119] Network Working Group, Bradner, S., "Key words for use in 2778 RFCs to Indicate Requirement Levels", RFC 2119, March 1997. 2780 [SNMP-ARCH] The SNMPv3 Working Group, Harrington, D., Wijnen, B., 2781 "An Architecture for describing Internet Management Frameworks", 2782 draft-ietf-snmpv3-next-gen-arch-03.txt, July 1997. 2784 [SNMP-v3MP] The SNMPv3 Working Group, Wijnen, B., Harrington, D., 2785 Case, J., "Message Processing Model for version 3 of the Simple 2786 Network Management Protocol (SNMPv3)", 2787 draft-ietf-snmpv3-mpc-03.txt, July 1997. 2789 [SNMP-ACM] The SNMPv3 Working Group, Wijnen, B., Harrington, D., 2790 "View-based Access Control Model for the Simple Network 2791 Management Protocol (SNMP)", 2792 draft-ietf-snmpv3-acm-01.txt, July 1997. 2794 [Localized-Key] U. Blumenthal, N. C. Hien, B. Wijnen 2795 "Key Derivation for Network Management Applications" 2796 IEEE Network Magazine, April/May issue, 1997. 2798 [KEYED-MD5] Krawczyk, H., 2799 "Keyed-MD5 for Message Authentication", 2800 Work in Progress, IBM, June 1995. 2802 [MD5] Rivest, R., "Message Digest Algorithm MD5", 2803 RFC 1321, April 1992. 2805 [DES-NIST] Data Encryption Standard, National Institute of Standards 2806 and Technology. Federal Information Processing Standard (FIPS) 2807 Publication 46-1. Supersedes FIPS Publication 46, (January, 1977; 2808 reaffirmed January, 1988). 2810 [DES-ANSI] Data Encryption Algorithm, American National Standards 2811 Institute. ANSI X3.92-1981, (December, 1980). 2813 [DESO-NIST] DES Modes of Operation, National Institute of Standards and 2814 Technology. Federal Information Processing Standard (FIPS) 2815 Publication 81, (December, 1980). 2817 [DESO-ANSI] Data Encryption Algorithm - Modes of Operation, American 2818 National Standards Institute. ANSI X3.106-1983, (May 1983). 2820 [DESG-NIST] Guidelines for Implementing and Using the NBS Data 2821 Encryption Standard, National Institute of Standards and 2822 Technology. Federal Information Processing Standard (FIPS) 2823 Publication 74, (April, 1981). 2825 [DEST-NIST] Validating the Correctness of Hardware Implementations of 2826 the NBS Data Encryption Standard, National Institute of Standards 2827 and Technology. Special Publication 500-20. 2829 [DESM-NIST] Maintenance Testing for the Data Encryption Standard, 2830 National Institute of Standards and Technology. 2831 Special Publication 500-61, (August, 1980). 2833 APPENDIX A - Installation 2835 A.1. SNMP engine Installation Parameters 2837 During installation, an authoritative SNMP engine SHOULD (in the 2838 meaning as defined in [RFC2119]) be configured with several initial 2839 parameters. These include: 2841 (1) A security posture 2843 The choice of security posture determines if initial configuration 2844 is implemented and if so how. One of three possible choices 2845 is selected: 2847 minimum-secure, 2848 semi-secure, 2849 very-secure (i.e. no-initial-configuration) 2851 In the case of a very-secure posture, there is no initial 2852 configuration, and so the following steps are irrelevant. 2854 (2) one or more secrets 2856 These are the authentication/privacy secrets for the first user 2857 to be configured. 2859 One way to accomplish this is to have the installer enter a 2860 "password" for each required secret. The password is then 2861 algorithmically converted into the required secret by: 2863 - forming a string of length 1,048,576 octets by repeating the 2864 value of the password as often as necessary, truncating 2865 accordingly, and using the resulting string as the input to 2866 the MD5 algorithm [MD5]. The resulting digest, termed 2867 "digest1", is used in the next step. 2869 - a second string of length 44 octets is formed by concatenating 2870 digest1, the SNMPv3 engine's snmpEngineID value, and digest1. 2871 This string is used as input to the MD5 algorithm [MD5]. 2873 The resulting digest is the required secret (see Appendix A.2). 2875 With these configured parameters, the SNMP engine instantiates 2876 the following usmUserEntry in the usmUserTable: 2878 no privacy support privacy support 2879 ------------------ --------------- 2880 usmUserEngineID localEngineID localEngineID 2881 usmUserName "initial" "initial" 2882 usmUserSecurityName "initial" "initial" 2883 usmUserCloneFrom ZeroDotZero ZeroDotZero 2884 usmUserAuthProtocol usmMD5AuthProtocol usmMD5AuthProtocol 2885 usmUserAuthKeyChange "" "" 2886 usmUserOwnAuthKeyChange "" "" 2887 usmUserPrivProtocol none usmDESPrivProtocol 2888 usmUserPrivKeyChange "" "" 2889 usmUserOwnPrivKeyChange "" "" 2890 usmUserPublic "" "" 2891 usmUserStorageType anyValidStorageType anyValidStorageType 2892 usmUserStatus active active 2894 A.2. Password to Key Algorithm 2896 The following code fragment (section A.2.1) demonstrates the 2897 password to key algorithm which can be used when mapping a password 2898 to an authentication or privacy key. The calls to MD5 are as 2899 documented in [RFC1321]. 2901 An example of the results of a correct implementation is provided 2902 (section A.2.2) whihc an implementer can use to check if his 2903 implementation produces the same result. 2905 A.2.1. Password to Key Sample Code 2907 void password_to_key( 2908 u_char *password, /* IN */ 2909 u_int passwordlen, /* IN */ 2910 u_char *engineID, /* IN - pointer to snmpEngineID */ 2911 u_int engineLength /* IN - length of snmpEngineID */ 2912 u_char *key) /* OUT - pointer to caller 16-byte buffer */ 2913 { 2914 MD5_CTX MD; 2915 u_char *cp, password_buf[64]; 2916 u_long password_index = 0; 2917 u_long count = 0, i; 2919 MD5Init (&MD); /* initialize MD5 */ 2921 /**********************************************/ 2922 /* Use while loop until we've done 1 Megabyte */ 2923 /**********************************************/ 2924 while (count < 1048576) { 2925 cp = password_buf; 2926 for (i = 0; i < 64; i++) { 2927 /*************************************************/ 2928 /* Take the next byte of the password, wrapping */ 2929 /* to the beginning of the password as necessary.*/ 2930 /*************************************************/ 2931 *cp++ = password[password_index++ % passwordlen]; 2932 } 2933 MD5Update (&MD, password_buf, 64); 2934 count += 64; 2935 } 2936 MD5Final (key, &MD); /* tell MD5 we're done */ 2938 /*****************************************************/ 2939 /* Now localize the key with the engineID and pass */ 2940 /* through MD5 to produce final key */ 2941 /* May want to ensure that engineLength <= 32, */ 2942 /* otherwise need to use a buffer larger than 64 */ 2943 /*****************************************************/ 2944 memcpy(password_buf, key, 16); 2945 memcpy(password_buf+16, engineID, engineLength); 2946 memcpy(password_buf+engineLength, key, 16); 2948 MD5Init(&MD); 2949 MD5Update(&MD, password_buf, 32+engineLength); 2950 MD5Final(key, &MD); 2952 return; 2953 } 2954 A.3. Password to Key Sample Results 2956 The following shows a sample output of the password to key 2957 algorithm. 2959 With a password of "maplesyrup" the output of the password to key 2960 algorithm before the key is localized with the SNMP engine's 2961 snmpEngineID is: 2963 '9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63'H 2965 After the intermediate key (shown above) is localized with the 2966 snmpEngineID value of: 2968 '00 00 00 00 00 00 00 00 00 00 00 02'H 2970 the final output of the password to key algorithm is: 2972 '52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b'H 2974 A.4. Sample encoding of securityParameters 2976 The securityParameters in an SNMP message are represented as 2977 an OCTET STRING. This OCTET STRING should be considered opaque 2978 outside a specific Security Model. 2980 The User-based Security Model defines the contents of the OCTET 2981 STRING as a SEQUENCE (see section 2.4). 2983 Given these two properties, the following is an example of the 2984 securityParameters for the User-based Security Model, encoded 2985 as an OCTET STRING: 2987 04 2988 30 2989 04 2990 02 2991 02 2992 04 2993 04 10 2994 04 08 2996 Here is the example once more. but now with real values (except 2997 for the digest in authParameters and the salt in privParameters, 2998 which depend on variable data that we have not defined here): 3000 Hex Data Description 3001 -------------------------- -------------------------------- 3002 04 39 OCTET STRING, length 57 3003 30 37 SEQUENCE, length 55 3004 04 0c 00000002 00000000 authEngineID: IBM, IP, 9.132.3.1 3005 09840301 3006 02 01 01 authEngineBoots: 1 3007 02 02 0101 authEngineTime: 257 3008 04 04 62657274 userName: bert 3009 04 10 01234567 89abcdef authParameters: sample value 3010 fedcba98 76543210 3011 04 08 01234567 89abcdef privParameters: sample value 3013 Table of Contents 3015 0. Issues and Change Log 2 3016 0.1. Current Open Issues 2 3017 0.2. Change Log 2 3018 1. Introduction 5 3019 1.1. Threats 5 3020 1.2. Goals and Constraints 6 3021 1.3. Security Services 7 3022 1.4. Module Organization 8 3023 1.4.1. Timeliness Module 8 3024 1.4.2. Authentication Protocol 9 3025 1.4.3. Privacy Protocol 9 3026 1.5. Protection against Message Replay, Delay and Redirection 9 3027 1.5.1. Authoritative SNMP engine 9 3028 1.5.2. Mechanisms 9 3029 2. Elements of the Model 12 3030 2.1. User-based Security Model Users 12 3031 2.2. Replay Protection 13 3032 2.2.1. authEngineID 13 3033 2.2.2. authEngineBoots and authEngineTime 13 3034 2.2.3. Time Window 14 3035 2.3. Time Synchronization 14 3036 2.4. SNMP Messages Using this Security Model 16 3037 2.5. Services provided by the User-based Security Model 16 3038 2.5.1. Services for Generating an Outgoing SNMP Message 17 3039 2.5.2. Services for Processing an Incoming SNMP Message 19 3040 3. Elements of Procedure 22 3041 3.1. Generating an Outgoing SNMP Message 22 3042 3.2. Processing an Incoming SNMP Message 25 3043 4. Discovery 31 3044 5. Definitions 32 3045 6. MD5 Authentication Protocol 44 3046 6.1. Mechanisms 44 3047 6.1.1. Digest Authentication Protocol 44 3048 6.2. Elements of the Digest Authentication Protocol 45 3049 6.2.1. Users 45 3050 6.2.2. authEngineID 45 3051 6.2.3. SNMP Messages Using this Authentication Protocol 45 3052 6.2.4. Services provided by the MD5 Authentication Module 46 3053 6.2.4.1. Services for Generating an Outgoing SNMP Message 46 3054 6.2.4.2. Services for Processing an Incoming SNMP Message 46 3055 6.3. Elements of Procedure 48 3056 6.3.1. Processing an Outgoing Message 48 3057 6.3.2. Processing an Incoming Message 48 3058 7. DES Privacy Protocol 50 3059 7.1. Mechanisms 50 3060 7.1.1. Symmetric Encryption Protocol 50 3061 7.1.1.1. DES key and Initialization Vector. 51 3062 7.1.1.2. Data Encryption. 51 3063 7.1.1.3. Data Decryption 52 3064 7.2. Elements of the DES Privacy Protocol 52 3065 7.2.1. Users 52 3067 ^L 3068 7.2.2. authEngineID 53 3069 7.2.3. SNMP Messages Using this Privacy Protocol 53 3070 7.2.4. Services provided by the DES Privacy Module 53 3071 7.2.4.1. Services for Encrypting Outgoing Data 53 3072 7.2.4.2. Services for Decrypting Incoming Data 54 3073 7.3. Elements of Procedure. 55 3074 7.3.1. Processing an Outgoing Message 55 3075 7.3.2. Processing an Incoming Message 55 3076 8. Editor's Addresses 56 3077 9. Acknowledgements 56 3078 A.1. SNMP engine Installation Parameters 62 3079 A.2. Password to Key Algorithm 63 3080 A.2.1. Password to Key Sample Code 64 3081 A.3. Password to Key Sample Results 65 3082 A.4. Sample encoding of securityParameters 66