rfc-2592

Definitions of Managed Objects for the Delegation of Management Script

D. Levi, J. Schoenwaelder
date1999-05 streamIETF areaops wgdisman statusPROPOSED STANDARD pages53 canonicalhttps://www.rfc-editor.org/rfc/rfc2592 doi10.17487/RFC2592
This memo defines a portion of the Management Information Base (MIB) for use with network management protocols in the Internet community. In particular, it describes a set of managed objects that allow the delegation of management scripts to distributed managers. [STANDARDS-TRACK]

obsoleted by

Extracted elements (28)

design-rationale §4.2

Both push and pull models for script transfer are supported to balance implementation convenience and performance. The push model uses the smCodeTable (allowing SNMP SET fragmentation to handle message-size limits), while the pull model stores a URL in smScriptSource so the distributed manager can use FTP or HTTP to retrieve large scripts efficiently without SNMP message-size constraints.

snmp

design-rationale §4.3

Script results (smRunResult) are accessible asynchronously after script termination via the smRunTable history, enabling offline operation where the invoker collects results at a later point. The smRunExpireTime countdown controls how long completed entries are retained before aging out.

snmp

design-rationale §6

smLaunchStart uses Integer32 rather than Unsigned32 specifically for compatibility with the scheduling MIB, which may write this object. The value 0 is reserved as a 'fire and forget' invocation that causes the implementation to self-generate an smRunIndex, useful for scheduled invocations where the invoker does not need to retrieve results.

snmp

design-rationale §4.1

The Script MIB intentionally makes no assumptions about script languages, allowing use with Tcl, Java, compiled native code, or any other language. Languages are identified by OIDs registered with IANA or in enterprise OID subtrees, combined with version numbers, vendor OIDs, and implementation revision strings to enable precise capability matching.

snmp

design-rationale §3.1

The smLaunchOwner identity associated with script execution (and propagated to smRunTable entries) is derived from the smLaunchTable entry, not necessarily the script's owner (smLaunchScriptOwner). This separation allows a language runtime system to enforce security profiles based on who launched the script rather than who authored it.

snmp, security

interoperability-note §6

Suspension of scripts is optional. An implementation that does not support suspension will transition to 'suspending' when smRunControl is set to 'suspend' and remain there until 'resume' or termination, never entering the 'suspended' state. This is explicitly permitted in the compliance statement.

snmp

interoperability-note §6

The Script MIB does not mandate implementation of any specific URL scheme in smScriptSource. An attempt to load a script using an unsupported URL scheme causes smScriptOperStatus to report 'unknownProtocol'. Implementations may choose to only support pull (URL-based) or only push (smCodeTable), or neither.

snmp

interoperability-note §6

The smScriptSource object may be read-only for implementations that do not support downloading script code from a URL; the compliance statement explicitly permits MIN-ACCESS read-only for this object. This allows purely built-in or push-only implementations to be fully compliant.

snmp

normative-requirement §6 MUST

A compliant implementation MUST support a minimum size of 255 octets for smLaunchArgument, smRunArgument, and smRunResult. These objects have no SMI-imposed size limit beyond this minimum compliance floor.

snmp

normative-requirement §6 MUST

An implementation MUST store a descriptive error message in smRunError if a script exits with smRunExitCode 'genericError'. The value is the zero-length string as long as smRunExitCode is 'noError'.

snmp

normative-requirement §6 MUST

Attempts to destroy or set notInService a smScriptTable row while the associated script is executing MUST fail with inconsistentValue. Similarly, destroying or setting notInService rows whose smScriptStorageType is 'permanent' or 'readOnly' MUST fail with inconsistentValue.

snmp

normative-requirement §6 MUST

Before starting a script via smLaunchStart, six checks MUST be performed: (1) smLaunchOperStatus is 'enabled'; (2) smLaunchScriptOwner/smLaunchScriptName identify an existing smScriptTable entry; (3) that entry's smScriptOperStatus is 'enabled'; (4) the requesting principal has read access to all non-not-accessible columns of the smScriptTable entry via the isAccessAllowed abstract service; (5) the smRunIndex value is not already in use; (6) the number of currently executing scripts is less than smLaunchMaxRunning. Any check failure results in an inconsistentValue error.

snmp, security

normative-requirement §6 MUST

smLangVendor and smExtsnVendor SHALL point to the OID node directly below the enterprise OID {1 3 6 1 4 1} allocated for the vendor. The value MUST be {0 0} if the vendor is not known.

snmp

normative-requirement §4.2 MUST

The mapping of smScriptOwner and smScriptName to non-volatile storage MUST ensure that scripts created by different owners with the same script name do not map to the same name in non-volatile storage. One way to achieve this is to use both the script owner and the script name to derive the internal storage name.

snmp

normative-requirement §6 OPTIONAL

The smCodeGroup is mandatory only for implementations that support downloading scripts via SNMP (push model); it is otherwise optional. Implementations that cannot download scripts from a URL MAY make smScriptSource read-only.

snmp

normative-requirement §6 MUST

The smScriptAbort notification MUST be generated whenever a running script terminates with an smRunExitCode value other than 'noError'. The notification carries smRunExitCode, smRunEndTime, and smRunError as varbinds.

snmp

protocol-element §5.3

smCodeTable (smScriptObjects 2) is indexed by smScriptOwner, smScriptName, and smCodeIndex (Unsigned32 1..4294967295). Each row holds smCodeText (OCTET STRING, SIZE 1..1024) containing one fragment of a script. Modifications are only permitted when smScriptOperStatus is 'editing'.

snmp

protocol-element §5.1

smLangTable (smObjects 1) and smExtsnTable (smObjects 2) describe supported languages and extensions. Each language entry identifies the language by OID (smLangLanguage), version string (smLangVersion, max 32 octets), vendor OID (smLangVendor), implementation revision (smLangRevision, max 32 octets), and description. Extension entries add smExtsnExtension OID and follow the same version/vendor pattern, indexed under smLangIndex.

snmp

protocol-element §5.4

smLaunchTable (smRunObjects 1) is indexed by smLaunchOwner and smLaunchName and carries: smLaunchScriptOwner/Name (identifying the target script), smLaunchArgument (OCTET STRING), smLaunchMaxRunning (Unsigned32, default 1), smLaunchMaxCompleted (Unsigned32, default 1), smLaunchLifeTime (TimeInterval, default 360000 centi-seconds), smLaunchExpireTime (TimeInterval), smLaunchStart (Integer32), smLaunchControl (abort/suspend/resume/nop), and smLaunchRunIndexNext (read-only, suggests next available smRunIndex).

snmp

protocol-element §5.5

smRunTable (smRunObjects 2) is indexed by smLaunchOwner, smLaunchName, and smRunIndex (Integer32 1..2147483647) and contains: smRunArgument, smRunStartTime, smRunEndTime (DateAndTime), smRunLifeTime (countdown timer in centi-seconds), smRunExpireTime, smRunExitCode, smRunResult (OCTET STRING), smRunControl (read-write), smRunState (read-only), and smRunError (SnmpAdminString).

snmp

protocol-element §5.2

smScriptTable (smObjects 3.1) is indexed by smScriptOwner (SnmpAdminString, 0..32 octets) and smScriptName (SnmpAdminString), and contains: smScriptDescr, smScriptLanguage (Integer32 referencing smLangTable), smScriptSource (DisplayString URL or empty), smScriptAdminStatus (enabled/disabled/editing), smScriptOperStatus (read-only), smScriptStorageType (StorageType), and smScriptRowStatus (RowStatus).

snmp

protocol-element §6

Two notifications are defined: smScriptAbort (smTraps 1) carries smRunExitCode, smRunEndTime, smRunError and is generated automatically by the MIB implementation on non-noError exit. smScriptResult (smTraps 2) carries smRunResult and is emitted explicitly by the executing script itself to notify managers of results; it is NOT automatically generated.

snmp

registry §9

IANA is responsible for registering OID values for well-known script languages under the smLangLanguage arc. Section 9 notes this responsibility; enterprise-specific languages may also be registered in vendor-specific enterprise OID subtrees. No specific language OIDs are registered in this RFC itself.

snmp, registry

security-consideration §10

Access to Script MIB objects MUST be controlled using the View-based Access Control Model (VACM). Before launching a script, the implementation must call the isAccessAllowed abstract service on all non-not-accessible columns of the target smScriptTable entry for the requesting principal. The smLaunchOwner identity is used by the runtime system to enforce security profiles on executing scripts. Inappropriate access can allow unauthorized parties to execute arbitrary management code on distributed managers.

snmp, security

security-consideration §6

The smRunExitCode value 'securityViolation' indicates that a script exited due to a security violation during execution. This code allows managers to distinguish security-related terminations from runtime or language errors and take appropriate remedial action.

snmp, security

security-consideration §8

VACM configuration examples in Section 8 illustrate three security profiles: a sandbox for guest access (restricting language and smCodeTable access), shared scripts (allowing multiple managers read-only access to a common script), and emergency scripts (granting elevated access to specific scripts during emergencies). These demonstrate how VACM views can isolate Script MIB functions.

snmp, security

state-machine §6

smRunState tracks the execution lifecycle of a script instance with states: initializing → executing → (suspending → suspended → resuming →) executing → aborting → terminated. Setting smRunControl to 'suspend' from 'executing' moves to 'suspending'; 'resume' from 'suspending' or 'suspended' moves to 'resuming'; 'abort' from initializing/executing/suspending/suspended/resuming moves to 'aborting'.

snmp

state-machine §5.2

smScriptOperStatus tracks the loading lifecycle of a script. States progress from 'disabled' → 'retrieving' → 'compiling' → 'enabled', or branch to error states such as 'compilationFailed', 'accessDenied', 'wrongLanguage', 'wrongVersion', 'unknownProtocol', 'protocolFailure', or 'genericError'. The 'retrieving' and 'compiling' states are transient; 'disabled' and 'editing' are administrative states reached only via explicit management operations.

snmp