home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-snmpv3-v3mpc-model-06.txt < prev    next >
Text File  |  1997-10-30  |  91KB  |  2,353 lines

  1.  
  2.  
  3.  
  4. INTERNET-DRAFT                                                   J. Case
  5.                                                      SNMP Research, Inc.
  6.                                                            D. Harrington
  7.                                                  Cabletron Systems, Inc.
  8.                                                               R. Presuhn
  9.                                                       BMC Software, Inc.
  10.                                                                B. Wijnen
  11.                                                IBM T. J. Watson Research
  12.                                                          29 October 1997
  13.  
  14.  
  15.                Message Processing and Dispatching for the
  16.                Simple Network Management Protocol (SNMP)
  17.                   <draft-ietf-snmpv3-mpc-model-06.txt>
  18.  
  19. Status of this Memo
  20.  
  21.    This document is an Internet-Draft.  Internet-Drafts are working
  22.    documents of the Internet Engineering Task Force (IETF), its areas,
  23.    and its working groups.  Note that other groups may also distribute
  24.    working documents as Internet-Drafts.
  25.  
  26.    Internet-Drafts are draft documents valid for a maximum of six months
  27.    and may be updated, replaced, or obsoleted by other documents at any
  28.    time.  It is inappropriate to use Internet-Drafts as reference
  29.    material or to cite them other than as ``work in progress.''
  30.  
  31.    To learn the current status of any Internet-Draft, please check the
  32.    ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow
  33.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  34.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  35.    ftp.isi.edu (US West Coast).
  36.  
  37. Copyright Notice
  38.  
  39.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  40.  
  41. Abstract
  42.  
  43.    This document describes the Message Processing and Dispatching for
  44.    SNMP messages within the SNMP architecture [SNMP-ARCH].  It defines
  45.    the procedures for dispatching potentially multiple versions of SNMP
  46.    messages to the proper SNMP Message Processing Models, and for
  47.    dispatching PDUs to SNMP applications.  This document also describes
  48.    one Message Processing Model - the SNMPv3 Message Processing Model.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. SNMPv3 Working Group       Expires April 1998                   [Page 1]
  56.  
  57. Internet Draft     Message Processing and Dispatching    29 October 1997
  58.  
  59.  
  60. Table of Contents
  61.  
  62.    1. Introduction ................................................    3
  63.    2. Overview ....................................................    3
  64.    2.1. The Dispatcher.  ..........................................    5
  65.    2.2. Message Processing Subsystem ..............................    5
  66.    3. Elements of Message Processing and Dispatching ..............    5
  67.    3.1. messageProcessingModel ....................................    6
  68.    3.2. pduVersion ................................................    6
  69.    3.3. pduType ...................................................    7
  70.    3.4. sendPduHandle .............................................    7
  71.    4. Dispatcher Elements of Procedure ............................    8
  72.    4.1. Sending an SNMP Message to the Network ....................    8
  73.    4.1.1. Sending a Request or Notification .......................    8
  74.    4.1.2. Sending a Response to the Network .......................    9
  75.    4.2. Receiving an SNMP Message from the Network ................   11
  76.    4.2.1. Message Dispatching of received SNMP Messages ...........   11
  77.    4.2.2. PDU Dispatching for Incoming Messages ...................   12
  78.    4.2.2.1. Incoming Requests and Notifications ...................   12
  79.    4.2.2.2. Incoming Responses ....................................   14
  80.    4.3. Application Registration for Handling PDU types ...........   15
  81.    4.4. Application Unregistration for Handling PDU Types .........   16
  82.    5. Definitions .................................................   16
  83.    5.1. Definitions for SNMP Message Processing and Dispatching ...   16
  84.    6. The SNMPv3 Message Format ...................................   20
  85.    6.1. msgVersion ................................................   21
  86.    6.2. msgID .....................................................   21
  87.    6.3. msgMaxSize ................................................   21
  88.    6.4. msgFlags ..................................................   21
  89.    6.5. msgSecurityModel ..........................................   23
  90.    6.6. msgSecurityParameters .....................................   24
  91.    6.7. scopedPduData .............................................   24
  92.    6.8. scopedPDU .................................................   24
  93.    6.8.1. contextEngineID .........................................   24
  94.    6.8.2. contextName .............................................   24
  95.    6.8.3. data ....................................................   25
  96.    7. Elements of Procedure for v3MP ..............................   25
  97.    7.1. Prepare an Outgoing SNMP Message ..........................   25
  98.    7.2. Prepare Data Elements from an Incoming SNMP Message .......   31
  99.    8. Intellectual Property .......................................   37
  100.    9. Acknowledgements ............................................   37
  101.    10. Security Considerations ....................................   38
  102.    11. References .................................................   39
  103.    12. Editors' Addresses .........................................   40
  104.    13. Issues .....................................................   41
  105.    13.1. Open Issues ..............................................   41
  106.    13.2. Change Log ...............................................   41
  107.    14. Full Copyright Statement ...................................   42
  108.  
  109.  
  110.  
  111. SNMPv3 Working Group       Expires April 1998                   [Page 2]
  112.  
  113. Internet Draft     Message Processing and Dispatching    29 October 1997
  114.  
  115.  
  116. 1.  Introduction
  117.  
  118.    The Architecture for describing Internet Management Frameworks
  119.    [SNMP-ARCH] describes that an SNMP engine is composed of:
  120.  
  121.         1) a Dispatcher
  122.         2) a Message Processing Subsystem,
  123.         3) a Security Subsystem, and
  124.         4) an Access Control Subsystem.
  125.  
  126.    Applications make use of the services of these subsystems.
  127.  
  128.    It is important to understand the SNMP architecture and its
  129.    terminology to understand where the Message Processing Subsystem and
  130.    Dispatcher described in this document fit into the architecture and
  131.    interact with other subsystems within the architecture.  The reader
  132.    is expected to have read and understood the description of the SNMP
  133.    architecture, defined in [SNMP-ARCH].
  134.  
  135.    The Dispatcher in the SNMP engine sends and receives SNMP messages.
  136.    It also dispatches SNMP PDUs to SNMP applications. When an SNMP
  137.    message needs to be prepared or when data needs to be extracted from
  138.    an SNMP message, the Dispatcher delegates these tasks to a message
  139.    version-specific Message Processing Model within the Message
  140.    Processing Subsystem.
  141.  
  142.    A Message Processing Model is responsibile for processing a SNMP
  143.    version-specific message and for coordinating the interaction with
  144.    the Security Subsystem to ensure proper security is applied to the
  145.    SNMP message being handled.
  146.  
  147.    Interactions between the Dispatcher, the Message Processing
  148.    Subsystem, and applications are modelled using abstract data elements
  149.    and abstract service interface primitives defined by the SNMP
  150.    architecture.
  151.  
  152.    Similarly, interactions between the Message Processing Subsystem and
  153.    the Security Subsystem are modelled using abstract data elements and
  154.    abstract service interface primitives as defined by the SNMP
  155.    architecture.
  156.  
  157.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  158.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  159.    document are to be interpreted as described in RFC 2119.
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167. SNMPv3 Working Group       Expires April 1998                   [Page 3]
  168.  
  169. Internet Draft     Message Processing and Dispatching    29 October 1997
  170.  
  171.  
  172.  
  173. 2.  Overview
  174.  
  175.    The following illustration depicts the Message Processing in relation
  176.    to  SNMP applications, the Security Subsystem and Transport Mappings.
  177.  
  178.    +-------------------------------------------------------------------+
  179.    | SNMP Entity                                                       |
  180.    |                                                                   |
  181.    | +---------------------------------------------------------------+ |
  182.    | | Applications                                                  | |
  183.    | | +-----------+  +--------------+                               | |
  184.    | | | Command   |  | Notification |                               | |
  185.    | | | Generator |  | Originator   | +-----------+ +--------------+| |
  186.    | | +-----------+  +--------------+ | Proxy     | | Other         | |
  187.    | | +-----------+  +--------------+ | Forwarder | |Application(s)|| |
  188.    | | | Command   |  | Notification | +-----------+ +--------------+| |
  189.    | | | Responder |  | Receiver     |                               | |
  190.    | | +-----------+  +--------------+                               | |
  191.    | +---------------------------------------------------------------+ |
  192.    |        ^                ^               ^           ^             |
  193.    |        |                |               |           |             |
  194.    |        v                v               v           v             |
  195.    |        +--------+-------+---------------+-----------+             |
  196.    |                 ^                                                 |
  197.    |                 |    +---------------------+  +-----------------+ |
  198.    |                 |    | Message Processing  |  | Security        | |
  199.    | Dispatcher      v    | Subsystem           |  | Subsystem       | |
  200.    | +------------------+ |     +------------+  |  |                 | |
  201.    | | PDU Dispatcher   | |  +->| v1MP     * |<--->| +-------------+ | |
  202.    | |                  | |  |  +------------+  |  | | Other       | | |
  203.    | |                  | |  |  +------------+  |  | | Security    | | |
  204.    | |                  | |  +->| v2cMP    * |<--->| | Model       | | |
  205.    | | Message          | |  |  +------------+  |  | +-------------+ | |
  206.    | | Dispatcher  <-------->+                  |  |                 | |
  207.    | |                  | |  |  +------------+  |  | +-------------+ | |
  208.    | |                  | |  +->| v3MP     * |<--->| | User-based  | | |
  209.    | | Transport        | |  |  +------------+  |  | | Security    | | |
  210.    | | Mapping          | |  |  +------------+  |  | | Model       | | |
  211.    | | (e.g RFC1906)    | |  +->| otherMP  * |<--->| +-------------+ | |
  212.    | +------------------+ |     +------------+  |  |                 | |
  213.    |          ^           +---------------------+  +-----------------+ |
  214.    |          |                                                        |
  215.    +----------|--------------------------------------------------------+
  216.               v
  217.      +------------------+
  218.      |   Network        |
  219.      +------------------+
  220.  
  221.  
  222.  
  223. SNMPv3 Working Group       Expires April 1998                   [Page 4]
  224.  
  225. Internet Draft     Message Processing and Dispatching    29 October 1997
  226.  
  227.  
  228.  
  229. 2.1.  The Dispatcher.
  230.  
  231.    The Dispatcher is a key piece of an SNMP engine. There is only one in
  232.    an SNMP engine, and its job is to dispatch tasks to the multiple
  233.    version-specific Message Processing Models, and to dispatch PDUs to
  234.    various applications.
  235.  
  236.    For outgoing messages, an application provides a PDU to be sent, plus
  237.    the data needed to prepare and send the message, and the application
  238.    specifies which version-specific Message Processing Model will be
  239.    used to prepare the message with the desired security processing.
  240.    Once the message is prepared, the Dispatcher sends the message.
  241.  
  242.    For incoming messages, the Dispatcher determines the SNMP version of
  243.    the incoming message and passes the message to the version-specific
  244.    Message Processing Model to extract the components of the message and
  245.    to coordinate the processing of security services for the message.
  246.    After version-specific processing, the PDU Dispatcher determines
  247.    which application, if any, should receive the PDU for processing and
  248.    forwards it accordingly.
  249.  
  250.    The Dispatcher, while sending and receiving SNMP messages, collects
  251.    statistics about SNMP messages and the behavior of the SNMP engine in
  252.    managed objects to make them accessible to remote SNMP entities.
  253.    This document defines these managed objects, the MIB module which
  254.    contains them, and how these managed objects might be used to provide
  255.    useful management.
  256.  
  257. 2.2.  Message Processing Subsystem
  258.  
  259.    The SNMP Message Processing Subsystem is the part of an SNMP engine
  260.    which interacts with the Dispatcher to handle the version-specific
  261.    SNMP messages. It contains one or more Message Processing Models.
  262.  
  263.    This document describes one Message Processing Model, the SNMPv3
  264.    Message Processing Model, in Section 6. The SNMPv3 Message Processing
  265.    Model is defined in a separate section to show that multiple
  266.    (independent) Message Processing Models can exist at the same time
  267.    and that such Models can be described in different documents. The
  268.    SNMPv3 Message Processing Model can be replaced or supplemented with
  269.    other Message Processing Models in the future. Two Message Processing
  270.    Models which are expected to be developed in the future are the
  271.    SNMPv1 message format [RFC1157] and the SNMPv2c message format
  272.    [RFC1901].  Others may be developed as needed.
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279. SNMPv3 Working Group       Expires April 1998                   [Page 5]
  280.  
  281. Internet Draft     Message Processing and Dispatching    29 October 1997
  282.  
  283.  
  284.  
  285. 3.  Elements of Message Processing and Dispatching
  286.  
  287.    See [SNMP-ARCH] for the definitions of
  288.            contextEngineID
  289.            contextName
  290.            scopedPDU
  291.            maxSizeResponseScopedPDU
  292.            securityModel
  293.            securityName
  294.            securityLevel
  295.            messageProcessingModel
  296.  
  297.    For incoming messages, a version-specific message processing module
  298.    provides these values to the Dispatcher. For outgoing messages, an
  299.    application provides these values to the Dispatcher.
  300.  
  301.    For some version-specific processing, the values may be extracted
  302.    from received messages; for other versions, the values may be
  303.    determined by algorithm, or by an implementation-defined mechanism.
  304.    The mechanism by which the value is determined is irrelevant to the
  305.    Dispatcher.
  306.  
  307.    The following additional or expanded definitions are for use within
  308.    the Dispatcher.
  309.  
  310. 3.1.  messageProcessingModel
  311.  
  312.    The value of messageProcessingModel identifies a Message Processing
  313.    Model.  A Message Processing Model describes the version-specific
  314.    procedures for extracting data from messages, generating messages,
  315.    calling upon a securityModel to apply its security services to
  316.    messages, for converting data from a version-specific message format
  317.    into a generic format usable by the Dispatcher, and for converting
  318.    data from Dispatcher format into a version-specific message format.
  319.  
  320. 3.2.  pduVersion
  321.  
  322.    The value of pduVersion represents a specific version of protocol
  323.    operation and its associated PDU formats, such as SNMPv1 or SNMPv2
  324.    [RFC1905].  The values of pduVersion are specific to the version of
  325.    the PDU contained in a message, and the PDUs processed by
  326.    applications. The Dispatcher does not use the value of pduVersion
  327.    directly.
  328.  
  329.    An application specifies the pduVersion when it requests the PDU
  330.    Dispatcher to send a PDU to another SNMP engine. The Dispatcher
  331.    passes the pduVersion to a Message Processing Model, so it knows how
  332.  
  333.  
  334.  
  335. SNMPv3 Working Group       Expires April 1998                   [Page 6]
  336.  
  337. Internet Draft     Message Processing and Dispatching    29 October 1997
  338.  
  339.  
  340.    to handle the PDU properly.
  341.  
  342.    For incoming messages, pduVersion is provided to the Dispatcher by a
  343.    version-specific Message Processing module. The PDU Dispatcher passes
  344.    the pduVersion to the application so it knows how to handle the PDU
  345.    properly.  For example, a command responder application needs to know
  346.    whether to use [RFC1905] elements of procedure and syntax instead of
  347.    those specified for SNMPv1.
  348.  
  349. 3.3.  pduType
  350.  
  351.    A value of pduType represents a specific type of protocol operation.
  352.    The values of pduType are specific to the version of the PDU
  353.    contained in a message.
  354.  
  355.    Applications register to support particular pduTypes for particular
  356.    contextEngineIDs.
  357.  
  358.    For incoming messages, pduType is provided to the Dispatcher by a
  359.    version-specific Message Processing module. It is subsequently used
  360.    to dispatch the PDU to the application which registered for the
  361.    pduType for the contextEngineID of the associated scopedPDU.
  362.  
  363. 3.4.  sendPduHandle
  364.  
  365.    This handle is generated for coordinating the processing of requests
  366.    and responses between the SNMP engine and an application. The handle
  367.    must be unique across all version-specific Message Processing Models,
  368.    and is of local significance only.
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391. SNMPv3 Working Group       Expires April 1998                   [Page 7]
  392.  
  393. Internet Draft     Message Processing and Dispatching    29 October 1997
  394.  
  395.  
  396. 4.  Dispatcher Elements of Procedure
  397.  
  398.    This section describes the procedures followed by the Dispatcher when
  399.    generating and processing SNMP messages.
  400.  
  401. 4.1.  Sending an SNMP Message to the Network
  402.  
  403.    This section describes the procedure followed by an SNMP engine
  404.    whenever it sends an SNMP message.
  405.  
  406. 4.1.1.  Sending a Request or Notification
  407.  
  408.    The following procedures are followed by the Dispatcher when an
  409.    application wants to send an SNMP PDU to another (remote)
  410.    application, i.e., to initiate a communication by originating a
  411.    message, such as one containing a request or a trap.
  412.  
  413.    1) The application requests this using the abstract service
  414.       primitive:
  415.  
  416.        statusInformation =              -- sendPduHandle if success
  417.                                         -- errorIndication if failure
  418.          sendPdu(
  419.          IN   transportDomain           -- transport domain to be used
  420.          IN   transportAddress          -- destination network address
  421.          IN   messageProcessingModel    -- typically, SNMP version
  422.          IN   securityModel             -- Security Model to use
  423.          IN   securityName              -- on behalf of this principal
  424.          IN   securityLevel             -- Level of Security requested
  425.          IN   contextEngineID           -- data from/at this entity
  426.          IN   contextName               -- data from/in this context
  427.          IN   pduVersion                -- the version of the PDU
  428.          IN   PDU                       -- SNMP Protocol Data Unit
  429.          IN   expectResponse            -- TRUE or FALSE
  430.               )
  431.  
  432.    2) If the messageProcessingModel value does not represent a Message
  433.       Processing Model known to the Dispatcher, then an errorIndication
  434.       (implementation-dependent) is returned to the calling application.
  435.       No further processing is performed.
  436.  
  437.    3) The Dispatcher generates a sendPduHandle to coordinate subsequent
  438.       processing.
  439.  
  440.    4) The Message Dispatcher sends the request to the version-specific
  441.       Message Processing module identified by messageProcessingModel
  442.       using the abstract service primitive:
  443.  
  444.  
  445.  
  446.  
  447. SNMPv3 Working Group       Expires April 1998                   [Page 8]
  448.  
  449. Internet Draft     Message Processing and Dispatching    29 October 1997
  450.  
  451.  
  452.       statusInformation =              - success or error indication
  453.         prepareOutgoingMessage(
  454.         IN   transportDomain           -- as specified by application
  455.         IN   transportAddress          -- as specified by application
  456.         IN   messageProcessingModel    -- as specified by application
  457.         IN   securityModel             -- as specified by application
  458.         IN   securityName              -- as specified by application
  459.         IN   securityLevel             -- as specified by application
  460.         IN   contextEngineID           -- as specified by application
  461.         IN   contextName               -- as specified by application
  462.         IN   pduVersion                -- the version of the PDU
  463.         IN   PDU                       -- as specified by application
  464.         IN   expectResponse            -- as specified by application
  465.         IN   sendPduHandle             -- as determined in step 3.
  466.         OUT  destTransportDomain       -- destination transport domain
  467.         OUT  destTransportAddress      -- destination transport address
  468.         OUT  outgoingMessage           -- the message to send
  469.         OUT  outgoingMessageLength     -- the message length
  470.              )
  471.  
  472.    5) If the statusInformation indicates an error, the errorIndication
  473.       is returned to the calling application.  No further processing is
  474.       performed.
  475.  
  476.    6) If the statusInformation indicates success, the sendPduHandle is
  477.       returned to the application, and the outgoingMessage is sent via
  478.       the transport specified by the transportDomain to the address
  479.       specified by the transportAddress.
  480.  
  481.    Outgoing Message Processing is complete.
  482.  
  483.  
  484. 4.1.2.  Sending a Response to the Network
  485.  
  486.    The following procedure is followed when an application wants to
  487.    return a response back to the originator of an SNMP Request.
  488.  
  489.    1) An application can request this using the abstract service
  490.       primitive:
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503. SNMPv3 Working Group       Expires April 1998                   [Page 9]
  504.  
  505. Internet Draft     Message Processing and Dispatching    29 October 1997
  506.  
  507.  
  508.       returnResponsePDU(
  509.        IN   messageProcessingModel   -- typically, SNMP version
  510.        IN   securityModel            -- Security Model in use
  511.        IN   securityName             -- on behalf of this principal
  512.        IN   securityLevel            -- same as on incoming request
  513.        IN   contextEngineID          -- data from/at this SNMP entity
  514.        IN   contextName              -- data from/in this context
  515.        IN   pduVersion               -- the version of the PDU
  516.        IN   PDU                      -- SNMP Protocol Data Unit
  517.        IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  518.        IN   stateReference           -- reference to state information
  519.                                      -- as presented with the request
  520.        IN   statusInformation        -- success or errorIndication
  521.        )                             -- (error counter OID and value
  522.                                      -- when errorIndication)
  523.  
  524.    2) The Message Dispatcher sends the request to the appropriate
  525.       Message Processing Model indicated by the received value of
  526.       messageProcessingModel using the abstract service primitive:
  527.  
  528.       result =                        -- SUCCESS or errorIndication
  529.        prepareResponseMessage(
  530.        IN   messageProcessingModel   -- specified by application
  531.        IN   securityModel            -- specified by application
  532.        IN   securityName             -- specified by application
  533.        IN   securityLevel            -- specified by application
  534.        IN   contextEngineID          -- specified by application
  535.        IN   contextName              -- specified by application
  536.        IN   pduVersion               -- specified by application
  537.        IN   PDU                      -- specified by application
  538.        IN   maxSizeResponseScopedPDU -- specified by application
  539.        IN   stateReference           -- specified by application
  540.        IN   statusInformation        -- specified by application
  541.        OUT  destTransportDomain      -- destination transport domain
  542.        OUT  destTransportAddress     -- destination transport address
  543.        OUT  outgoingMessage          -- the message to send
  544.        OUT  outgoingMessageLength    -- the message length
  545.             )
  546.  
  547.    3) If the result is an errorIndication, the errorIndication is
  548.       returned to the calling application.  No further processing is
  549.       performed.
  550.  
  551.    4) If the result is success, the outgoingMessage is sent over the
  552.       transport specified by the transportDomain to the address
  553.       specified by the transportAddress.
  554.  
  555.    Message Processing is complete.
  556.  
  557.  
  558.  
  559. SNMPv3 Working Group       Expires April 1998                  [Page 10]
  560.  
  561. Internet Draft     Message Processing and Dispatching    29 October 1997
  562.  
  563.  
  564. 4.2.  Receiving an SNMP Message from the Network
  565.  
  566.    This section describes the procedure followed by an SNMP engine
  567.    whenever it receives an SNMP message.
  568.  
  569.    Please note, that for the sake of clarity and to prevent the text
  570.    from being even longer and more complicated, some details were
  571.    omitted from the steps below.  In particular, The elements of
  572.    procedure do not always explicitly indicate when state information
  573.    needs to be released. The general rule is that if state information
  574.    is available when a message is to be "discarded without further
  575.    processing", then the state information must also be released at that
  576.    same time.
  577.  
  578. 4.2.1.  Message Dispatching of received SNMP Messages
  579.  
  580.    1) The snmpInPkts counter [RFC1907] is incremented.
  581.  
  582.    2) The version of the SNMP message is determined in an
  583.       implementation-dependent manner.  If the packet cannot be
  584.       sufficiently parsed to determine the version of the SNMP message,
  585.       then the snmpInASNParseErrs [RFC1907] counter is incremented, and
  586.       the message is discarded without further processing.  If the
  587.       version is not supported, then the snmpInBadVersions [RFC1907]
  588.       counter is incremented, and the message is discarded without
  589.       further processing.
  590.  
  591.    3) The origin transportDomain and origin transportAddress are
  592.       determined.
  593.  
  594.    4) The message is passed to the version-specific Message Processing
  595.       Model which returns the abstract data elements required by the
  596.       Dispatcher.  This is performed using the abstract service
  597.       primitive:
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615. SNMPv3 Working Group       Expires April 1998                  [Page 11]
  616.  
  617. Internet Draft     Message Processing and Dispatching    29 October 1997
  618.  
  619.  
  620.       result =                        -- SUCCESS or errorIndication
  621.         prepareDataElements(
  622.         IN   transportDomain          -- origin as determined in step 3.
  623.         IN   transportAddress         -- origin as determined in step 3.
  624.         IN   wholeMsg                 -- as received from the network
  625.         IN   wholeMsgLength           -- as received from the network
  626.         OUT  messageProcessingModel   -- typically, SNMP version
  627.         OUT  securityModel            -- Security Model to use
  628.         OUT  securityName             -- on behalf of this principal
  629.         OUT  securityLevel            -- Level of Security requested
  630.         OUT  contextEngineID          -- data from/at this entity
  631.         OUT  contextName              -- data from/in this context
  632.         OUT  pduVersion               -- the version of the PDU
  633.         OUT  PDU                      -- SNMP Protocol Data Unit
  634.         OUT  pduType                  -- SNMP PDU type
  635.         OUT  sendPduHandle            -- handle for a matched request
  636.         OUT  maxSizeResponseScopedPDU -- maximum size of Response PDU
  637.         OUT  statusInformation        -- success or errorIndication
  638.                                       -- (error counter OID and value
  639.                                       -- when errorIndication)
  640.         OUT  stateReference           -- reference to state information
  641.                                       -- to be used for a possible
  642.              )                        -- Response
  643.  
  644.    5) If the result is a FAILURE errorIndication, the message is
  645.       discarded without further processing.
  646.  
  647.    6) At this point, the abstract data elements have been prepared and
  648.       processing continues as described in Section 4.2.2, PDU
  649.       Dispatching for Incoming Messages.
  650.  
  651. 4.2.2.  PDU Dispatching for Incoming Messages
  652.  
  653.    The elements of procedure for the dispatching of PDUs depends on the
  654.    value of sendPduHandle.  If the value of sendPduHandle is <none>,
  655.    then this is a request or notification and the procedures specified
  656.    in Section 4.2.2.1 apply.  If the value of snmpPduHandle is not
  657.    <none>, then this is a response and the procedures specified in
  658.    Section 4.2.2.2 apply.
  659.  
  660. 4.2.2.1.  Incoming Requests and Notifications
  661.  
  662.    The following procedures are followed for the dispatching of PDUs
  663.    when the value of sendPduHandle is <none>, indicating this is a
  664.    request or notification.
  665.  
  666.    1) The combination of contextEngineID and pduType is used to
  667.       determine which application has registered for this request or
  668.  
  669.  
  670.  
  671. SNMPv3 Working Group       Expires April 1998                  [Page 12]
  672.  
  673. Internet Draft     Message Processing and Dispatching    29 October 1997
  674.  
  675.  
  676.       notification.
  677.  
  678.    2) If no application has registered for the combination, then
  679.  
  680.       a) The snmpUnknownPDUHandlers counter is incremented.
  681.  
  682.       b) A Response message is generated using the abstract service
  683.          primitive:
  684.  
  685.          result =                         -- SUCCESS or FAILURE
  686.          prepareResponseMessage(
  687.          IN   messageProcessingModel    -- as provided by MP module
  688.          IN   securityModel             -- as provided by MP module
  689.          IN   securityName              -- as provided by MP module
  690.          IN   securityLevel             -- as provided by MP module
  691.          IN   contextEngineID           -- as provided by MP module
  692.          IN   contextName               -- as provided by MP module
  693.          IN   pduVersion                -- as provided by MP module
  694.          IN   PDU                       -- as provided by MP module
  695.          IN   maxSizeResponseScopedPDU  -- as provided by MP module
  696.          IN   stateReference            -- as provided by MP module
  697.          IN   statusInformation         -- errorIndication plus
  698.                                         -- snmpUnknownPDUHandlers OID
  699.                                         -- value pair.
  700.          OUT  transportDomain           -- destination transportDomain
  701.          OUT  transportAddress          -- destination transportAddress
  702.          OUT  outgoingMessage           -- the message to send
  703.          OUT  outgoingMessageLength     -- its length
  704.          )
  705.  
  706.       c) If the result is SUCCESS, then the prepared message is sent to
  707.          the originator of the request as identified by the
  708.          transportDomain and transportAddress.
  709.  
  710.       d) The incoming message is discarded without further processing.
  711.          Message Processing for this message is complete.
  712.  
  713.    3) The PDU is dispatched to the application, using the abstract
  714.       service primitive:
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727. SNMPv3 Working Group       Expires April 1998                  [Page 13]
  728.  
  729. Internet Draft     Message Processing and Dispatching    29 October 1997
  730.  
  731.  
  732.       processPdu(                     -- process Request/Notification
  733.         IN   messageProcessingModel   -- as provided by MP module
  734.         IN   securityModel            -- as provided by MP module
  735.         IN   securityName             -- as provided by MP module
  736.         IN   securityLevel            -- as provided by MP module
  737.         IN   contextEngineID          -- as provided by MP module
  738.         IN   contextName              -- as provided by MP module
  739.         IN   pduVersion               -- as provided by MP module
  740.         IN   PDU                      -- as provided by MP module
  741.         IN   maxSizeResponseScopedPDU -- as provided by MP module
  742.         IN   stateReference           -- as provided by MP module
  743.                                       -- needed when sending response
  744.              )
  745.  
  746.       Message processing for this message is complete.
  747.  
  748. 4.2.2.2.  Incoming Responses
  749.  
  750.    The following procedures are followed for the dispatching of PDUs
  751.    when the value of sendPduHandle is not <none>, indicating this is a
  752.    response.
  753.  
  754.       1) The value of sendPduHandle is used to determine, in an
  755.          implementation-defined manner, which application is waiting for
  756.          a response PDU associated with this sendPduHandle.
  757.  
  758.       2) If no waiting application is found, the message is discarded
  759.          without further processing, and the stateReference is released.
  760.          The snmpUnknownPDUHandlers counter is incremented.  Message
  761.          Processing is complete for this message.
  762.  
  763.       3) Any cached information, including stateReference, about the
  764.          message is discarded.
  765.  
  766.       4) The response is dispatched to the application using the
  767.          abstract service primitive:
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783. SNMPv3 Working Group       Expires April 1998                  [Page 14]
  784.  
  785. Internet Draft     Message Processing and Dispatching    29 October 1997
  786.  
  787.  
  788.          processResponsePdu(              -- process Response PDU
  789.            IN   messageProcessingModel    -- provided by the MP module
  790.            IN   securityModel             -- provided by the MP module
  791.            IN   securityName              -- provided by the MP module
  792.            IN   securityLevel             -- provided by the MP module
  793.            IN   contextEngineID           -- provided by the MP module
  794.            IN   contextName               -- provided by the MP module
  795.            IN   pduVersion                -- provided by the MP module
  796.            IN   PDU                       -- provided by the MP module
  797.            IN   statusInformation         -- provided by the MP module
  798.            IN   sendPduHandle             -- provided by the MP module
  799.                 )
  800.  
  801.          Message Processing is complete for this message.
  802.  
  803. 4.3.  Application Registration for Handling PDU types
  804.  
  805.    Applications that want to process certain PDUs must register with the
  806.    PDU Dispatcher. Applications specify the combination of
  807.    contextEngineID and pduType(s) for which they want to take
  808.    responsibility
  809.  
  810.    1) An application registers according to the abstract interface
  811.       primitive:
  812.  
  813.       statusInformation =           -- success or errorIndication
  814.         registerContextEngineID(
  815.         IN   contextEngineID        -- take responsibility for this one
  816.         IN   pduType                -- the pduType(s) to be registered
  817.              )
  818.  
  819.       Note: implementations may provide a means of requesting
  820.       registration for simultaneous multiple contextEngineID values,
  821.       e.g., all contextEngineID values, and may also provide means for
  822.       requesting simultaneous registration for multiple values of
  823.       pduType.
  824.  
  825.    2) The parameters may be checked for validity; if they are not, then
  826.       an errorIndication (invalidParameter) is returned to the
  827.       application.
  828.  
  829.    3) Each combination of contextEngineID and pduType can be registered
  830.       only once.  If another application has already registered for the
  831.       specified combination, then an errorIndication (alreadyRegistered)
  832.       is returned to the application.
  833.  
  834.    4) Otherwise, the registration is saved so that SNMP PDUs can be
  835.       dispatched to this application.
  836.  
  837.  
  838.  
  839. SNMPv3 Working Group       Expires April 1998                  [Page 15]
  840.  
  841. Internet Draft     Message Processing and Dispatching    29 October 1997
  842.  
  843.  
  844. 4.4.  Application Unregistration for Handling PDU Types
  845.  
  846.    Applications that no longer want to process certain PDUs must
  847.    unregister with the PDU Dispatcher.
  848.  
  849.    1) An application unregisters using the abstract service primitive:
  850.  
  851.       unregisterContextEngineID(
  852.        IN   contextEngineID        -- give up responsibility for this
  853.        IN   pduType                -- the pduType(s) to be unregistered
  854.              )
  855.       Note: implementations may provide means for requesting
  856.       unregistration for simultaneous multiple contextEngineID values,
  857.       e.g., all contextEngineID values, and may also provide means for
  858.       requesting simultaneous unregistration for multiple values of
  859.       pduType.
  860.  
  861.    2) If the contextEngineID and pduType combination has been
  862.       registered, then the registration is deleted.
  863.  
  864.       If no such registration exists, then the request is ignored.
  865.  
  866. 5.  Definitions
  867.  
  868. 5.1.  Definitions for SNMP Message Processing and Dispatching
  869.  
  870.    SNMP-MPD-MIB DEFINITIONS ::= BEGIN
  871.  
  872.    IMPORTS
  873.        MODULE-COMPLIANCE, OBJECT-GROUP         FROM SNMPv2-CONF
  874.        MODULE-IDENTITY, OBJECT-TYPE,
  875.        snmpModules, Counter32                  FROM SNMPv2-SMI;
  876.  
  877.    snmpMPDMIB MODULE-IDENTITY
  878.        LAST-UPDATED "9710090000Z"              -- 9 October 1997
  879.        ORGANIZATION "SNMPv3 Working Group"
  880.        CONTACT-INFO "WG-email:   snmpv3@tis.com
  881.                      Subscribe:  majordomo@tis.com
  882.                                  In message body:  subscribe snmpv3
  883.  
  884.                      Chair:      Russ Mundy
  885.                                  Trusted Information Systems
  886.                      postal:     3060 Washington Road
  887.                                  Glenwood, MD 21738
  888.                                  USA
  889.                      email:      mundy@tis.com
  890.                      phone:      +1 301-854-6889
  891.  
  892.  
  893.  
  894.  
  895. SNMPv3 Working Group       Expires April 1998                  [Page 16]
  896.  
  897. Internet Draft     Message Processing and Dispatching    29 October 1997
  898.  
  899.  
  900.                      Co-editor:  Jeffrey Case
  901.                                  SNMP Research, Inc.
  902.                      postal:     3001 Kimberlin Heights Road
  903.                                  Knoxville, TN 37920-9716
  904.                                  USA
  905.                      email:      case@snmp.com
  906.                      phone:      +1 423-573-1434
  907.  
  908.                      Co-editor   Dave Harrington
  909.                                  Cabletron Systems, Inc.
  910.                      postal:     Post Office Box 5005
  911.                                  MailStop: Durham
  912.                                  35 Industrial Way
  913.                                  Rochester, NH 03867-5005
  914.                                  USA
  915.                      email:      dbh@cabletron.com
  916.                      phone:      +1 603-337-7357
  917.  
  918.                      Co-editor:  Randy Presuhn
  919.                                  BMC Software, Inc.
  920.                      postal:     1190 Saratoga Ave, Suite 190
  921.                                  San Jose, CA 95120
  922.                                  USA
  923.                      email:      rpresuhn@bmc.com
  924.                      phone:      +1 408-556-0720
  925.  
  926.                      Co-editor:  Bert Wijnen
  927.                                  IBM T. J. Watson Research
  928.                      postal:     Schagen 33
  929.                                  3461 GL Linschoten
  930.                                  Netherlands
  931.                      email:      wijnen@vnet.ibm.com
  932.                      phone:      +31 348-432-794
  933.  
  934.                     "
  935.        DESCRIPTION  "The MIB for Message Processing and Dispatching"
  936.        ::= { snmpModules 8 }  -- check if assignment is OK
  937.  
  938.    -- Administrative assignments ***************************************
  939.  
  940.    snmpMPDAdmin           OBJECT IDENTIFIER ::= { snmpMPDMIB 1 }
  941.    snmpMPDMIBObjects      OBJECT IDENTIFIER ::= { snmpMPDMIB 2 }
  942.    snmpMPDMIBConformance  OBJECT IDENTIFIER ::= { snmpMPDMIB 3 }
  943.  
  944.    -- Statistics for SNMP Messages *************************************
  945.  
  946.    snmpMPDStats           OBJECT IDENTIFIER ::= { snmpMPDMIBObjects 1 }
  947.  
  948.  
  949.  
  950.  
  951. SNMPv3 Working Group       Expires April 1998                  [Page 17]
  952.  
  953. Internet Draft     Message Processing and Dispatching    29 October 1997
  954.  
  955.  
  956.    snmpUnknownSecurityModels OBJECT-TYPE
  957.        SYNTAX       Counter32
  958.        MAX-ACCESS   read-only
  959.        STATUS       current
  960.        DESCRIPTION "The total number of packets received by the SNMP
  961.                     engine which were dropped because they referenced a
  962.                     securityModel that was not known to or supported by
  963.                     the SNMP engine.
  964.                    "
  965.        ::= { snmpMPDStats 1 }
  966.  
  967.    snmpInvalidMsgs OBJECT-TYPE
  968.        SYNTAX       Counter32
  969.        MAX-ACCESS   read-only
  970.        STATUS       current
  971.        DESCRIPTION "The total number of packets received by the SNMP
  972.                     engine which were dropped because there were invalid
  973.                     or inconsistent components in the SNMP message.
  974.                    "
  975.        ::= { snmpMPDStats 2 }
  976.  
  977.    snmpUnknownPDUHandlers OBJECT-TYPE
  978.        SYNTAX       Counter32
  979.        MAX-ACCESS   read-only
  980.        STATUS       current
  981.        DESCRIPTION "The total number of packets received by the SNMP
  982.                     engine which were dropped because the PDU contained
  983.                     in the packet could not be passed to an application
  984.                     responsible for handling the pduType, e.g. no SNMP
  985.                     application had registered for the proper
  986.                     combination of the contextEngineID and the pduType.
  987.                    "
  988.        ::= { snmpMPDStats 3 }
  989.  
  990.    -- Conformance information ******************************************
  991.  
  992.    snmpMPDMIBCompliances OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 1}
  993.    snmpMPDMIBGroups      OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 2}
  994.  
  995.    -- Compliance statements
  996.  
  997.    snmpMPDCompliance MODULE-COMPLIANCE
  998.        STATUS       current
  999.        DESCRIPTION "The compliance statement for SNMP entities which
  1000.                     implement the SNMP-MPD-MIB.
  1001.                    "
  1002.  
  1003.        MODULE    -- this module
  1004.  
  1005.  
  1006.  
  1007. SNMPv3 Working Group       Expires April 1998                  [Page 18]
  1008.  
  1009. Internet Draft     Message Processing and Dispatching    29 October 1997
  1010.  
  1011.  
  1012.            MANDATORY-GROUPS { snmpMPDGroup }
  1013.  
  1014.        ::= { snmpMPDMIBCompliances 1 }
  1015.  
  1016.    snmpMPDGroup OBJECT-GROUP
  1017.        OBJECTS {
  1018.                  snmpUnknownSecurityModels,
  1019.                  snmpInvalidMsgs,
  1020.                  snmpUnknownPDUHandlers
  1021.                }
  1022.        STATUS       current
  1023.        DESCRIPTION "A collection of objects providing for remote
  1024.                     monitoring of the SNMP Message Processing and
  1025.                     Dispatching process.
  1026.                    "
  1027.        ::= { snmpMPDMIBGroups 1 }
  1028.  
  1029.    END
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063. SNMPv3 Working Group       Expires April 1998                  [Page 19]
  1064.  
  1065. Internet Draft     Message Processing and Dispatching    29 October 1997
  1066.  
  1067.  
  1068. 6.  The SNMPv3 Message Format
  1069.  
  1070.    This section defines the SNMPv3 message format and the corresponding
  1071.    SNMP version 3 Message Processing Model (v3MP).
  1072.  
  1073.    SNMPv3MessageSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
  1074.  
  1075.        SNMPv3Message ::= SEQUENCE {
  1076.            -- identify the layout of the SNMPv3Message
  1077.            -- this element is in same position as in SNMPv1
  1078.            -- and SNMPv2c, allowing recognition
  1079.            msgVersion INTEGER { snmpv3 (3) },
  1080.            -- administrative parameters
  1081.            msgGlobalData HeaderData,
  1082.            -- security model-specific parameters
  1083.            -- format defined by Security Model
  1084.            msgSecurityParameters OCTET STRING,
  1085.            msgData  ScopedPduData
  1086.        }
  1087.  
  1088.        HeaderData ::= SEQUENCE {
  1089.            msgID      INTEGER (0..2147483647),
  1090.            msgMaxSize INTEGER (484..2147483647),
  1091.  
  1092.            msgFlags   OCTET STRING (SIZE(1)),
  1093.                       --  .... ...1   authFlag
  1094.                       --  .... ..1.   privFlag
  1095.                       --  .... .1..   reportableFlag
  1096.                       --              Please observe:
  1097.                       --  .... ..00   is OK, means noAuthNoPriv
  1098.                       --  .... ..01   is OK, means authNoPriv
  1099.                       --  .... ..10   reserved, must NOT be used.
  1100.                       --  .... ..11   is OK, means authPriv
  1101.  
  1102.            msgSecurityModel INTEGER (0..2147483647)
  1103.        }
  1104.  
  1105.        ScopedPduData ::= CHOICE {
  1106.            plaintext    ScopedPDU,
  1107.            encryptedPDU OCTET STRING  -- encrypted scopedPDU value
  1108.        }
  1109.  
  1110.        ScopedPDU ::= SEQUENCE {
  1111.            contextEngineID  OCTET STRING,
  1112.            contextName      OCTET STRING,
  1113.            data             ANY -- e.g., PDUs as defined in RFC1905
  1114.        }
  1115.    END
  1116.  
  1117.  
  1118.  
  1119. SNMPv3 Working Group       Expires April 1998                  [Page 20]
  1120.  
  1121. Internet Draft     Message Processing and Dispatching    29 October 1997
  1122.  
  1123.  
  1124.  
  1125. 6.1.  msgVersion
  1126.  
  1127.    The msgVersion field is set to snmpv3(3) and identifies the message
  1128.    as an SNMP version 3 Message.
  1129.  
  1130. 6.2.  msgID
  1131.  
  1132.    The msgID is used between two SNMP entities to coordinate request
  1133.    messages and responses, and by the v3MP to coordinate the processing
  1134.    of the message by different subsystem models within the architecture.
  1135.  
  1136.    Values for msgID should be generated in a manner that avoids re-use
  1137.    of any outstanding values.  Doing so provides protection against some
  1138.    replay attacks.  One possible implementation strategy would be to use
  1139.    the low-order bits of snmpEngineBoots [SNMP-ARCH] as the high-order
  1140.    portion of the msgID value and a monotonically increasing integer for
  1141.    the low-order portion of msgID.
  1142.  
  1143.    Note that the request-id in a PDU is used by SNMP applications to
  1144.    identify the PDU; the msgID is used by the engine to identify the
  1145.    message which carries a PDU. The engine may need to identify the
  1146.    message even if decrypting of the PDU (and request-id) fails. No
  1147.    assumption should be made that the value of the msgID and the value
  1148.    of the request-id are equivalent.
  1149.  
  1150. 6.3.  msgMaxSize
  1151.  
  1152.    The msgMaxSize field of the message conveys the maximum message size
  1153.    supported by the sender of the message, i.e., the maximum message
  1154.    size that the sender can accept when another SNMP engine sends an
  1155.    SNMP message (be it a response or any other message) to the sender of
  1156.    this message.
  1157.  
  1158.    When an SNMP message is being generated, the msgMaxSize is provided
  1159.    by the SNMP engine which generates the message.  At the receiving
  1160.    SNMP engine, the msgMaxSize is used to determine how big the Response
  1161.    to a Request message can be.
  1162.  
  1163. 6.4.  msgFlags
  1164.  
  1165.    The msgFlags field of the message contains several bit fields which
  1166.    control processing of the message.
  1167.  
  1168.    When the reportableFlag is one, a Report PDU must be returned to the
  1169.    sender under those conditions which can cause the generation of
  1170.    Report PDUs.  When the reportableFlag is zero, then a Report PDU must
  1171.    not be sent.  The reportableFlag must always be zero when the message
  1172.  
  1173.  
  1174.  
  1175. SNMPv3 Working Group       Expires April 1998                  [Page 21]
  1176.  
  1177. Internet Draft     Message Processing and Dispatching    29 October 1997
  1178.  
  1179.  
  1180.    contains a Report PDU, a response-type PDU (such as a Response PDU),
  1181.    or an unacknowledged notification-type PDU (such as an SNMPv2-trap
  1182.    PDU).  The reportableFlag must always be one for a request-type PDU
  1183.    (such as a Get PDU) and an acknowledged notification-type PDU (such
  1184.    as an Inform PDU).
  1185.  
  1186.    If the reportableFlag is set to one for a message containing a Report
  1187.    PDU, a response-type PDU (such as a Response PDU), or an
  1188.    unacknowledged notification-type PDU (such as an SNMPv2-trap PDU),
  1189.    then the receiver of that message must process it as though the
  1190.    reportableFlag had been set to zero.
  1191.  
  1192.    If the reportableFlag is set to zero for a message containing a
  1193.    request-type PDU (such as a Get PDU) or an acknowledged notification-
  1194.    type PDU (such as an Inform PDU), then the receiver of that message
  1195.    must process it as though the reportableFlag had been set to one.
  1196.  
  1197.    Report PDUs are engine-to-engine communications and are processed
  1198.    directly by the SNMPv3 Message Processing Model, and are generally
  1199.    not passed to applications for processing, unlike all other PDU
  1200.    types.
  1201.  
  1202.    Note that the reportableFlag is a secondary aid in determining
  1203.    whether a Report PDU must be sent.  It is only used in cases where
  1204.    the PDU portion of a message cannot be decoded, due to, for example,
  1205.    an incorrect ecryption key.  If the PDU can be decoded, the PDU type
  1206.    forms the basis for decisions on sending Report PDUs.
  1207.  
  1208.    The authFlag and privFlag portions of the msgFlags field are set by
  1209.    the sender to indicate the securityLevel that was applied to the
  1210.    message before it was sent on the wire.  The receiver of the message
  1211.    must apply the same securityLevel when the message is received and
  1212.    the contents are being processed.
  1213.  
  1214.    There are three securityLevels, namely noAuthNoPriv, which is less
  1215.    than authNoPriv, which is in turn less than authPriv.  See the SNMP
  1216.    architecture document [SNMP-ARCH] for details about the
  1217.    securityLevel.
  1218.  
  1219.    a) authFlag
  1220.  
  1221.       If the authFlag is set to one, then the securityModel used by the
  1222.       SNMP engine which sent the message must identify the securityName
  1223.       on whose behalf the SNMP message was generated and must provide,
  1224.       in a securityModel-specific manner, sufficient data for the
  1225.       receiver of the message to be able to authenticate that
  1226.       identification.  In general, this authentication will allow the
  1227.       receiver to determine with reasonable certainty that the message
  1228.  
  1229.  
  1230.  
  1231. SNMPv3 Working Group       Expires April 1998                  [Page 22]
  1232.  
  1233. Internet Draft     Message Processing and Dispatching    29 October 1997
  1234.  
  1235.  
  1236.       was:
  1237.  
  1238.       -  sent on behalf of the principal associated with the
  1239.          securityName,
  1240.  
  1241.       -  was not redirected,
  1242.  
  1243.       -  was not modified in transit, and
  1244.  
  1245.       -  was not replayed.
  1246.  
  1247.       If the authFlag is zero, then the securityModel used by the SNMP
  1248.       engine which sent the message must identify the securityName on
  1249.       whose behalf the SNMP message was generated but it does not need
  1250.       to provide sufficient data for the receiver of the message to
  1251.       authenticate the identification, as there is no need to
  1252.       authenticate the message in this case.
  1253.  
  1254.    b) privFlag
  1255.  
  1256.       If the privFlag is set, then the securityModel used by the SNMP
  1257.       engine which sent the message must also protect the scopedPDU in
  1258.       an SNMP message from disclosure, i.e., must encrypt/decrypt the
  1259.       scopedPDU. If the privFlag is zero, then the securityModel in use
  1260.       does not need to protect the data from disclosure.
  1261.  
  1262.       It is an explicit requirement of the SNMP architecture that if
  1263.       privacy is selected, then authentication is also required.  That
  1264.       means that if the privFlag is set, then the authFlag must also be
  1265.       set to one.
  1266.  
  1267.       The combination of the authFlag and the privFlag comprises a Level
  1268.       of Security as follows:
  1269.          authFlag zero, privFlag zero -> securityLevel is noAuthNoPriv
  1270.          authFlag zero, privFlag one  -> invalid combination
  1271.          authFlag one,  privFlag zero -> securityLevel is authNoPriv
  1272.          authFlag one,  privFlag one  -> securityLevel is authPriv
  1273.  
  1274. 6.5.  msgSecurityModel
  1275.  
  1276.    The v3MP supports the concurrent existence of multiple Security
  1277.    Models to provide security services for SNMPv3 messages.  The
  1278.    msgSecurityModel field in an SNMPv3 Message identifies which Security
  1279.    Model was used by the sender to generate the message and therefore
  1280.    which securityModel must be used by the receiver to perform security
  1281.    processing for the message.  The mapping to the appropriate
  1282.    securityModel implementation within an SNMP engine is accomplished in
  1283.    an implementation-dependent manner.
  1284.  
  1285.  
  1286.  
  1287. SNMPv3 Working Group       Expires April 1998                  [Page 23]
  1288.  
  1289. Internet Draft     Message Processing and Dispatching    29 October 1997
  1290.  
  1291.  
  1292. 6.6.  msgSecurityParameters
  1293.  
  1294.    The msgSecurityParameters field of the SNMPv3 Message is used for
  1295.    communication between the Security Model modules in the sending and
  1296.    receiving SNMP engines. The data in the msgSecurityParameters field
  1297.    is used exclusively by the Security Model, and the contents and
  1298.    format of the data is defined by the Security Model.  This OCTET
  1299.    STRING is not interpreted by the v3MP, but is passed to the local
  1300.    implementation of the Security Model indicated by the
  1301.    msgSecurityModel field in the message.
  1302.  
  1303. 6.7.  scopedPduData
  1304.  
  1305.    The scopedPduData field represents either the plain text scopedPDU if
  1306.    the privFlag in the msgFlags is zero, or it represents an
  1307.    encryptedPDU (encoded as an OCTET STRING) which must be decrypted by
  1308.    the securityModel in use to produce a plaintext scopedPDU.
  1309.  
  1310. 6.8.  scopedPDU
  1311.  
  1312.    The scopedPDU contains information to identify an administratively
  1313.    unique context and a PDU. The object identifiers in the PDU refer to
  1314.    managed objects which are (expected to be) accessible within the
  1315.    specified context.
  1316.  
  1317. 6.8.1.  contextEngineID
  1318.  
  1319.    The contextEngineID in the SNMPv3 message, uniquely identifies,
  1320.    within an administrative domain, an SNMP entity that may realize an
  1321.    instance of a context with a particular contextName.
  1322.  
  1323.    For incoming messages, the contextEngineID is used to determine to
  1324.    which application the scopedPDU will be sent for processing.
  1325.  
  1326.    For outgoing messages, the v3MP sets the contextEngineID to the value
  1327.    provided by the application in the request for a message to be sent.
  1328.  
  1329. 6.8.2.  contextName
  1330.  
  1331.    The contextName field in an SNMPv3 message, in conjunction with the
  1332.    contextEngineID field, identifies the particular context associated
  1333.    with the management information contained in the PDU portion of the
  1334.    message.  The contextName is unique within the SNMP entity specified
  1335.    by the contextEngineID, which may realize the managed objects
  1336.    referenced within the PDU.  An application which originates a message
  1337.    provides the value for the contextName field and this value may be
  1338.    used during processing by an application at the receiving SNMP
  1339.    Engine.
  1340.  
  1341.  
  1342.  
  1343. SNMPv3 Working Group       Expires April 1998                  [Page 24]
  1344.  
  1345. Internet Draft     Message Processing and Dispatching    29 October 1997
  1346.  
  1347.  
  1348. 6.8.3.  data
  1349.  
  1350.    The data field of the SNMPv3 Message contains the PDU.  Among other
  1351.    things, the PDU contains the PDU type that is used by the v3MP to
  1352.    determine the type of the incoming SNMP message.  The v3MP specifies
  1353.    that the PDU must be one of those specified in [RFC1905].
  1354.  
  1355. 7.  Elements of Procedure for v3MP
  1356.  
  1357.    This section describes the procedures followed by an SNMP engine when
  1358.    generating and processing SNMP messages according to the SNMPv3
  1359.    Message Processing Model.
  1360.  
  1361.    Please note, that for the sake of clarity and to prevent the text
  1362.    from being even longer and more complicated, some details were
  1363.    omitted from the steps below.
  1364.  
  1365.       a) Some steps specify that when some error conditions are
  1366.          encountered when processing a received message, a message
  1367.          containing a Report PDU is generated and the received message
  1368.          is discarded without further processing.  However, a Report-PDU
  1369.          must not be generated unless the reportableFlag is set in the
  1370.          received message.
  1371.  
  1372.       b) The elements of procedure do not always explicitly indicate
  1373.          when state information needs to be released. The general rule
  1374.          is that if state information is available when a message is to
  1375.          be "discarded without further processing", then the state
  1376.          information must also be released at that same time.
  1377.  
  1378. 7.1.  Prepare an Outgoing SNMP Message
  1379.  
  1380.    This section describes the procedure followed to prepare an SNMPv3
  1381.    message from the data elements passed by the Message Dispatcher.
  1382.  
  1383.    1) The Message Dispatcher may request that an SNMPv3 message
  1384.       containing a GetRequest-PDU, GetNextRequest-PDU, GetBulkRequest-
  1385.       PDU, SetRequest-PDU, InformRequest-PDU, or SNMPv2-Trap-PDU be
  1386.       prepared for sending.
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399. SNMPv3 Working Group       Expires April 1998                  [Page 25]
  1400.  
  1401. Internet Draft     Message Processing and Dispatching    29 October 1997
  1402.  
  1403.  
  1404.  
  1405.       a) It makes such a request according to the abstract service
  1406.          primitive:
  1407.  
  1408.          statusInformation =           -- success or errorIndication
  1409.            prepareOutgoingMessage(
  1410.            IN   transportDomain        -- requested transport domain
  1411.            IN   transportAddress       -- requested destination address
  1412.            IN   messageProcessingModel -- typically, SNMP version
  1413.            IN   securityModel          -- Security Model to use
  1414.            IN   securityName           -- on behalf of this principal
  1415.            IN   securityLevel          -- Level of Security requested
  1416.            IN   contextEngineID        -- data from/at this entity
  1417.            IN   contextName            -- data from/in this context
  1418.            IN   pduVersion             -- version of the PDU
  1419.            IN   PDU                    -- SNMP Protocol Data Unit
  1420.            IN   expectResponse         -- TRUE or FALSE
  1421.            IN   sendPduHandle          -- the handle for matching
  1422.                                        -- incoming responses
  1423.            OUT  destTransportDomain    -- destination transport domain
  1424.            OUT  destTransportAddress   -- destination transport address
  1425.            OUT  outgoingMessage        -- the message to send
  1426.            OUT  outgoingMessageLength  -- the length of the message
  1427.            )
  1428.  
  1429.  
  1430.       b) A unique msgID is generated.  The number used for msgID should
  1431.          not have been used recently, and must not be the same as was
  1432.          used for any outstanding request.
  1433.  
  1434.          * SNMPv3 does not use the values of expectResponse or
  1435.          pduVersion.
  1436.  
  1437.    2) The Message Dispatcher may request that an SNMPv3 message
  1438.       containing a Response-PDU or Report-PDU be prepared for sending.
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455. SNMPv3 Working Group       Expires April 1998                  [Page 26]
  1456.  
  1457. Internet Draft     Message Processing and Dispatching    29 October 1997
  1458.  
  1459.  
  1460.  
  1461.       a) It makes such a request according to the abstract service
  1462.          primitive:
  1463.  
  1464.          result =                        -- SUCCESS or FAILURE
  1465.          prepareResponseMessage(
  1466.           IN   messageProcessingModel   -- typically, SNMP version
  1467.           IN   securityModel            -- same as on incoming request
  1468.           IN   securityName             -- same as on incoming request
  1469.           IN   securityLevel            -- same as on incoming request
  1470.           IN   contextEngineID          -- data from/at this SNMP entity
  1471.           IN   contextName              -- data from/in this context
  1472.           IN   pduVersion               -- version of the PDU
  1473.           IN   PDU                      -- SNMP Protocol Data Unit
  1474.           IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  1475.           IN   stateReference           -- reference to state
  1476.                                         -- information presented with
  1477.                                         -- the request
  1478.           IN   statusInformation        -- success or errorIndication
  1479.                                         -- error counter OID and value
  1480.                                         -- when errorIndication
  1481.           OUT  transportDomain          -- destination transport domain
  1482.           OUT  transportAddress         -- destination transport address
  1483.           OUT  outgoingMessage          -- the message to send
  1484.           OUT  outgoingMessageLength    -- the length of the message
  1485.           )
  1486.  
  1487.       b) The cached information for the original request is retrieved
  1488.          via the stateReference, including
  1489.  
  1490.                   - msgID,
  1491.                   - contextEngineID,
  1492.                   - contextName,
  1493.                   - securityModel,
  1494.                   - securityName,
  1495.                   - securityLevel,
  1496.                   - securityStateReference,
  1497.                   - reportableFlag,
  1498.                   - transportDomain, and
  1499.                   - transportAddress.
  1500.  
  1501.          The SNMPv3 Message Processing Model does not allow cached data
  1502.          to be overridden, except by error indications as detailed in
  1503.          (3) below.
  1504.  
  1505.    3) If statusInformation contains values for an OID/value combination
  1506.       (potentially also containing a securityLevel value,
  1507.       contextEngineID value, or contextName value), then
  1508.  
  1509.  
  1510.  
  1511. SNMPv3 Working Group       Expires April 1998                  [Page 27]
  1512.  
  1513. Internet Draft     Message Processing and Dispatching    29 October 1997
  1514.  
  1515.  
  1516.       a) If reportableFlag is zero, then the original message is
  1517.          discarded, and no further processing is done. A result of
  1518.          FAILURE is returned. SNMPv3 Message Processing is complete.
  1519.  
  1520.       b) If a PDU is provided, it is the PDU from the original request.
  1521.          If possible, extract the request-id.
  1522.  
  1523.       c) A Report PDU is prepared:
  1524.  
  1525.          1) the varBindList is set to contain the OID and value from the
  1526.             statusInformation
  1527.  
  1528.          2) error-status is set to 0
  1529.  
  1530.          3) error-index is set to 0.
  1531.  
  1532.          4) request-id is set to the value extracted in step b)
  1533.             Otherwise, request-id is set to 0
  1534.  
  1535.       d) The errorIndication in statusInformation may be accompanied by
  1536.          a securityLevel value, a contextEngineID value, or a
  1537.          contextName value.
  1538.  
  1539.          1) If statusInformation contains a value for securityLevel,
  1540.             then securityLevel is set to that value, otherwise it is set
  1541.             to noAuthNoPriv.
  1542.  
  1543.          2) If statusInformation contains a value for contextEngineID,
  1544.             then contextEngineID is set to that value, otherwise it is
  1545.             set to the value of this entity's snmpEngineID.
  1546.  
  1547.          3) If statusInformation contains a value for contextName, then
  1548.             contextName is set to that value, otherwise it is set to the
  1549.             default context of "" (zero-length string).
  1550.  
  1551.       e) PDU is set to refer to the new Report-PDU.  The old PDU is
  1552.          discarded.
  1553.  
  1554.       f) Processing continues with step 6) below.
  1555.  
  1556.    4) If contextEngineID is not yet determined, then the contextEngineID
  1557.       is determined, in an implementation-dependent manner, possibly
  1558.       using the transportDomain and transportAddress.
  1559.  
  1560.    5) If the contextName is not yet determined, the contextName is set
  1561.       to the default context.
  1562.  
  1563.    6) A scopedPDU is prepared from the contextEngineID, contextName, and
  1564.  
  1565.  
  1566.  
  1567. SNMPv3 Working Group       Expires April 1998                  [Page 28]
  1568.  
  1569. Internet Draft     Message Processing and Dispatching    29 October 1997
  1570.  
  1571.  
  1572.       PDU.
  1573.  
  1574.    7) msgGlobalData is constructed as follows
  1575.  
  1576.       a) The msgVersion field is set to snmpv3(3).
  1577.  
  1578.       b) msgID is set as determined in step 1 or 2 above.
  1579.  
  1580.       c) msgMaxSize is set to an implementation-dependent value.
  1581.  
  1582.       d) msgFlags are set as follows:
  1583.  
  1584.          -  If securityLevel specifies noAuthNoPriv, then authFlag and
  1585.             privFlag are both set to zero.
  1586.  
  1587.          -  If securityLevel specifies authNoPriv, then authFlag is set
  1588.             to one and privFlag is set to zero.
  1589.  
  1590.          -  If securityLevel specifies authPriv, then authFlag is set to
  1591.             one and privFlag is set to one.
  1592.  
  1593.          -  If the PDU is a Response-PDU, Report-PDU or SNMPv2-Trap-PDU,
  1594.             then the reportableFlag is set to zero.
  1595.  
  1596.          -  If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1597.             GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU
  1598.             then the reportableFlag is set to one.
  1599.  
  1600.          -  All other msgFlags bits are set to zero.
  1601.  
  1602.       e) msgSecurityModel is set to the value of securityModel
  1603.  
  1604.    8) If the PDU is a Response-PDU or Report-PDU, then
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623. SNMPv3 Working Group       Expires April 1998                  [Page 29]
  1624.  
  1625. Internet Draft     Message Processing and Dispatching    29 October 1997
  1626.  
  1627.  
  1628.  
  1629.       a) The specified Security Model is called to generate the message
  1630.          according to the primitive:
  1631.  
  1632.          statusInformation =
  1633.            generateResponseMsg(
  1634.            IN   messageProcessingModel -- SNMPv3 Message Processing
  1635.                                        -- Model
  1636.            IN   globalData             -- msgGlobalData from step 7
  1637.            IN   maxMessageSize         -- from msgMaxSize (step 7c)
  1638.            IN   securityModel          -- as determined in step 7e
  1639.            IN   securityEngineID       -- the value of snmpEngineID
  1640.            IN   securityName           -- on behalf of this principal
  1641.            IN   securityLevel          -- for the outgoing message
  1642.            IN   scopedPDU              -- as prepared in step 6)
  1643.            IN   securityStateReference -- as determined in step 2
  1644.            OUT  securityParameters     -- filled in by Security Module
  1645.            OUT  wholeMsg               -- complete generated message
  1646.            OUT  wholeMsgLength         -- length of generated message
  1647.            )
  1648.  
  1649.          If, upon return from the Security Model, the statusInformation
  1650.          includes an errorIndication, then any cached information about
  1651.          the outstanding request message is discarded, and an
  1652.          errorIndication is returned, so it can be returned to the
  1653.          calling application. SNMPv3 Message Processing is complete.
  1654.  
  1655.       b) A SUCCESS result is returned. SNMPv3 Message Processing is
  1656.          complete.
  1657.  
  1658.    9) If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1659.       GetBulkRequest-PDU, SetRequest-PDU, InformRequest-PDU, or or
  1660.       SNMPv2-Trap-PDU, then
  1661.  
  1662.       a) If the PDU is an SNMPv2-Trap-PDU, then securityEngineID is set
  1663.          to the value of this entity's snmpEngineID.
  1664.  
  1665.          Otherwise, the snmpEngineID of the target entity is determined,
  1666.          in an implementation-dependent manner, possibly using
  1667.          transportDomain and transportAddress.  The value of
  1668.          securityEngineID is set to the value of the target entity's
  1669.          snmpEngineID.
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679. SNMPv3 Working Group       Expires April 1998                  [Page 30]
  1680.  
  1681. Internet Draft     Message Processing and Dispatching    29 October 1997
  1682.  
  1683.  
  1684.  
  1685.       b) The specified Security Model is called to generate the message
  1686.          according to the primitive:
  1687.  
  1688.          statusInformation =
  1689.           generateRequestMsg(
  1690.           IN  messageProcessingModel -- SNMPv3 Message Processing Model
  1691.           IN  globalData             -- msgGlobalData, from step 7
  1692.           IN  maxMessageSize         -- from msgMaxSize in step 7 c)
  1693.           IN  securityModel          -- as provided by caller
  1694.           IN  securityEngineID       -- authoritative SNMP entity
  1695.           IN  securityName           -- as provided by caller
  1696.           IN  securityLevel          -- as provided by caller
  1697.           IN  snmpEngineID           -- as determined in step 9 a)
  1698.           IN  scopedPDU              -- as prepared in step 6
  1699.           OUT securityParameters     -- filled in by Security Module
  1700.           OUT wholeMsg               -- complete generated message
  1701.           OUT wholeMsgLength         -- length of the generated message
  1702.           )
  1703.  
  1704.          If, upon return from the Security Model, the statusInformation
  1705.          includes an errorIndication, then the message is discarded, and
  1706.          the errorIndication is returned, so it can be returned to the
  1707.          calling application, and no further processing is done.
  1708.          SNMPv3 Message Processing is complete.
  1709.  
  1710.       c) Information about the outgoing message is cached, and a
  1711.          stateReference is created (implementation-specific).
  1712.          Information to be cached includes the values of:
  1713.  
  1714.                       - sendPduHandle
  1715.                       - msgID
  1716.                       - snmpEngineID
  1717.                       - securityModel
  1718.                       - securityName
  1719.                       - securityLevel
  1720.                       - contextEngineID
  1721.                       - contextName
  1722.  
  1723.       d) A SUCCESS result is returned.  SNMPv3 Message Processing is
  1724.          complete.
  1725.  
  1726. 7.2.  Prepare Data Elements from an Incoming SNMP Message
  1727.  
  1728.    This section describes the procedure followed to extract data from an
  1729.    SNMPv3 message, and to prepare the data elements required for further
  1730.    processing of the message by the Message Dispatcher.
  1731.  
  1732.  
  1733.  
  1734.  
  1735. SNMPv3 Working Group       Expires April 1998                  [Page 31]
  1736.  
  1737. Internet Draft     Message Processing and Dispatching    29 October 1997
  1738.  
  1739.  
  1740.    1)  The message is passed in from the Message Dispatcher according to
  1741.        the abstract service primitive:
  1742.  
  1743.        result =                         -- SUCCESS or errorIndication
  1744.          prepareDataElements(
  1745.          IN  transportDomain          -- origin transport domain
  1746.          IN  transportAddress         -- origin transport address
  1747.          IN  wholeMsg                 -- as received from the network
  1748.          IN  wholeMsgLength           -- as received from the network
  1749.          OUT messageProcessingModel   -- typically, SNMP version
  1750.          OUT securityModel            -- Security Model to use
  1751.          OUT securityName             -- on behalf of this principal
  1752.          OUT securityLevel            -- Level of Security requested
  1753.          OUT contextEngineID          -- data from/at this entity
  1754.          OUT contextName              -- data from/in this context
  1755.          OUT pduVersion               -- version of the PDU
  1756.          OUT PDU                      -- SNMP Protocol Data Unit
  1757.          OUT pduType                  -- SNMP PDU type
  1758.          OUT sendPduHandle            -- handle for matched request
  1759.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1760.          OUT statusInformation        -- success or errorIndication
  1761.                                       -- error counter OID and value
  1762.                                       -- when errorIndication
  1763.          OUT stateReference           -- reference to state information
  1764.                                       -- to be used for a possible
  1765.          )                            -- Response
  1766.  
  1767.    2)  If the received message is not the serialization (according to
  1768.        the conventions of [RFC1906]) of an SNMPv3Message value, then the
  1769.        snmpInASNParseErrs counter [RFC1907] is incremented, the message
  1770.        is discarded without further processing, and a FAILURE result is
  1771.        returned. SNMPv3 Message Processing is complete.
  1772.  
  1773.    3)  The values for msgVersion, msgID, msgMaxSize, msgFlags,
  1774.        msgSecurityModel, msgSecurityParameters, and msgData are
  1775.        extracted from the message.
  1776.  
  1777.    4)  If the value of the msgSecurityModel component does not match a
  1778.        supported securityModel, then the snmpUnknownSecurityModels
  1779.        counter is incremented, a Report PDU is generated, the message is
  1780.        discarded without further processing, and a FAILURE result is
  1781.        returned. SNMPv3 Message Processing is complete.
  1782.  
  1783.    5)  The securityLevel is determined from the authFlag and the
  1784.        privFlag bits of the msgFlags component as follows:
  1785.  
  1786.        a) If the authFlag is not set and the privFlag is not set, then
  1787.           securityLevel is set to noAuthNoPriv.
  1788.  
  1789.  
  1790.  
  1791. SNMPv3 Working Group       Expires April 1998                  [Page 32]
  1792.  
  1793. Internet Draft     Message Processing and Dispatching    29 October 1997
  1794.  
  1795.  
  1796.        b) If the authFlag is set and the privFlag is not set, then
  1797.           securityLevel is set to authNoPriv.
  1798.  
  1799.        c) If the authFlag is set and the privFlag is set, then
  1800.           securityLevel is set to authPriv.
  1801.  
  1802.        d) If the authFlag is not set and privFlag is set, then the
  1803.           snmpInvalidMsgs counter is incremented, a Report PDU is
  1804.           generated, the message is discarded without further
  1805.           processing, and a FAILURE result is returned. SNMPv3 Message
  1806.           Processing is complete.
  1807.  
  1808.    6)  The security module implementing the Security Model as specified
  1809.        by the securityModel component is called for authentication and
  1810.        privacy services.  This is done according to the abstract service
  1811.        primitive:
  1812.  
  1813.        statusInformation =            -- errorIndication or success
  1814.                                       -- error counter OID and
  1815.                                       -- value if error
  1816.          processIncomingMsg(
  1817.          IN  messageProcessingModel   -- SNMPv3 Message Processing Model
  1818.          IN  expectResponse           -- TRUE or FALSE
  1819.          IN  maxMessageSize           -- of the sending SNMP entity
  1820.          IN  securityParameters       -- for the received message
  1821.          IN  securityModel            -- for the received message
  1822.          IN  securityLevel            -- Level of Security
  1823.          IN  wholeMsg                 -- as received on the wire
  1824.          IN  wholeMsgLength           -- length as received on the wire
  1825.          OUT securityEngineID         -- authoritative SNMP entity
  1826.          OUT securityName             -- identification of the principal
  1827.          OUT scopedPDU,               -- message (plaintext) payload
  1828.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1829.          OUT securityStateReference   -- reference to security state
  1830.          )                            -- information, needed for
  1831.                                       -- response
  1832.  
  1833.        If an errorIndication is returned by the security module, then
  1834.  
  1835.        a) If statusInformation contains values for an OID/value pair,
  1836.           then a Report PDU is generated.
  1837.  
  1838.           1) If the scopedPDU has been returned from ProcessIncomingMsg
  1839.              then determine contextEngineID, contextName, and PDU.
  1840.  
  1841.           2) Information about the message is cached and a
  1842.              stateReference is created (implementation-specific).
  1843.              Information to be cached includes the values of:
  1844.  
  1845.  
  1846.  
  1847. SNMPv3 Working Group       Expires April 1998                  [Page 33]
  1848.  
  1849. Internet Draft     Message Processing and Dispatching    29 October 1997
  1850.  
  1851.  
  1852.                           msgVersion,
  1853.                           msgID,
  1854.                           securityLevel,
  1855.                           msgFlags,
  1856.                           msgMaxSize,
  1857.                           securityModel,
  1858.                           maxSizeResponseScopedPDU,
  1859.                           securityStateReference
  1860.  
  1861.           3) Request that a Report-PDU be prepared and sent, according
  1862.              to the abstract service primitive:
  1863.  
  1864.              result =                     -- SUCCESS or FAILURE
  1865.              returnResponsePDU(
  1866.              IN  messageProcessingModel   -- SNMPv3(3)
  1867.              IN  securityModel            -- same as on incoming request
  1868.              IN  securityName             -- from ProcessIncomingMsg
  1869.              IN  securityLevel            -- same as on incoming request
  1870.              IN  contextEngineID          -- from step 6 a) 1)
  1871.              IN  contextName              -- from step 6 a) 1)
  1872.              IN  pduVersion               -- SNMPv2-PDU
  1873.              IN  PDU                      -- from step 6 a) 1)
  1874.              IN  maxSizeResponseScopedPDU -- from ProcessIncomingMsg
  1875.              IN  stateReference           -- from step 6 a) 2)
  1876.              IN  statusInformation        -- from ProcessIncomingMsg
  1877.              OUT transportDomain          -- destination's transport
  1878.                                           -- domain
  1879.              OUT transportAddress         -- destination's transport
  1880.                                           -- address
  1881.              OUT outgoingMessage          -- the message to send
  1882.              OUT outgoingMessageLength    -- the length of the message
  1883.              )
  1884.  
  1885.        b) The incoming message is discarded without further processing,
  1886.           and a FAILURE result is returned. SNMPv3 Message Processing is
  1887.           complete.
  1888.  
  1889.    7)  The scopedPDU is parsed to extract the contextEngineID, the
  1890.        contextName and the PDU.  If any parse error occurs, then the
  1891.        snmpInASNParseErrs counter [RFC1907] is incremented, the security
  1892.        state information is discarded, the message is discarded without
  1893.        further processing, and a FAILURE result is returned. SNMPv3
  1894.        Message Processing is complete.
  1895.  
  1896.    8)  The pduVersion is set to an SNMPv2-PDU.
  1897.  
  1898.    9)  The pduType is determined, in an implementation-dependent manner,
  1899.        to be:
  1900.  
  1901.  
  1902.  
  1903. SNMPv3 Working Group       Expires April 1998                  [Page 34]
  1904.  
  1905. Internet Draft     Message Processing and Dispatching    29 October 1997
  1906.  
  1907.  
  1908.                - a GetRequest-PDU,
  1909.                - a GetNextRequest-PDU,
  1910.                - a GetBulkRequest-PDU,
  1911.                - a SetRequest-PDU,
  1912.                - an InformRequest-PDU,
  1913.                - an SNMPv2-Trap-PDU,
  1914.                - a Response-PDU, or
  1915.                - a Report-PDU.
  1916.  
  1917.    10) If the pduType is a Response-PDU or Report-PDU, then
  1918.  
  1919.        a) The value of the msgID component is used to find the cached
  1920.           information for a corresponding outstanding Request message.
  1921.           If no such outstanding Request message is found, then the
  1922.           security state information is discarded, the message is
  1923.           discarded without further processing, and a FAILURE result is
  1924.           returned. SNMPv3 Message Processing is complete.
  1925.  
  1926.        b) sendPduHandle is retrieved from the cached information.
  1927.  
  1928.        Otherwise, sendPduHandle is set to <none>, an implementation
  1929.        defined value.
  1930.  
  1931.     11) If the pduType is a Report-PDU, then
  1932.  
  1933.         a) statusInformation is created using the contents of the
  1934.            Report-PDU, in an implementation-dependent manner. This
  1935.            statusInformation will be forwarded to the application
  1936.            associated with the sendPduHandle.
  1937.  
  1938.         b) Any cached information about the outstanding Request message
  1939.            message is discarded.
  1940.  
  1941.         c) The security state information for this incoming message is
  1942.            discarded.
  1943.  
  1944.         d) stateReference is set to <none>
  1945.  
  1946.         e) A SUCCESS result is returned. SNMPv3 Message Processing is
  1947.            complete.
  1948.  
  1949.     12) If the pduType is a Response-PDU, then
  1950.  
  1951.         a) The cached data for the outstanding request, referred to by
  1952.            stateReference, is retrieved, including
  1953.  
  1954.                        - snmpEngineID
  1955.                        - securityModel
  1956.  
  1957.  
  1958.  
  1959. SNMPv3 Working Group       Expires April 1998                  [Page 35]
  1960.  
  1961. Internet Draft     Message Processing and Dispatching    29 October 1997
  1962.  
  1963.  
  1964.                        - securityName
  1965.                        - securityLevel
  1966.                        - contextEngineID
  1967.                        - contextName
  1968.  
  1969.         b) If the values extracted from the incoming message differ from
  1970.            the cached data, then the security state information is
  1971.            discarded, any cached information about the outstanding
  1972.            Request message is discarded, the incoming message is
  1973.            discarded without further processing, and a FAILURE result is
  1974.            returned.  SNMPv3 Message Processing is complete.
  1975.  
  1976.         c) Otherwise, any cached information about the outstanding
  1977.            Request message is discarded, and stateReference is set to
  1978.            <none>.
  1979.  
  1980.         d) A SUCCESS result is returned. SNMPv3 Message Processing is
  1981.            complete.
  1982.  
  1983.     13) If the pduType is a GetRequest-PDU, GetNextRequest-PDU,
  1984.         GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU, then
  1985.  
  1986.         a) If the value of securityEngineID is not equal to the value of
  1987.            snmpEngineID, then the security state information is
  1988.            discarded, any cached information about the outstanding
  1989.            Request message is discarded, the incoming message is
  1990.            discarded without further processing, and a FAILURE result is
  1991.            returned.  SNMPv3 Message Processing is complete.
  1992.  
  1993.         b) Information about the message is cached and a stateReference
  1994.            is created (implementation-specific).  Information to be
  1995.            cached includes the values of:
  1996.  
  1997.                         msgVersion,
  1998.                         msgID,
  1999.                         securityLevel,
  2000.                         msgFlags,
  2001.                         msgMaxSize,
  2002.                         securityModel,
  2003.                         maxSizeResponseScopedPDU,
  2004.                         securityStateReference
  2005.  
  2006.         c) A SUCCESS result is returned. SNMPv3 Message Processing is
  2007.            complete.
  2008.  
  2009.     14) If the pduType is an SNMPv2-Trap-PDU, then A SUCCESS result is
  2010.         returned. SNMPv3 Message Processing is complete.
  2011.  
  2012.  
  2013.  
  2014.  
  2015. SNMPv3 Working Group       Expires April 1998                  [Page 36]
  2016.  
  2017. Internet Draft     Message Processing and Dispatching    29 October 1997
  2018.  
  2019.  
  2020. 8.  Intellectual Property
  2021.  
  2022.    The IETF takes no position regarding the validity or scope of any
  2023.    intellectual property or other rights that might be claimed to
  2024.    pertain to the implementation or use of the technology described in
  2025.    this document or the extent to which any license under such rights
  2026.    might or might not be available; neither does it represent that it
  2027.    has made any effort to identify any such rights.  Information on the
  2028.    IETF's procedures with respect to rights in standards-track and
  2029.    standards-related documentation can be found in BCP-11.  Copies of
  2030.    claims of rights made available for publication and any assurances of
  2031.    licenses to be made available, or the result of an attempt made to
  2032.    obtain a general license or permission for the use of such
  2033.    proprietary rights by implementors or users of this specification can
  2034.    be obtained from the IETF Secretariat.
  2035.  
  2036.    The IETF invites any interested party to bring to its attention any
  2037.    copyrights, patents or patent applications, or other proprietary
  2038.    rights which may cover technology that may be required to practice
  2039.    this standard.  Please address the information to the IETF Executive
  2040.    Director.
  2041.  
  2042. 9.  Acknowledgements
  2043.  
  2044.    This document is the result of the efforts of the SNMPv3 Working
  2045.    Group.  Some special thanks are in order to the following SNMPv3 WG
  2046.    members:
  2047.  
  2048.        Dave Battle (SNMP Research, Inc.)
  2049.        Uri Blumenthal (IBM T.J. Watson Research Center)
  2050.        Jeff Case (SNMP Research, Inc.)
  2051.        John Curran (BBN)
  2052.        T. Max Devlin (Hi-TECH Connections)
  2053.        John Flick (Hewlett Packard)
  2054.        David Harrington (Cabletron Systems Inc.)
  2055.        N.C. Hien (IBM T.J. Watson Research Center)
  2056.        Dave Levi (SNMP Research, Inc.)
  2057.        Louis A Mamakos (UUNET Technologies Inc.)
  2058.        Paul Meyer (Secure Computing Corporation)
  2059.        Keith McCloghrie (Cisco Systems)
  2060.        Russ Mundy (Trusted Information Systems, Inc.)
  2061.        Bob Natale (ACE*COMM Corporation)
  2062.        Mike O'Dell (UUNET Technologies Inc.)
  2063.        Dave Perkins (DeskTalk)
  2064.        Peter Polkinghorne (Brunel University)
  2065.        Randy Presuhn (BMC Software, Inc.)
  2066.        David Reid (SNMP Research, Inc.)
  2067.        Shawn Routhier (Epilogue)
  2068.  
  2069.  
  2070.  
  2071. SNMPv3 Working Group       Expires April 1998                  [Page 37]
  2072.  
  2073. Internet Draft     Message Processing and Dispatching    29 October 1997
  2074.  
  2075.  
  2076.        Juergen Schoenwaelder (TU Braunschweig)
  2077.        Bob Stewart (Cisco Systems)
  2078.        Bert Wijnen (IBM T.J. Watson Research Center)
  2079.  
  2080.    The document is based on recommendations of the IETF Security and
  2081.    Administrative Framework Evolution for SNMP Advisory Team.  Members
  2082.    of that Advisory Team were:
  2083.  
  2084.        David Harrington (Cabletron Systems Inc.)
  2085.        Jeff Johnson (Cisco Systems)
  2086.        David Levi (SNMP Research Inc.)
  2087.        John Linn (Openvision)
  2088.        Russ Mundy (Trusted Information Systems) chair
  2089.        Shawn Routhier (Epilogue)
  2090.        Glenn Waters (Nortel)
  2091.        Bert Wijnen (IBM T. J. Watson Research Center)
  2092.  
  2093.    As recommended by the Advisory Team and the SNMPv3 Working Group
  2094.    Charter, the design incorporates as much as practical from previous
  2095.    RFCs and drafts. As a result, special thanks are due to the authors
  2096.    of previous designs known as SNMPv2u and SNMPv2*:
  2097.  
  2098.        Jeff Case (SNMP Research, Inc.)
  2099.        David Harrington (Cabletron Systems Inc.)
  2100.        David Levi (SNMP Research, Inc.)
  2101.        Keith McCloghrie (Cisco Systems)
  2102.        Brian O'Keefe (Hewlett Packard)
  2103.        Marshall T. Rose (Dover Beach Consulting)
  2104.        Jon Saperia (BGS Systems Inc.)
  2105.        Steve Waldbusser (International Network Services)
  2106.        Glenn W. Waters (Bell-Northern Research Ltd.)
  2107.  
  2108. 10.  Security Considerations
  2109.  
  2110.    The Dispatcher coordinates the processing of messages to provide a
  2111.    level of security for management messages and to direct the SNMP PDUs
  2112.    to the proper SNMP application(s).
  2113.  
  2114.    A Message Processing Model, and in particular the V3MP defined in
  2115.    this document, interacts as part of the Message Processing with
  2116.    Security Models in the Security Subsystem via the abstract service
  2117.    interface primitives defined in [SNMP-ARCH] and elaborated above.
  2118.  
  2119.    The level of security actually provided is primarily determined by
  2120.    the specific Security Model implementation(s) and the specific SNMP
  2121.    application implementation(s) incorporated into this framework.
  2122.    Applications have access to data which is not secured. Applications
  2123.    should take reasonable steps to protect the data from disclosure, and
  2124.  
  2125.  
  2126.  
  2127. SNMPv3 Working Group       Expires April 1998                  [Page 38]
  2128.  
  2129. Internet Draft     Message Processing and Dispatching    29 October 1997
  2130.  
  2131.  
  2132.    when they send data across the network, they should obey the
  2133.    securityLevel and call upon the services of an Access Control Model
  2134.    as they apply access control.
  2135.  
  2136.    The values for the msgID element used in communication between SNMP
  2137.    entities must be chosen to avoid replay attacks.  The values do not
  2138.    need to be unpredictable; it is sufficient that they not repeat.
  2139.  
  2140. 11.  References
  2141.  
  2142.    [RFC1901] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2143.       M., and S. Waldbusser, "Introduction to Community-based SNMPv2",
  2144.       RFC 1901, January 1996.
  2145.  
  2146.    [RFC1902] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2147.       M., and S. Waldbusser, "Structure of Management Information for
  2148.       Version  2 of the Simple Network Management Protocol (SNMPv2)",
  2149.       RFC 1902, January 1996.
  2150.  
  2151.    [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2152.       M., and S. Waldbusser, "Protocol Operations for Version 2 of the
  2153.       Simple Network Management Protocol (SNMPv2)", RFC 1905, January
  2154.       1996.
  2155.  
  2156.    [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2157.       M., and S. Waldbusser, "Transport Mappings for Version 2 of the
  2158.       Simple Network Management Protocol (SNMPv2)", RFC 1906, January
  2159.       1996.
  2160.  
  2161.    [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2162.       M., and S. Waldbusser, "Management Information Base for Version 2
  2163.       of the Simple Network Management Protocol (SNMPv2)", RFC 1907
  2164.       January 1996.
  2165.  
  2166.    [RFC1908] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose,
  2167.       M., and S. Waldbusser, "Coexistence between Version 1 and Version
  2168.       2 of the Internet-standard Network Management Framework", RFC
  2169.       1908, January 1996.
  2170.  
  2171.    [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  2172.       Requirement Levels", RFC 2119, BCP 14, March 1997.
  2173.  
  2174.    [RFC 2028] Hovey, R., and S. Bradner, "The Organizations Involved in
  2175.       the IETF Standards Process", BCP 11, RFC 2028, October 1996.
  2176.  
  2177.    [SNMP-ARCH] The SNMPv3 Working Group, Harrington, D., Presuhn, R.,
  2178.       and B. Wijnen, "An Architecture for describing SNMP Management
  2179.       Frameworks", <draft-ietf-snmpv3-next-gen-arch-06.txt>, October
  2180.  
  2181.  
  2182.  
  2183. SNMPv3 Working Group       Expires April 1998                  [Page 39]
  2184.  
  2185. Internet Draft     Message Processing and Dispatching    29 October 1997
  2186.  
  2187.  
  2188.       1997.
  2189.  
  2190.    [SNMP-USM] The SNMPv3 Working Group, Blumenthal, U., and B. Wijnen,
  2191.       "The User-Based Security Model for Version 3 of the Simple Network
  2192.       Management Protocol (SNMPv3)", <draft-ietf-snmpv3-usm-03.txt>,
  2193.       October 1997.
  2194.  
  2195.    [SNMP-ACM] The SNMPv3 Working Group, Wijnen, B., Presuhn, R., and K.
  2196.       McCloghrie, "View-based Access Control Model for the Simple
  2197.       Network Management Protocol (SNMP)",
  2198.       <draft-ietf-snmpv3-acm-04.txt>, October 1997.
  2199.  
  2200.    [SNMP-APPL] The SNMPv3 Working Group, Levi, D. B., Meyer, P., and B.
  2201.       Stewart, "SNMPv3 Applications", <draft-ietf-snmpv3-appl-04.txt>,
  2202.       October 1997.
  2203.  
  2204. 12.  Editors' Addresses
  2205.  
  2206.       Jeffrey Case
  2207.       SNMP Research, Inc.
  2208.       3001 Kimberlin Heights Road
  2209.       Knoxville, TN 37920-9716
  2210.       USA
  2211.  
  2212.       Phone:     +1 423-573-1434
  2213.       EMail:     case@snmp.com
  2214.  
  2215.  
  2216.       Dave Harrington
  2217.       Cabletron Systems, Inc
  2218.       Post Office Box 5005
  2219.       Mail Stop: Durham
  2220.       35 Industrial Way
  2221.       Rochester, NH 03867-5005
  2222.       USA
  2223.  
  2224.       Phone:      +1 603-337-7357
  2225.       EMail:      dbh@cabletron.com
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239. SNMPv3 Working Group       Expires April 1998                  [Page 40]
  2240.  
  2241. Internet Draft     Message Processing and Dispatching    29 October 1997
  2242.  
  2243.  
  2244.       Randy Presuhn
  2245.       BMC Software, Inc.
  2246.       1190 Saratoga Avenue
  2247.       Suite 130
  2248.       San Jose, CA 95129
  2249.       USA
  2250.  
  2251.       Phone:      +1 408-556-0720
  2252.       EMail:      rpresuhn@bmc.com
  2253.  
  2254.  
  2255.       Bert Wijnen
  2256.       IBM T. J. Watson Research
  2257.       Schagen 33
  2258.       3461 GL Linschoten
  2259.       Netherlands
  2260.  
  2261.       Phone:      +31 348-432-794
  2262.       EMail:      wijnen@vnet.ibm.com
  2263.  
  2264.  
  2265. 13.  Issues
  2266.  
  2267.    The revision history in this section will be deleted when this
  2268.    material is submitted for last call.  The remaining material in this
  2269.    section will be deleted in the transition from internet-draft to RFC.
  2270.  
  2271. 13.1.  Open Issues
  2272.  
  2273.    The following open issues need to be resolved.
  2274.  
  2275.       -  The more precise specification of the handling of the
  2276.          reportableFlag begs the question of what an engine is supposed
  2277.          to do when it receives a message with an illegal combination of
  2278.          the reportableFlag and PDU type.
  2279.  
  2280.          The paragraph beginning with "Report PDUs are engine-to-engine
  2281.          communications...."  has been deleted.  The old text was a bit
  2282.          of an overspecification, but in the past the first part of that
  2283.          paragraph has proven valuable in explaining to people just what
  2284.          report PDUs are for.
  2285.  
  2286. 13.2.  Change Log
  2287.  
  2288.    The following change log records major changes from the previous
  2289.    internet draft.
  2290.  
  2291.       -  Added copyright notices required by RFC 2026.
  2292.  
  2293.  
  2294.  
  2295. SNMPv3 Working Group       Expires April 1998                  [Page 41]
  2296.  
  2297. Internet Draft     Message Processing and Dispatching    29 October 1997
  2298.  
  2299.  
  2300.       -  Adjusted layout per RFC 2223.
  2301.  
  2302. 14.  Full Copyright Statement
  2303.  
  2304.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  2305.  
  2306.    This document and translations of it may be copied and furnished to
  2307.    others, and derivative works that comment on or otherwise explain it
  2308.    or assist in its implementation may be prepared, copied, published
  2309.    and distributed, in whole or in part, without restriction of any
  2310.    kind, provided that the above copyright notice and this paragraph are
  2311.    included on all such copies and derivative works.  However, this
  2312.    document itself may not be modified in any way, such as by removing
  2313.    the copyright notice or references to the Internet Society or other
  2314.    Internet organizations, except as needed for the purpose of
  2315.    developing Internet standards in which case the procedures for
  2316.    copyrights defined in the Internet Standards process must be
  2317.    followed, or as required to translate it into languages other than
  2318.    English.
  2319.  
  2320.    The limited permissions granted above are perpetual and will not be
  2321.    revoked by the Internet Society or its successors or assigns.
  2322.  
  2323.    This document and the information contained herein is provided on an
  2324.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  2325.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  2326.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  2327.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  2328.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351. SNMPv3 Working Group       Expires April 1998                  [Page 42]
  2352.  
  2353.