Tech-invite3GPPspecsGlossariesIETFRFCsGroupsSIPABNFsWorld Map

RFC 6353


Transport Layer Security (TLS) Transport Model for the Simple Network Management Protocol (SNMP)

Part 2 of 4, p. 8 to 31
Prev RFC Part       Next RFC Part


prevText      Top      Up      ToC       Page 8 
3.  How the TLSTM Fits into the Transport Subsystem

   A transport model is a component of the Transport Subsystem.  The TLS
   Transport Model thus fits between the underlying (D)TLS transport
   layer and the Message Dispatcher [RFC3411] component of the SNMP

Top      Up      ToC       Page 9 
   The TLS Transport Model will establish a session between itself and
   the TLS Transport Model of another SNMP engine.  The sending
   transport model passes unencrypted and unauthenticated messages from
   the Dispatcher to (D)TLS to be encrypted and authenticated, and the
   receiving transport model accepts decrypted and authenticated/
   integrity-checked incoming messages from (D)TLS and passes them to
   the Dispatcher.

   After a TLS Transport Model session is established, SNMP messages can
   conceptually be sent through the session from one SNMP message
   Dispatcher to another SNMP Message Dispatcher.  If multiple SNMP
   messages are needed to be passed between two SNMP applications they
   MAY be passed through the same session.  A TLSTM implementation
   engine MAY choose to close the session to conserve resources.

   The TLS Transport Model of an SNMP engine will perform the
   translation between (D)TLS-specific security parameters and SNMP-
   specific, model-independent parameters.

Top      Up      ToC       Page 10 
   The diagram below depicts where the TLS Transport Model (shown as
   "(D)TLS TM") fits into the architecture described in RFC 3411 and the
   Transport Subsystem:

   |    Network                   |
      ^       ^              ^
      |       |              |
      v       v              v
   | +--------------------------------------------------+              |
   | |  Transport Subsystem                             |  +--------+  |
   | | +-----+ +-----+ +-------+             +-------+  |  |        |  |
   | | | UDP | | SSH | |(D)TLS |    . . .    | other |<--->| Cache  |  |
   | | |     | | TM  | | TM    |             |       |  |  |        |  |
   | | +-----+ +-----+ +-------+             +-------+  |  +--------+  |
   | +--------------------------------------------------+         ^    |
   |              ^                                               |    |
   |              |                                               |    |
   | Dispatcher   v                                               |    |
   | +--------------+ +---------------------+  +----------------+ |    |
   | | Transport    | | Message Processing  |  | Security       | |    |
   | | Dispatch     | | Subsystem           |  | Subsystem      | |    |
   | |              | |     +------------+  |  | +------------+ | |    |
   | |              | |  +->| v1MP       |<--->| | USM        | | |    |
   | |              | |  |  +------------+  |  | +------------+ | |    |
   | |              | |  |  +------------+  |  | +------------+ | |    |
   | |              | |  +->| v2cMP      |<--->| | Transport  | | |    |
   | | Message      | |  |  +------------+  |  | | Security   |<--+    |
   | | Dispatch    <---->|  +------------+  |  | | Model      | |      |
   | |              | |  +->| v3MP       |<--->| +------------+ |      |
   | |              | |  |  +------------+  |  | +------------+ |      |
   | | PDU Dispatch | |  |  +------------+  |  | | Other      | |      |
   | +--------------+ |  +->| otherMP    |<--->| | Model(s)   | |      |
   |              ^   |     +------------+  |  | +------------+ |      |
   |              |   +---------------------+  +----------------+      |
   |              v                                                    |
   |      +-------+-------------------------+---------------+          |
   |      ^                                 ^               ^          |
   |      |                                 |               |          |
   |      v                                 v               v          |

Top      Up      ToC       Page 11 
   | +-------------+   +---------+   +--------------+  +-------------+ |
   | |   COMMAND   |   | ACCESS  |   | NOTIFICATION |  |    PROXY    | |
   | |  RESPONDER  |<->| CONTROL |<->|  ORIGINATOR  |  |  FORWARDER  | |
   | | application |   |         |   | applications |  | application | |
   | +-------------+   +---------+   +--------------+  +-------------+ |
   |      ^                                 ^                          |
   |      |                                 |                          |
   |      v                                 v                          |
   | +----------------------------------------------+                  |
   | |             MIB instrumentation              |      SNMP entity |

3.1.  Security Capabilities of This Model

3.1.1.  Threats

   The TLS Transport Model provides protection against the threats
   identified by the RFC 3411 architecture [RFC3411]:

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

       (D)TLS provides verification that the content of each received
       message has not been modified during its transmission through the
       network, data has not been altered or destroyed in an
       unauthorized manner, and data sequences have not been altered to
       an extent greater than can occur non-maliciously.

   2.  Masquerade - The masquerade threat is the danger that management
       operations unauthorized for a given principal may be attempted by
       assuming the identity of another principal that has the
       appropriate authorizations.

       The TLSTM verifies the identity of the (D)TLS server through the
       use of the (D)TLS protocol and X.509 certificates.  A TLS
       Transport Model implementation MUST support the authentication of
       both the server and the client.

   3.  Message stream modification - The re-ordering, delay, or replay
       of messages can and does occur through the natural operation of
       many connectionless transport services.  The message stream
       modification threat is the danger that messages may be
       maliciously re-ordered, delayed, or replayed to an extent that is
       greater than can occur through the natural operation of

Top      Up      ToC       Page 12 
       connectionless transport services, in order to effect
       unauthorized management operations.

       (D)TLS provides replay protection with a Message Authentication
       Code (MAC) that includes a sequence number.  Since UDP provides
       no sequencing ability, DTLS uses a sliding window protocol with
       the sequence number used for replay protection (see [RFC4347]).

   4.  Disclosure - The disclosure threat is the danger of eavesdropping
       on the exchanges between SNMP engines.

       (D)TLS provides protection against the disclosure of information
       to unauthorized recipients or eavesdroppers by allowing for
       encryption of all traffic between SNMP engines.  A TLS Transport
       Model implementation MUST support message encryption to protect
       sensitive data from eavesdropping attacks.

   5.  Denial of Service - The RFC 3411 architecture [RFC3411] states
       that denial-of-service (DoS) attacks need not be addressed by an
       SNMP security protocol.  However, connectionless transports (like
       DTLS over UDP) are susceptible to a variety of DoS attacks
       because they are more vulnerable to spoofed IP addresses.  See
       Section 4.2 for details on how the cookie mechanism is used.
       Note, however, that this mechanism does not provide any defense
       against DoS attacks mounted from valid IP addresses.

   See Section 9 for more detail on the security considerations
   associated with the TLSTM and these security threats.

3.1.2.  Message Protection

   The RFC 3411 architecture recognizes three levels of security:

   o  without authentication and without privacy (noAuthNoPriv)

   o  with authentication but without privacy (authNoPriv)

   o  with authentication and with privacy (authPriv)

   The TLS Transport Model determines from (D)TLS the identity of the
   authenticated principal, the transport type, and the transport
   address associated with an incoming message.  The TLS Transport Model
   provides the identity and destination type and address to (D)TLS for
   outgoing messages.

   When an application requests a session for a message, it also
   requests a security level for that session.  The TLS Transport Model
   MUST ensure that the (D)TLS connection provides security at least as

Top      Up      ToC       Page 13 
   high as the requested level of security.  How the security level is
   translated into the algorithms used to provide data integrity and
   privacy is implementation dependent.  However, the NULL integrity and
   encryption algorithms MUST NOT be used to fulfill security level
   requests for authentication or privacy.  Implementations MAY choose
   to force (D)TLS to only allow cipher_suites that provide both
   authentication and privacy to guarantee this assertion.

   If a suitable interface between the TLS Transport Model and the
   (D)TLS Handshake Protocol is implemented to allow the selection of
   security-level-dependent algorithms (for example, a security level to
   cipher_suites mapping table), then different security levels may be
   utilized by the application.

   The authentication, integrity, and privacy algorithms used by the
   (D)TLS Protocols may vary over time as the science of cryptography
   continues to evolve and the development of (D)TLS continues over
   time.  Implementers are encouraged to plan for changes in operator
   trust of particular algorithms.  Implementations SHOULD offer
   configuration settings for mapping algorithms to SNMPv3 security

3.1.3.  (D)TLS Connections

   (D)TLS connections are opened by the TLS Transport Model during the
   elements of procedure for an outgoing SNMP message.  Since the sender
   of a message initiates the creation of a (D)TLS connection if needed,
   the (D)TLS connection will already exist for an incoming message.

   Implementations MAY choose to instantiate (D)TLS connections in
   anticipation of outgoing messages.  This approach might be useful to
   ensure that a (D)TLS connection to a given target can be established
   before it becomes important to send a message over the (D)TLS
   connection.  Of course, there is no guarantee that a pre-established
   session will still be valid when needed.

   DTLS connections, when used over UDP, are uniquely identified within
   the TLS Transport Model by the combination of transportDomain,
   transportAddress, tmSecurityName, and requestedSecurityLevel
   associated with each session.  Each unique combination of these
   parameters MUST have a locally chosen unique tlstmSessionID for each
   active session.  For further information, see Section 5.  TLS over
   TCP sessions, on the other hand, do not require a unique pairing of
   address and port attributes since their lower-layer protocols (TCP)
   already provide adequate session framing.  But they must still
   provide a unique tlstmSessionID for referencing the session.

Top      Up      ToC       Page 14 
   The tlstmSessionID MUST NOT change during the entire duration of the
   session from the TLSTM's perspective, and MUST uniquely identify a
   single session.  As an implementation hint: note that the (D)TLS
   internal SessionID does not meet these requirements, since it can
   change over the life of the connection as seen by the TLSTM (for
   example, during renegotiation), and does not necessarily uniquely
   identify a TLSTM session (there can be multiple TLSTM sessions
   sharing the same D(TLS) internal SessionID).

3.2.  Security Parameter Passing

   For the (D)TLS server-side, (D)TLS-specific security parameters
   (i.e., cipher_suites, X.509 certificate fields, IP addresses, and
   ports) are translated by the TLS Transport Model into security
   parameters for the TLS Transport Model and security model (e.g.,
   tmSecurityLevel, tmSecurityName, transportDomain, transportAddress).
   The transport-related and (D)TLS-security-related information,
   including the authenticated identity, are stored in a cache
   referenced by tmStateReference.

   For the (D)TLS client side, the TLS Transport Model takes input
   provided by the Dispatcher in the sendMessage() Abstract Service
   Interface (ASI) and input from the tmStateReference cache.  The
   (D)TLS Transport Model converts that information into suitable
   security parameters for (D)TLS and establishes sessions as needed.

   The elements of procedure in Section 5 discuss these concepts in much
   greater detail.

3.3.  Notifications and Proxy

   (D)TLS connections may be initiated by (D)TLS clients on behalf of
   SNMP applications that initiate communications, such as command
   generators, notification originators, proxy forwarders.  Command
   generators are frequently operated by a human, but notification
   originators and proxy forwarders are usually unmanned automated
   processes.  The targets to whom notifications and proxied requests
   should be sent are typically determined and configured by a network

   The SNMP-TARGET-MIB module [RFC3413] contains objects for defining
   management targets, including transportDomain, transportAddress,
   securityName, securityModel, and securityLevel parameters, for
   notification originator, proxy forwarder, and SNMP-controllable
   command generator applications.  Transport domains and transport
   addresses are configured in the snmpTargetAddrTable, and the
   securityModel, securityName, and securityLevel parameters are
   configured in the snmpTargetParamsTable.  This document defines a MIB

Top      Up      ToC       Page 15 
   module that extends the SNMP-TARGET-MIB's snmpTargetParamsTable to
   specify a (D)TLS client-side certificate to use for the connection.

   When configuring a (D)TLS target, the snmpTargetAddrTDomain and
   snmpTargetAddrTAddress parameters in snmpTargetAddrTable SHOULD be
   set to the snmpTLSTCPDomain or snmpDTLSUDPDomain object and an
   appropriate snmpTLSAddress value.  When used with the SNMPv3 message
   processing model, the snmpTargetParamsMPModel column of the
   snmpTargetParamsTable SHOULD be set to a value of 3.  The
   snmpTargetParamsSecurityName SHOULD be set to an appropriate
   securityName value, and the snmpTlstmParamsClientFingerprint
   parameter of the snmpTlstmParamsTable SHOULD be set to a value that
   refers to a locally held certificate (and the corresponding private
   key) to be used.  Other parameters, for example, cryptographic
   configuration such as which cipher_suites to use, must come from
   configuration mechanisms not defined in this document.

   The securityName defined in the snmpTargetParamsSecurityName column
   will be used by the access control model to authorize any
   notifications that need to be sent.

4.  Elements of the Model

   This section contains definitions required to realize the (D)TLS
   Transport Model defined by this document.

4.1.  X.509 Certificates

   (D)TLS can make use of X.509 certificates for authentication of both
   sides of the transport.  This section discusses the use of X.509
   certificates in the TLSTM.

   While (D)TLS supports multiple authentication mechanisms, this
   document only discusses X.509-certificate-based authentication; other
   forms of authentication are outside the scope of this specification.
   TLSTM implementations are REQUIRED to support X.509 certificates.

4.1.1.  Provisioning for the Certificate

   Authentication using (D)TLS will require that SNMP entities have
   certificates, either signed by trusted Certification Authorities
   (CAs), or self signed.  Furthermore, SNMP entities will most commonly
   need to be provisioned with root certificates that represent the list
   of trusted CAs that an SNMP entity can use for certificate
   verification.  SNMP entities SHOULD also be provisioned with an X.509
   certificate revocation mechanism which can be used to verify that a
   certificate has not been revoked.  Trusted public keys from either CA
   certificates and/or self-signed certificates MUST be installed into

Top      Up      ToC       Page 16 
   the server through a trusted out-of-band mechanism and their
   authenticity MUST be verified before access is granted.

   Having received a certificate from a connecting TLSTM client, the
   authenticated tmSecurityName of the principal is derived using the
   snmpTlstmCertToTSNTable.  This table allows mapping of incoming
   connections to tmSecurityNames through defined transformations.  The
   transformations defined in the SNMP-TLS-TM-MIB include:

   o  Mapping a certificate's subjectAltName or CommonName components to
      a tmSecurityName, or

   o  Mapping a certificate's fingerprint value to a directly specified

   As an implementation hint: implementations may choose to discard any
   connections for which no potential snmpTlstmCertToTSNTable mapping
   exists before performing certificate verification to avoid expending
   computational resources associated with certificate verification.

   Deployments SHOULD map the "subjectAltName" component of X.509
   certificates to the TLSTM specific tmSecurityNames.  The
   authenticated identity can be obtained by the TLS Transport Model by
   extracting the subjectAltName(s) from the peer's certificate.  The
   receiving application will then have an appropriate tmSecurityName
   for use by other SNMPv3 components like an access control model.

   An example of this type of mapping setup can be found in Appendix A.

   This tmSecurityName may be later translated from a TLSTM specific
   tmSecurityName to an SNMP engine securityName by the security model.
   A security model, like the TSM security model [RFC5591], may perform
   an identity mapping or a more complex mapping to derive the
   securityName from the tmSecurityName offered by the TLS Transport

   The standard View-Based Access Control Model (VACM) access control
   model constrains securityNames to be 32 octets or less in length.  A
   TLSTM generated tmSecurityName, possibly in combination with a
   messaging or security model that increases the length of the
   securityName, might cause the securityName length to exceed 32
   octets.  For example, a 32-octet tmSecurityName derived from an IPv6
   address, paired with a TSM prefix, will generate a 36-octet
   securityName.  Such a securityName will not be able to be used with
   standard VACM or TARGET MIB modules.  Operators should be careful to
   select algorithms and subjectAltNames to avoid this situation.

Top      Up      ToC       Page 17 
   A pictorial view of the complete transformation process (using the
   TSM security model for the example) is shown below:

    +-------------+     +-------+                   +-----+
    | Certificate |     |       |                   |     |
    |    Path     |     | TLSTM |  tmSecurityName   | TSM |
    | Validation  | --> |       | ----------------->|     |
    +-------------+     +-------+                   +-----+
                                                        | securityName
                                                    | application |

4.2.  (D)TLS Usage

   (D)TLS MUST negotiate a cipher_suite that uses X.509 certificates for
   authentication, and MUST authenticate both the client and the server.
   The mandatory-to-implement cipher_suite is specified in the TLS
   specification [RFC5246].

   TLSTM verifies the certificates when the connection is opened (see
   Section 5.3).  For this reason, TLS renegotiation with different
   certificates MUST NOT be done.  That is, implementations MUST either
   disable renegotiation completely (RECOMMENDED), or they MUST present
   the same certificate during renegotiation (and MUST verify that the
   other end presented the same certificate).

   For DTLS over UDP, each SNMP message MUST be placed in a single UDP
   datagram; it MAY be split to multiple DTLS records.  In other words,
   if a single datagram contains multiple DTLS application_data records,
   they are concatenated when received.  The TLSTM implementation SHOULD
   return an error if the SNMP message does not fit in the UDP datagram,
   and thus cannot be sent.

   For DTLS over UDP, the DTLS server implementation MUST support DTLS
   cookies ([RFC4347] already requires that clients support DTLS
   cookies).  Implementations are not required to perform the cookie
   exchange for every DTLS handshake; however, enabling it by default is

   For DTLS, replay protection MUST be used.

Top      Up      ToC       Page 18 
4.3.  SNMP Services

   This section describes the services provided by the TLS Transport
   Model with their inputs and outputs.  The services are between the
   Transport Model and the Dispatcher.

   The services are described as primitives of an abstract service
   interface (ASI) and the inputs and outputs are described as abstract
   data elements as they are passed in these abstract service

4.3.1.  SNMP Services for an Outgoing Message

   The Dispatcher passes the information to the TLS Transport Model
   using the ASI defined in the Transport Subsystem:

      statusInformation =
      IN   destTransportDomain           -- transport domain to be used
      IN   destTransportAddress          -- transport address to be used
      IN   outgoingMessage               -- the message to send
      IN   outgoingMessageLength         -- its length
      IN   tmStateReference              -- reference to transport state

   The abstract data elements returned from or passed as parameters into
   the abstract service primitives are as follows:

   statusInformation:  An indication of whether the sending of the
      message was successful.  If not, it is an indication of the

   destTransportDomain:  The transport domain for the associated
      destTransportAddress.  The Transport Model uses this parameter to
      determine the transport type of the associated
      destTransportAddress.  This document specifies the
      snmpTLSTCPDomain and the snmpDTLSUDPDomain transport domains.

   destTransportAddress:  The transport address of the destination TLS
      Transport Model in a format specified by the SnmpTLSAddress

   outgoingMessage:  The outgoing message to send to (D)TLS for
      encapsulation and transmission.

   outgoingMessageLength:  The length of the outgoingMessage.

Top      Up      ToC       Page 19 
   tmStateReference:  A reference used to pass model-specific and
      mechanism-specific parameters between the Transport Subsystem and
      transport-aware Security Models.

4.3.2.  SNMP Services for an Incoming Message

   The TLS Transport Model processes the received message from the
   network using the (D)TLS service and then passes it to the Dispatcher
   using the following ASI:

      statusInformation =
      IN   transportDomain               -- origin transport domain
      IN   transportAddress              -- origin transport address
      IN   incomingMessage               -- the message received
      IN   incomingMessageLength         -- its length
      IN   tmStateReference              -- reference to transport state

   The abstract data elements returned from or passed as parameters into
   the abstract service primitives are as follows:

   statusInformation:  An indication of whether the passing of the
      message was successful.  If not, it is an indication of the

   transportDomain:  The transport domain for the associated
      transportAddress.  This document specifies the snmpTLSTCPDomain
      and the snmpDTLSUDPDomain transport domains.

   transportAddress:  The transport address of the source of the
      received message in a format specified by the SnmpTLSAddress

   incomingMessage:  The whole SNMP message after being processed by

   incomingMessageLength:  The length of the incomingMessage.

   tmStateReference:  A reference used to pass model-specific and
      mechanism-specific parameters between the Transport Subsystem and
      transport-aware Security Models.

Top      Up      ToC       Page 20 
4.4.  Cached Information and References

   When performing SNMP processing, there are two levels of state
   information that may need to be retained: the immediate state linking
   a request-response pair, and potentially longer-term state relating
   to transport and security.  "Transport Subsystem for the Simple
   Network Management Protocol (SNMP)" [RFC5590] defines general
   requirements for caches and references.

4.4.1.  TLS Transport Model Cached Information

   The TLS Transport Model has specific responsibilities regarding the
   cached information.  See the Elements of Procedure in Section 5 for
   detailed processing instructions on the use of the tmStateReference
   fields by the TLS Transport Model.  tmSecurityName

   The tmSecurityName MUST be a human-readable name (in snmpAdminString
   format) representing the identity that has been set according to the
   procedures in Section 5.  The tmSecurityName MUST be constant for all
   traffic passing through a single TLSTM session.  Messages MUST NOT be
   sent through an existing (D)TLS connection that was established using
   a different tmSecurityName.

   On the (D)TLS server side of a connection, the tmSecurityName is
   derived using the procedures described in Section 5.3.2 and the SNMP-
   TLS-TM-MIB's snmpTlstmCertToTSNTable DESCRIPTION clause.

   On the (D)TLS client side of a connection, the tmSecurityName is
   presented to the TLS Transport Model by the security model through
   the tmStateReference.  This tmSecurityName is typically a copy of or
   is derived from the securityName that was passed by application
   (possibly because of configuration specified in the SNMP-TARGET-MIB).
   The Security Model likely derived the tmSecurityName from the
   securityName presented to the Security Model by the application
   (possibly because of configuration specified in the SNMP-TARGET-MIB).

   Transport-Model-aware security models derive tmSecurityName from a
   securityName, possibly configured in MIB modules for notifications
   and access controls.  Transport Models SHOULD use predictable
   tmSecurityNames so operators will know what to use when configuring
   MIB modules that use securityNames derived from tmSecurityNames.  The
   TLSTM generates predictable tmSecurityNames based on the
   configuration found in the SNMP-TLS-TM-MIB's snmpTlstmCertToTSNTable
   and relies on the network operators to have configured this table

Top      Up      ToC       Page 21  tmSessionID

   The tmSessionID MUST be recorded per message at the time of receipt.
   When tmSameSecurity is set, the recorded tmSessionID can be used to
   determine whether the (D)TLS connection available for sending a
   corresponding outgoing message is the same (D)TLS connection as was
   used when receiving the incoming message (e.g., a response to a
   request).  Session State

   The per-session state that is referenced by tmStateReference may be
   saved across multiple messages in a Local Configuration Datastore.
   Additional session/connection state information might also be stored
   in a Local Configuration Datastore.

5.  Elements of Procedure

   Abstract service interfaces have been defined by [RFC3411] and
   further augmented by [RFC5590] to describe the conceptual data flows
   between the various subsystems within an SNMP entity.  The TLSTM uses
   some of these conceptual data flows when communicating between

   To simplify the elements of procedure, the release of state
   information is not always explicitly specified.  As a general rule,
   if state information is available when a message gets discarded, the
   message-state information should also be released.  If state
   information is available when a session is closed, the session state
   information should also be released.  Sensitive information, like
   cryptographic keys, should be overwritten appropriately prior to
   being released.

   An error indication in statusInformation will typically include the
   Object Identifier (OID) and value for an incremented error counter.
   This may be accompanied by the requested securityLevel and the
   tmStateReference.  Per-message context information is not accessible
   to Transport Models, so for the returned counter OID and value,
   contextEngine would be set to the local value of snmpEngineID and
   contextName to the default context for error counters.

5.1.  Procedures for an Incoming Message

   This section describes the procedures followed by the (D)TLS
   Transport Model when it receives a (D)TLS protected packet.  The
   required functionality is broken into two different sections.

Top      Up      ToC       Page 22 
   Section 5.1.1 describes the processing required for de-multiplexing
   multiple DTLS connections, which is specifically needed for DTLS over
   UDP sessions.  It is assumed that TLS protocol implementations
   already provide appropriate message demultiplexing.

   Section 5.1.2 describes the transport processing required once the
   (D)TLS processing has been completed.  This will be needed for all
   (D)TLS-based connections.

5.1.1.  DTLS over UDP Processing for Incoming Messages

   Demultiplexing of incoming packets into separate DTLS sessions MUST
   be implemented.  For connection-oriented transport protocols, such as
   TCP, the transport protocol takes care of demultiplexing incoming
   packets to the right connection.  For DTLS over UDP, this
   demultiplexing will either need to be done within the DTLS
   implementation, if supported, or by the TLSTM implementation.

   Like TCP, DTLS over UDP uses the four-tuple <source IP, destination
   IP, source port, destination port> for identifying the connection
   (and relevant DTLS connection state).  This means that when
   establishing a new session, implementations MUST use a different UDP
   source port number for each active connection to a remote destination
   IP-address/port-number combination to ensure the remote entity can
   disambiguate between multiple connections.

   If demultiplexing received UDP datagrams to DTLS connection state is
   done by the TLSTM implementation (instead of the DTLS
   implementation), the steps below describe one possible method to
   accomplish this.

   The important output results from the steps in this process are the
   remote transport address, incomingMessage, incomingMessageLength, and
   the tlstmSessionID.

   1)  The TLS Transport Model examines the raw UDP message, in an
       implementation-dependent manner.

   2)  The TLS Transport Model queries the Local Configuration Datastore
       (LCD) (see [RFC3411], Section 3.4.2) using the transport
       parameters (source and destination IP addresses and ports) to
       determine if a session already exists.

       2a)  If a matching entry in the LCD does not exist, then the UDP
            packet is passed to the DTLS implementation for processing.
            If the DTLS implementation decides to continue with the
            connection and allocate state for it, it returns a new DTLS
            connection handle (an implementation dependent detail).  In

Top      Up      ToC       Page 23 
            this case, TLSTM selects a new tlstmSessionId, and caches
            this and the DTLS connection handle as a new entry in the
            LCD (indexed by the transport parameters).  If the DTLS
            implementation returns an error or does not allocate
            connection state (which can happen with the stateless cookie
            exchange), processing stops.

       2b)  If a session does exist in the LCD, then its DTLS connection
            handle (an implementation dependent detail) and its
            tlstmSessionId is extracted from the LCD.  The UDP packet
            and the connection handle are passed to the DTLS
            implementation.  If the DTLS implementation returns success
            but does not return an incomingMessage and an
            incomingMessageLength, then processing stops (this is the
            case when the UDP datagram contained DTLS handshake
            messages, for example).  If the DTLS implementation returns
            an error, then processing stops.

   3)  Retrieve the incomingMessage and an incomingMessageLength from
       DTLS.  These results and the tlstmSessionID are used below in
       Section 5.1.2 to complete the processing of the incoming message.

5.1.2.  Transport Processing for Incoming SNMP Messages

   The procedures in this section describe how the TLS Transport Model
   should process messages that have already been properly extracted
   from the (D)TLS stream.  Note that care must be taken when processing
   messages originating from either TLS or DTLS to ensure they're
   complete and single.  For example, multiple SNMP messages can be
   passed through a single DTLS message and partial SNMP messages may be
   received from a TLS stream.  These steps describe the processing of a
   singular SNMP message after it has been delivered from the (D)TLS

   1)  Determine the tlstmSessionID for the incoming message.  The
       tlstmSessionID MUST be a unique session identifier for this
       (D)TLS connection.  The contents and format of this identifier
       are implementation dependent as long as it is unique to the
       session.  A session identifier MUST NOT be reused until all
       references to it are no longer in use.  The tmSessionID is equal
       to the tlstmSessionID discussed in Section 5.1.1. tmSessionID
       refers to the session identifier when stored in the
       tmStateReference and tlstmSessionID refers to the session
       identifier when stored in the LCD.  They MUST always be equal
       when processing a given session's traffic.

Top      Up      ToC       Page 24 
       If this is the first message received through this session, and
       the session does not have an assigned tlstmSessionID yet, then
       the snmpTlstmSessionAccepts counter is incremented and a
       tlstmSessionID for the session is created.  This will only happen
       on the server side of a connection because a client would have
       already assigned a tlstmSessionID during the openSession()
       invocation.  Implementations may have performed the procedures
       described in Section 5.3.2 prior to this point or they may
       perform them now, but the procedures described in Section 5.3.2
       MUST be performed before continuing beyond this point.

   2)  Create a tmStateReference cache for the subsequent reference and
       assign the following values within it:

       tmTransportDomain  = snmpTLSTCPDomain or snmpDTLSUDPDomain as

       tmTransportAddress  = The address from which the message

       tmSecurityLevel  = The derived tmSecurityLevel for the session,
          as discussed in Sections 3.1.2 and 5.3.

       tmSecurityName  = The derived tmSecurityName for the session as
          discussed in Section 5.3.  This value MUST be constant during
          the lifetime of the session.

       tmSessionID  = The tlstmSessionID described in step 1 above.

   3)  The incomingMessage and incomingMessageLength are assigned values
       from the (D)TLS processing.

   4)  The TLS Transport Model passes the transportDomain,
       transportAddress, incomingMessage, and incomingMessageLength to
       the Dispatcher using the receiveMessage ASI:

      statusInformation =
      IN   transportDomain     -- snmpTLSTCPDomain or snmpDTLSUDPDomain,
      IN   transportAddress    -- address for the received message
      IN   incomingMessage        -- the whole SNMP message from (D)TLS
      IN   incomingMessageLength  -- the length of the SNMP message
      IN   tmStateReference    -- transport info

Top      Up      ToC       Page 25 
5.2.  Procedures for an Outgoing SNMP Message

   The Dispatcher sends a message to the TLS Transport Model using the
   following ASI:

      statusInformation =
      IN   destTransportDomain           -- transport domain to be used
      IN   destTransportAddress          -- transport address to be used
      IN   outgoingMessage               -- the message to send
      IN   outgoingMessageLength         -- its length
      IN   tmStateReference              -- transport info

   This section describes the procedure followed by the TLS Transport
   Model whenever it is requested through this ASI to send a message.

   1)  If tmStateReference does not refer to a cache containing values
       for tmTransportDomain, tmTransportAddress, tmSecurityName,
       tmRequestedSecurityLevel, and tmSameSecurity, then increment the
       snmpTlstmSessionInvalidCaches counter, discard the message, and
       return the error indication in the statusInformation.  Processing
       of this message stops.

   2)  Extract the tmSessionID, tmTransportDomain, tmTransportAddress,
       tmSecurityName, tmRequestedSecurityLevel, and tmSameSecurity
       values from the tmStateReference.  Note: the tmSessionID value
       may be undefined if no session exists yet over which the message
       can be sent.

   3)  If tmSameSecurity is true and tmSessionID is either undefined or
       refers to a session that is no longer open, then increment the
       snmpTlstmSessionNoSessions counter, discard the message, and
       return the error indication in the statusInformation.  Processing
       of this message stops.

   4)  If tmSameSecurity is false and tmSessionID refers to a session
       that is no longer available, then an implementation SHOULD open a
       new session, using the openSession() ASI (described in greater
       detail in step 5b).  Instead of opening a new session an
       implementation MAY return an snmpTlstmSessionNoSessions error to
       the calling module and stop the processing of the message.

   5)  If tmSessionID is undefined, then use tmTransportDomain,
       tmTransportAddress, tmSecurityName, and tmRequestedSecurityLevel
       to see if there is a corresponding entry in the LCD suitable to
       send the message over.

Top      Up      ToC       Page 26 
       5a)  If there is a corresponding LCD entry, then this session
            will be used to send the message.

       5b)  If there is no corresponding LCD entry, then open a session
            using the openSession() ASI (discussed further in
            Section 5.3.1).  Implementations MAY wish to offer message
            buffering to prevent redundant openSession() calls for the
            same cache entry.  If an error is returned from
            openSession(), then discard the message, discard the
            tmStateReference, increment the snmpTlstmSessionOpenErrors,
            return an error indication to the calling module, and stop
            the processing of the message.

   6)  Using either the session indicated by the tmSessionID (if there
       was one) or the session resulting from a previous step (4 or 5),
       pass the outgoingMessage to (D)TLS for encapsulation and

5.3.  Establishing or Accepting a Session

   Establishing a (D)TLS connection as either a client or a server
   requires slightly different processing.  The following two sections
   describe the necessary processing steps.

5.3.1.  Establishing a Session as a Client

   The TLS Transport Model provides the following primitive for use by a
   client to establish a new (D)TLS connection:

   statusInformation =           -- errorIndication or success
   IN   tmStateReference         -- transport information to be used
   OUT  tmStateReference         -- transport information to be used
   IN   maxMessageSize           -- of the sending SNMP entity

   The following describes the procedure to follow when establishing an
   SNMP over a (D)TLS connection between SNMP engines for exchanging
   SNMP messages.  This process is followed by any SNMP client's engine
   when establishing a session for subsequent use.

   This procedure MAY be done automatically for an SNMP application that
   initiates a transaction, such as a command generator, a notification
   originator, or a proxy forwarder.

   1)  The snmpTlstmSessionOpens counter is incremented.

Top      Up      ToC       Page 27 
   2)  The client selects the appropriate certificate and cipher_suites
       for the key agreement based on the tmSecurityName and the
       tmRequestedSecurityLevel for the session.  For sessions being
       established as a result of an SNMP-TARGET-MIB based operation,
       the certificate will potentially have been identified via the
       snmpTlstmParamsTable mapping and the cipher_suites will have to
       be taken from a system-wide or implementation-specific
       configuration.  If no row in the snmpTlstmParamsTable exists,
       then implementations MAY choose to establish the connection using
       a default client certificate available to the application.
       Otherwise, the certificate and appropriate cipher_suites will
       need to be passed to the openSession() ASI as supplemental
       information or configured through an implementation-dependent
       mechanism.  It is also implementation-dependent and possibly
       policy-dependent how tmRequestedSecurityLevel will be used to
       influence the security capabilities provided by the (D)TLS
       connection.  However this is done, the security capabilities
       provided by (D)TLS MUST be at least as high as the level of
       security indicated by the tmRequestedSecurityLevel parameter.
       The actual security level of the session is reported in the
       tmStateReference cache as tmSecurityLevel.  For (D)TLS to provide
       strong authentication, each principal acting as a command
       generator SHOULD have its own certificate.

   3)  Using the destTransportDomain and destTransportAddress values,
       the client will initiate the (D)TLS handshake protocol to
       establish session keys for message integrity and encryption.

       If the attempt to establish a session is unsuccessful, then
       snmpTlstmSessionOpenErrors is incremented, an error indication is
       returned, and processing stops.  If the session failed to open
       because the presented server certificate was unknown or invalid,
       then the snmpTlstmSessionUnknownServerCertificate or
       snmpTlstmSessionInvalidServerCertificates MUST be incremented and
       an snmpTlstmServerCertificateUnknown or
       snmpTlstmServerInvalidCertificate notification SHOULD be sent as
       appropriate.  Reasons for server certificate invalidation
       include, but are not limited to, cryptographic validation
       failures and an unexpected presented certificate identity.

   4)  The (D)TLS client MUST then verify that the (D)TLS server's
       presented certificate is the expected certificate.  The (D)TLS
       client MUST NOT transmit SNMP messages until the server
       certificate has been authenticated, the client certificate has
       been transmitted, and the TLS connection has been fully

Top      Up      ToC       Page 28 
       If the connection is being established from a configuration based
       on SNMP-TARGET-MIB configuration, then the snmpTlstmAddrTable
       DESCRIPTION clause describes how the verification is done (using
       either a certificate fingerprint, or an identity authenticated
       via certification path validation).

       If the connection is being established for reasons other than
       configuration found in the SNMP-TARGET-MIB, then configuration
       and procedures outside the scope of this document should be
       followed.  Configuration mechanisms SHOULD be similar in nature
       to those defined in the snmpTlstmAddrTable to ensure consistency
       across management configuration systems.  For example, a command-
       line tool for generating SNMP GETs might support specifying
       either the server's certificate fingerprint or the expected host
       name as a command-line argument.

   5)  (D)TLS provides assurance that the authenticated identity has
       been signed by a trusted configured Certification Authority.  If
       verification of the server's certificate fails in any way (for
       example, because of failures in cryptographic verification or the
       presented identity did not match the expected named entity), then
       the session establishment MUST fail, and the
       snmpTlstmSessionInvalidServerCertificates object is incremented.
       If the session cannot be opened for any reason at all, including
       cryptographic verification failures and snmpTlstmCertToTSNTable
       lookup failures, then the snmpTlstmSessionOpenErrors counter is
       incremented and processing stops.

   6)  The TLSTM-specific session identifier (tlstmSessionID) is set in
       the tmSessionID of the tmStateReference passed to the TLS
       Transport Model to indicate that the session has been established
       successfully and to point to a specific (D)TLS connection for
       future use.  The tlstmSessionID is also stored in the LCD for
       later lookup during processing of incoming messages
       (Section 5.1.2).

5.3.2.  Accepting a Session as a Server

   A (D)TLS server should accept new session connections from any client
   for which it is able to verify the client's credentials.  This is
   done by authenticating the client's presented certificate through a
   certificate path validation process (e.g., [RFC5280]) or through
   certificate fingerprint verification using fingerprints configured in
   the snmpTlstmCertToTSNTable.  Afterward, the server will determine
   the identity of the remote entity using the following procedures.

Top      Up      ToC       Page 29 
   The (D)TLS server identifies the authenticated identity from the
   (D)TLS client's principal certificate using configuration information
   from the snmpTlstmCertToTSNTable mapping table.  The (D)TLS server
   MUST request and expect a certificate from the client and MUST NOT
   accept SNMP messages over the (D)TLS connection until the client has
   sent a certificate and it has been authenticated.  The resulting
   derived tmSecurityName is recorded in the tmStateReference cache as
   tmSecurityName.  The details of the lookup process are fully
   described in the DESCRIPTION clause of the snmpTlstmCertToTSNTable
   MIB object.  If any verification fails in any way (for example,
   because of failures in cryptographic verification or because of the
   lack of an appropriate row in the snmpTlstmCertToTSNTable), then the
   session establishment MUST fail, and the
   snmpTlstmSessionInvalidClientCertificates object is incremented.  If
   the session cannot be opened for any reason at all, including
   cryptographic verification failures, then the
   snmpTlstmSessionOpenErrors counter is incremented and processing

   Servers that wish to support multiple principals at a particular port
   SHOULD make use of a (D)TLS extension that allows server-side
   principal selection like the Server Name Indication extension defined
   in Section 3.1 of [RFC4366].  Supporting this will allow, for
   example, sending notifications to a specific principal at a given TCP
   or UDP port.

5.4.  Closing a Session

   The TLS Transport Model provides the following primitive to close a

   statusInformation =
   IN  tmSessionID        -- session ID of the session to be closed

   The following describes the procedure to follow to close a session
   between a client and server.  This process is followed by any SNMP
   engine closing the corresponding SNMP session.

   1)  Increment either the snmpTlstmSessionClientCloses or the
       snmpTlstmSessionServerCloses counter as appropriate.

   2)  Look up the session using the tmSessionID.

   3)  If there is no open session associated with the tmSessionID, then
       closeSession processing is completed.

Top      Up      ToC       Page 30 
   4)  Have (D)TLS close the specified connection.  This MUST include
       sending a close_notify TLS Alert to inform the other side that
       session cleanup may be performed.

6.  MIB Module Overview

   This MIB module provides management of the TLS Transport Model.  It
   defines needed textual conventions, statistical counters,
   notifications, and configuration infrastructure necessary for session
   establishment.  Example usage of the configuration tables can be
   found in Appendix A.

6.1.  Structure of the MIB Module

   Objects in this MIB module are arranged into subtrees.  Each subtree
   is organized as a set of related objects.  The overall structure and
   assignment of objects to their subtrees, and the intended purpose of
   each subtree, is shown below.

6.2.  Textual Conventions

   Generic and Common Textual Conventions used in this module can be
   found summarized at

   This module defines the following new Textual Conventions:

   o  A new TransportAddress format for describing (D)TLS connection
      addressing requirements.

   o  A certificate fingerprint allowing MIB module objects to
      generically refer to a stored X.509 certificate using a
      cryptographic hash as a reference pointer.

6.3.  Statistical Counters

   The SNMP-TLS-TM-MIB defines counters that provide network management
   stations with information about session usage and potential errors
   that a device may be experiencing.

6.4.  Configuration Tables

   The SNMP-TLS-TM-MIB defines configuration tables that an
   administrator can use for configuring a device for sending and
   receiving SNMP messages over (D)TLS.  In particular, there are MIB
   tables that extend the SNMP-TARGET-MIB for configuring (D)TLS
   certificate usage and a MIB table for mapping incoming (D)TLS client
   certificates to SNMPv3 tmSecurityNames.

Top      Up      ToC       Page 31 
6.4.1.  Notifications

   The SNMP-TLS-TM-MIB defines notifications to alert management
   stations when a (D)TLS connection fails because a server's presented
   certificate did not meet an expected value
   (snmpTlstmServerCertificateUnknown) or because cryptographic
   validation failed (snmpTlstmServerInvalidCertificate).

6.5.  Relationship to Other MIB Modules

   Some management objects defined in other MIB modules are applicable
   to an entity implementing the TLS Transport Model.  In particular, it
   is assumed that an entity implementing the SNMP-TLS-TM-MIB will
   implement the SNMPv2-MIB [RFC3418], the SNMP-FRAMEWORK-MIB [RFC3411],
   and the SNMP-VIEW-BASED-ACM-MIB [RFC3415].

   The SNMP-TLS-TM-MIB module contained in this document is for managing
   TLS Transport Model information.

6.5.1.  MIB Modules Required for IMPORTS

   The SNMP-TLS-TM-MIB module imports items from SNMPv2-SMI [RFC2578],
   [RFC3413], and SNMPv2-CONF [RFC2580].

(page 31 continued on part 3)

Next RFC Part