RFC 5343
Simple Network Management Protocol (SNMP) Context EngineID Discovery
RFC 5343: Simple Network Management Protocol (SNMP) Context EngineID Discovery π
Part 1 of 2 π
- Written by: J. Schoenwaelder, Jacobs University Bremen π
- RFC number: 5343
- Category: Standards Track π₯
- Date: September 2008 π
- Updates: RFC 3411 (this one tweaks an older spec, obsessed π«Ά)
- Obsoletes: nothing is listed in the header
Status of This Memo β¨
okay so this doc is an Internet standards track protocol, meaning the community is invited to talk about it and suggest improvements π If you want the current official status of this protocol, check the "Internet Official Protocol Standards" (STD 1) document. And distribution of this memo is unlimited, so share it with everyone π
Abstract π¦
so SNMPv3 needs an app to already know the identifier (snmpEngineID) of the remote SNMP protocol engine before it can grab or change objects on that remote SNMP entity. no cap, that's a lot of prep π
this doc introduces a well-known localEngineID plus a discovery mechanism that lets you learn the snmpEngineID of a remote SNMP protocol engine π§ It's not tied to any SNMP security model's features, and other protocol interfaces that access managed objects may use it too.
this document updates RFC 3411. π
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Background . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Local EngineID . . . . . . . . . . . . . . . . . . . . . . 4
3.2. EngineID Discovery . . . . . . . . . . . . . . . . . . . . 4
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 7
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7.1. Normative References . . . . . . . . . . . . . . . . . . . 7
7.2. Informative References . . . . . . . . . . . . . . . . . . 7
1. Introduction πΈ
okay so to retrieve or manipulate management information using SNMPv3 [RFC3410], you need the identifier of the remote SNMP protocol engine, the so-called snmpEngineID [RFC3411] π§ You can configure an appropriate snmpEngineID on every management application for every SNMP agent, but honestly it's way more iconic to discover it automatically π€©
this document introduces a discovery mechanism that lets you learn the snmpEngineID of a remote SNMP protocol engine β¨ It doesn't depend on features from SNMP security models, and it was designed to coexist with discovery mechanisms that security models already have, like the authoritative engine identifier discovery of the User-based Security Model (USM) of SNMP [RFC3414] π«Ά Teamwork makes the dream work!
This document updates RFC 3411 [RFC3411] by clarifying the IANA rules for the maintenance of the SnmpEngineID format registry. π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. π
2. Background π¦
within an administrative domain, an SNMP engine is uniquely identified by an snmpEngineID value [RFC3411] π An SNMP entity is made up of an SNMP engine and several SNMP applications, and it may give access to multiple contexts π
an SNMP context is a collection of management information that an SNMP entity can access π One item of management information may live in more than one context, and an SNMP entity can potentially access lots of contexts [RFC3411] π A context is identified by the snmpEngineID value of the entity hosting the management information (also called a contextEngineID) plus a context name that identifies the specific context (also called a contextName) π§
to identify one individual item of management information within an administrative domain, you use a four tuple made of:
- a contextEngineID,
- a contextName,
- an object type, and
- its instance identification.
the last two elements are encoded in an object identifier (OID) value β¨ The contextName is a character string (following the SnmpAdminString textual convention of the SNMP-FRAMEWORK-MIB [RFC3411]), while the contextEngineID is an octet string built according to the rules defined as part of the SnmpEngineID textual convention of the SNMP-FRAMEWORK-MIB [RFC3411] π
the SNMP protocol operations and the protocol data units (PDUs) work on OIDs, so they deal with object types and instances [RFC3416] π The SNMP architecture [RFC3411] introduces the concept of a scopedPDU, a data structure containing a contextEngineID, a contextName, and a PDU π The SNMP version 3 (SNMPv3) message format uses ScopedPDUs to exchange management information [RFC3412] π«Ά
within the SNMP framework, contextEngineIDs act as end-to-end identifiers π This matters when SNMP proxies are deployed to translate between protocol versions, or to cross middleboxes such as network address translators π snmpEngineIDs also separate the identity of an SNMP engine from the transport addresses used to talk to it π¦ That's lowkey genius, because you can correlate management information easily, even when multiple different transports were used to retrieve it or when transport addresses change dynamically π₯
to retrieve data from an SNMPv3 agent, you need the right contextEngineID π The User-based Security Model (USM) of SNMPv3 has a mechanism to discover the snmpEngineID of the remote SNMP engine, since security processing needs it π The discovered snmpEngineID can then be used as a contextEngineID in a ScopedPDU to access management information local to the remote SNMP engine π§ Other security models, like the Transport Security Model (TSM) [TSM], don't have such a procedure and may use the discovery mechanism defined in this memo π
3. Procedure π§
the proposed discovery mechanism has two parts, namely (i) a special well-known snmpEngineID value called the localEngineID, which always refers to a local default context, and (ii) a procedure to acquire the snmpEngineID scalar of the SNMP-FRAMEWORK-MIB [RFC3411] using that special well-known localEngineID value π
3.1. Local EngineID π
an SNMP command responder implementing this specification MUST register their pduTypes using the localEngineID snmpEngineID value (defined below) by invoking the registerContextEngineID() Abstract Service Interface (ASI) defined in RFC 3412 [RFC3412] π This registration happens in addition to the normal registration under the SNMP engine's snmpEngineID π«Ά That's consistent with SNMPv3, since those specs explicitly allow registering multiple engineIDs and multiple pduTypes [RFC3412] β¨
the SnmpEngineID textual convention [RFC3411] says an snmpEngineID value MUST be between 5 and 32 octets long π This spec proposes using the variable length format 3) of the SnmpEngineID textual convention, and allocating the reserved, unused format value 6, using enterprise ID 0 for the localEngineID π An ASN.1 definition for localEngineID would look like this:
localEngineID OCTET STRING ::= '8000000006'H
the localEngineID value always gives access to the default context of an SNMP engine π¦ Note that localEngineID is meant to be used as a special value for the contextEngineID field in the ScopedPDU π It MUST NOT be used as a value to identify an SNMP engine, so that value MUST NOT be used in the snmpEngineID.0 scalar [RFC3418] or in the msgAuthoritativeEngineID field in the securityParameters of the User-based Security Model (USM) [RFC3414] π« no mixing those up, bestie π
3.2. EngineID Discovery π
discovery of the snmpEngineID is done by sending a Read Class protocol operation (see Section 2.8 of [RFC3411]) to retrieve the snmpEngineID scalar, using the localEngineID defined above as a contextEngineID value π§ Implementations SHOULD only perform this discovery step when it's actually needed β° If security models are used that already discover the remote snmpEngineID (such as USM), then no further discovery is necessary π The same goes when the application already knows a suitable snmpEngineID value πΈ
the procedure to discover the snmpEngineID of a remote SNMP engine goes like this:
- Check whether a suitable contextEngineID value is already known. If yes, use the provided contextEngineID value and stop the discovery procedure.
- Check whether the selected security model supports discovery of the remote snmpEngineID (e.g., USM with its discovery mechanism). If yes, let the security model perform the discovery. If the remote snmpEngineID value has been successfully determined, assign it to the contextEngineID and stop the discovery procedure.
- Send a Read Class operation to the remote SNMP engine using the localEngineID value as the contextEngineID in order to retrieve the scalar snmpEngineID.0 of the SNMP-FRAMEWORK-MIB [RFC3411]. If successful, set the contextEngineID to the retrieved value and stop the discovery procedure.
- Return an error indication that a suitable contextEngineID could not be discovered.
the procedure above is just an example, and you can tweak it to retrieve more variables in step 3, like the sysObjectID.0 scalar or the snmpSetSerialNo.0 scalar of the SNMPv2-MIB [RFC3418] π
part 2 drops next, stay tuned ππ«Ά
5. Security Considerations πβ¨
Okay bestie, security is where we get serious π . SNMP version 3 (SNMPv3) comes with cryptographic security to protect devices from unauthorized access π. This spec says you should lean on those SNMPv3 security services, and in particular, it is RECOMMENDED to protect the discovery exchange π‘οΈ.
An snmpEngineID can contain a device's MAC address, IPv4 address, IPv6 address, or text that someone assigned on purpose π. An attacker sitting behind a router, firewall, or network address translator might not be able to grab that info directly, so they could go digging for snmpEngineID values to get the device details instead π¬.
In a lot of environments, letting snmpEngineID values be read at the noAuthNoPriv security level is actually helpful π. Legit tools use it to figure out basic facts about a device with an algorithm. That's why the default View-based Access Control Model (VACM) setup in Appendix A of RFC 3415 [RFC3415] gives noAuthNoPriv read access to the snmpEngineID π. The USM discovery mechanism from RFC 3414 [RFC3414] also sends unprotected messages and reveals snmpEngineID values, so keep that in mind π.
In highly secure environments, you can protect snmpEngineID values by using the discovery mechanism described here together with a security model that never sends cleartext SNMP messages π. The Transport Security Model (TSM) [TSM] is one example π¦.
Here's the tea β: the isAccessAllowed() abstract service primitive in the SNMP access control subsystem doesn't look at the contextEngineID when it checks access rights [RFC3411] π. So it's not possible to define a special view for contextEngineID discovery. A request using a localEngineID gets treated just like a request with the correct snmpEngineID by the access control subsystem π. This matches the SNMPv3 design, where the authenticated identity is the securityName (along with the securityModel and securityLevel), and neither transport addresses nor knowing contextEngineID values change the access-control decision π.
6. Acknowledgments π«Ά
Dave Perkins suggested adding a "local" contextEngineID during the ISMS (Integrated Security Model for SNMP) working group interim meeting in Boston, 2006 πΈ. Joe Fernandez, David Harrington, Dan Romascanu, and Bert Wijnen gave super helpful review and feedback, which made this document better β¨.
7. References π
7.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3411] Harrington, D., Presuhn, R., and B. Wijnen, "An
Architecture for Describing Simple Network Management
Protocol (SNMP) Management Frameworks", STD 62, RFC 3411,
December 2002.
[RFC3412] Case, J., Harrington, D., Presuhn, R., and B. Wijnen,
"Message Processing and Dispatching for the Simple Network
Management Protocol (SNMP)", STD 62, RFC 3412,
December 2002.
[RFC3414] Blumenthal, U. and B. Wijnen, "User-based Security Model
(USM) for version 3 of the Simple Network Management
Protocol (SNMPv3)", STD 62, RFC 3414, December 2002.
[RFC3416] Presuhn, R., "Version 2 of the Protocol Operations for the
Simple Network Management Protocol (SNMP)", STD 62,
RFC 3416, December 2002.
[RFC3418] Presuhn, R., "Management Information Base (MIB) for the
Simple Network Management Protocol (SNMP)", STD 62,
RFC 3418, December 2002.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008.
7.2. Informative References
[RFC3410] Case, J., Mundy, R., Partain, D., and B. Stewart,
"Introduction and Applicability Statements for Internet-
Standard Management Framework", RFC 3410, December 2002.
[RFC3415] Wijnen, B., Presuhn, R., and K. McCloghrie, "View-based
Access Control Model (VACM) for the Simple Network
Management Protocol (SNMP)", STD 62, RFC 3415,
December 2002.
[TSM] Harrington, D., "Transport Security Model for SNMP", Work
in Progress, July 2008.
Author's Address ποΈ
Juergen Schoenwaelder
Jacobs University Bremen
Campus Ring 1
28725 Bremen
Germany
Phone: +49 421 200-3587
EMail: j.schoenwaelder@jacobs-university.de
Full Copyright Statement βοΈ
Copyright (C) The IETF Trust (2008) π.
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights π.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE π.
Intellectual Property π¦
The IETF takes no position on whether any Intellectual Property Rights or other rights that someone might claim over the technology in this document are valid or in scope, or on whether any license under those rights might be available π€·ββοΈ. It also doesn't claim to have checked for any such rights itself. Info on how rights work for RFC documents is in BCP 78 and BCP 79 π.
Copies of IPR disclosures sent to the IETF Secretariat, any assurances of licenses that will be available, and the results of any attempt to get a general license or permission to use such proprietary rights by implementers or users of this spec can be found in the IETF online IPR repository at http://www.ietf.org/ipr π.
The IETF invites anyone who's interested to tell it about any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard π. Send that info to ietf-ipr@ietf.org π.
π¦ where this page comes from
- ietf: rfc5343 2008-09
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms