rfc-4011

Policy Based Management MIB

S. Waldbusser, J. Saperia, T. Hongal
date2005-03 streamIETF areaops wgsnmpconf statusPROPOSED STANDARD pages121 canonicalhttps://www.rfc-editor.org/rfc/rfc4011 doi10.17487/RFC4011
This memo defines a portion of the Management Information Base (MIB) for use with network management protocols in TCP/IP-based internets. In particular, this MIB defines objects that enable policy-based monitoring and management of Simple Network Management Protocol (SNMP) infrastructures, a scripting language, and a script execution environment. [STANDARDS-TRACK]

Extracted elements (31)

design-rationale §4.3

A special element type '0.0' always exists and represents the single instance of the system itself, providing an execution context for policies operating on scalar MIB objects. No actual element discovery takes place for '0.0', and pmElementTypeRegMaxLatency has no effect for it.

snmp

design-rationale §7

Library conformance is advertised by registering the library name as a role characteristic of the system element ('0.0') in the default SNMP context. This lets policy conditions test library availability via roleMatch('libraryName', '0.0') without requiring a separate capability protocol.

snmp

design-rationale §5

PolicyScript is formally defined as a subset of ISO C++ rather than a new language, allowing programmers familiar with C, Perl, TCL, Python, or JavaScript to quickly write scripts. A subset was chosen to enable easy development of low-cost interpreters and to remove constructs peculiar to C/C++ (pointers, structs, enums, floating point, preprocessor).

snmp

design-rationale §5.2

PolicyScript uses a loosely-typed 'var' class (modeled after ECMAScript semantics) instead of native C++ types so that scripts can remain short and easy to write. The var type holds either an integer (-2^63 to 2^64-1) or a string (sequence of 8-bit values), with automatic coercion between types.

snmp

interoperability-note §4.3.1

Entries in the pmElementTypeRegTable that differ only in the last subidentifier (the column selector) are effectively duplicates and should be treated as such. Adding an extra or missing sub-identifier when registering an element type will cause all elements to be discovered zero or many times, with malformed element addresses.

snmp

interoperability-note §8.1.3.1

NMS user interfaces are encouraged to display and accept MIB object names using descriptor values (e.g., 'ifType.7'), but MUST translate those descriptors to dotted-decimal format before sending them in MIB objects to policy agents, since policy agents may have no MIB compiler or MIB file available.

snmp

normative-requirement §4.3.1 REQUIRED

Before registering an element type, a manager is REQUIRED to inspect the pmElementTypeRegTable to see whether it is already registered. The management station is responsible for registering well-formed OIDs, as the system implementing the MIB may not validate them.

snmp

normative-requirement §4.3 MUST

If the agent is discovering elements by polling, it MUST check for new elements no less frequently than pmElementTypeRegMaxLatency dictates. When an element is first discovered, all policyConditions MUST be run immediately.

snmp

normative-requirement §4.3 SHOULD

Implementations SHOULD discover newly created elements via asynchronous notification (e.g., 'card inserted') rather than polling when such capability is available, resulting in immediate configuration of the discovered element.

snmp

normative-requirement §7 MUST

In order to claim conformance to a function library, an implementation MUST implement all functions in that library. A single missing function means the library cannot be claimed.

snmp

normative-requirement §3 RECOMMENDED

It is RECOMMENDED that role strings not duplicate information available in MIB objects; role strings should describe information not otherwise accessible in MIB objects and are generally more static than live MIB data.

snmp

normative-requirement §5.1 MUST

PolicyScript code MUST be expressed in the ASCII character set. Any syntax error, use of a reserved keyword, reference to an unknown identifier, improper argument count, type-coercion failure, or exceeding local storage limits MUST cause an RTE.

snmp

normative-requirement §8.1.3.3 MUST NOT

The setVar() function is only valid in policyActions; it MUST NOT be invoked from within a policyCondition. An RTE occurs if the set encounters any error.

snmp

normative-requirement §8.1.1 MUST

When NonLocalArgs are used, mPModel, tDomain, tAddress, secModel, secName, and secLevel MUST all be specified together; if one is present all must be present. contextEngineID may only be specified if all others are present.

snmp

protocol-element §4.1

Precedence groups allow multiple policies to be ranked so that for each element only the highest-precedence matching ready policy is active. Lower-precedence policies in the group are not executed if a higher-precedence policy matches the same element.

snmp

protocol-element §8.1.3.5

The createRow() and setRowStatus() functions automate row creation in read-create tables with arbitrary integer index components, encapsulating the createAndWait/createAndGo algorithm. The optional 'freeOnException' flag causes automatic row deletion (RowStatus=destroy) if the script dies with an RTE or fail() call during the same invocation.

snmp

protocol-element §8.2.11

The defer() and fail() policy library functions affect execution flow beyond their own script: fail() sets return value to zero and may set the 'defer' attribute so that a lower-precedence policy in the same precedence group may run on that element, independent of the current script's return value.

snmp

protocol-element §6

The ec() and ev(n) library functions provide programmatic access to element index components: ec() returns the count of index components, ev(n) returns the integer value of the nth sub-identifier. These allow scripts to address related elements without string manipulation.

snmp

protocol-element §6

The '$n' token (dollar sign followed by integer 0-128) in SNMP OID string arguments is expanded at execution time to the nth subidentifier of the index of the current element. The special token '$*' expands to all subidentifiers separated by dots. Using a token beyond the index length is an RTE.

snmp

protocol-element §4.3

The pmElementTypeRegTable allows managers to register element types by OID prefix and to discover what element types the system already manages. The OIDPrefix length determines how the agent splits discovered OIDs into base and index portions (index begins after the column subidentifier).

snmp

protocol-element §3

The pmPolicyTable provides managed objects for representing a policy on a managed device, including pmPolicyCondition (the condition script), pmPolicyAction (the action script), pmPolicySchedule (optional schedule link), pmPolicyAdminStatus, and pmPolicyStorageType which controls disposition of agent-installed entries on restart.

snmp, registry

protocol-element §3

The pmRoleTable allows a management station to learn what roles exist on a managed system. Upon receipt of a pmNewRoleNotification, a station may install new policies that depend on the new role. Multiple roles may be assigned to each element.

snmp

protocol-element §4.4

The pmSchedTable provides schedule entries that control when a policy is 'ready'. If pmPolicySchedule is zero, no schedule is defined and the policy is always ready. If non-zero, the policy is ready only if the referenced schedule group contains at least one valid entry active at the current time.

snmp

protocol-element §3

The pmTrackingTables and pmDebuggingTable provide policy monitoring. Run-time exceptions may cause an entry to be added to pmDebuggingTable and are reflected in the pmTrackingPEInfo object.

snmp

protocol-element §8.1.3.4

The searchColumn() function performs an SNMP walk searching for column values matching a pattern using one of six match modes: ExactMatch, ExactCaseMatch, SubstringMatch, SubstringCaseMatch, RegexpMatch, RegexpCaseMatch (POSIX 1003.2 extended regular expressions). Caller controls search start/continuation via the 'oid' in-out parameter.

snmp

registry §14

The MIB module defined in this document (PM-MIB) is assigned an object identifier under the mib-2 subtree by IANA. Section 14 (IANA Considerations) records this assignment. The module defines tables pmPolicyTable, pmElementTypeRegTable, pmSchedTable, pmRoleTable, pmCapabilitiesTable, pmTrackingTable, and pmDebuggingTable.

snmp, registry

security-consideration §13

The Security Considerations section (Section 13) notes that PolicyScript running on a managed device can perform arbitrary SNMP reads and writes, including to remote systems. Operators must carefully restrict who can write to the pmPolicyTable and pmElementTypeRegTable, as an attacker with write access could install policies that exfiltrate or modify configuration across the entire managed infrastructure.

snmp, security

security-consideration §8.1.1

When a policy script performs SNMP operations on a remote system using NonLocalArgs, the agent MUST use security credentials from the local configuration datastore on behalf of the principal identified as the last entity to modify pmPolicyAdminStatus for that policy. VACM must be configured so that the installing user has access to the relevant credentials (e.g., usmUserTable entries for the target system).

snmp, security

state-machine §4.1

Policy lifecycle has four states: Valid (fully configured and enabled), Ready (valid and either unscheduled or linked to an active schedule), Active Execution Context (ready policy paired with an element that matches condition and, if in a precedence group, no higher-precedence policy also matches). A Run-Time Exception (RTE) terminates script execution immediately and prevents the associated action from running for that element.

snmp

wire-format §8.1.2

SNMP Object Identifiers are encoded in policy scripts and library functions as ASCII dotted-decimal strings of the form 'subid[.subid]*' where each subid is '0' or a decimal constant. ASCII descriptors (e.g., 'ifIndex') are never used in these encodings and must be translated to dotted-decimal before being placed in MIB objects.

snmp

wire-format §8.1.1

The contextEngineID NonLocalArg is encoded as a pair of hex digits (upper- or lowercase) per octet of the contextEngineID value when passed to SNMP library functions.

snmp