rfc-3165

Definitions of Managed Objects for the Delegation of Management Scripts

D. Levi, J. Schoenwaelder
date2001-08 streamIETF areaops wgdisman statusPROPOSED STANDARD pages64 canonicalhttps://www.rfc-editor.org/rfc/rfc3165 doi10.17487/RFC3165 errataview
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]

obsoletes

Extracted elements (28)

design-rationale §4.1

Languages are identified by a four-tuple (language OID, version string, vendor OID, revision string) rather than just an OID, because ambiguities in language specifications and implementation-specific extensions can cause behavioral differences even for the same language version.

snmp

design-rationale §4.2

The Script MIB supports both push (SNMP set requests into smCodeTable, fragmented to handle SNMP message size limits) and pull (URL in smScriptSource, allowing FTP/HTTP for large scripts) transfer models, plus built-in hard-wired scripts, because no single transfer method suits all deployment scenarios.

snmp

design-rationale §4.2

The smScriptName-to-nonvolatile-storage mapping must ensure that scripts with the same name owned by different managers do not collide; one recommended approach is to incorporate smScriptOwner into the derived storage name.

snmp

interoperability-note §2

The MIB module is SMIv2-compliant; an SMIv1-compliant version can be produced by translation, but Counter64 objects and some machine-readable information will be lost or converted to textual descriptions, which is not considered a semantic change.

snmp

interoperability-note §5.3

The smCodeGroup (smCodeTable) implementation is OPTIONAL; implementations that do not support push-model script transfer via SNMP need not implement it, provided they support built-in or pull-model scripts.

snmp

normative-requirement §6 SHALL

All smLaunchTable entries that refer to a script table entry SHALL have smLaunchOperStatus value of 'disabled' when smScriptOperStatus is not 'enabled'.

snmp

normative-requirement §6 MUST

An implementation MUST store a descriptive error message in smRunError if the script exits with smRunExitCode 'genericError'.

snmp

normative-requirement §6 MUST

Attempts to destroy or set notInService a smScriptTable row while smScriptOperStatus is 'enabled', or where smScriptStorageType is 'permanent' or 'readOnly', MUST result in an inconsistentValue error.

snmp

normative-requirement §6 MUST

Before launching a script via smLaunchStart, six checks must be performed: smLaunchOperStatus must be enabled, the referenced smScriptTable entry must exist, smScriptOperStatus must be enabled, the principal must have VACM read access to all accessible columns of the smScriptTable row, the smRunIndex value must be unused (or 0 for auto-generated), and concurrent running scripts must be below smLaunchMaxRunning.

snmp, security

normative-requirement §6 MUST

If smRunLifeTime reaches 0, the script MUST be aborted immediately. Setting smRunLifeTime to its maximum value (2147483647) disables the timer so the script runs indefinitely.

snmp

normative-requirement §5.3 MUST

Modifications of smCodeTable are only possible if the associated smScriptOperStatus has the value 'editing'; the Script MIB implementation reloads the script once smScriptOperStatus changes back to 'enabled'.

snmp

normative-requirement §6 SHALL

When smScriptStorageType is permanent(4), all read-create objects in smScriptTable must be writable except smScriptStorageType and smScriptRowStatus, which shall be read-only.

snmp

protocol-element §5.3

smCodeTable provides push-model script upload via SNMP, indexed by (smScriptOwner, smScriptName, smCodeIndex). Each smCodeEntry contains smCodeText (OCTET STRING, 1..1024 octets) representing one fragment of a script.

snmp

protocol-element §5.1

smExtsnTable lists language extensions, indexed by smLangIndex and smExtsnIndex, each carrying extension OID, version, vendor OID, revision, and description fields analogous to smLangTable.

snmp

protocol-element §5.1

smLangTable lists supported scripting languages, each identified by an OID (smLangLanguage), a version string (smLangVersion, max 32 octets), a vendor OID (smLangVendor), and an implementation revision string (smLangRevision, max 32 octets).

snmp

protocol-element §6

smLaunchAdminStatus includes an autostart(3) value that causes the launch entry to automatically invoke smLaunchStart=0 when transitioning from disabled to enabled operational state, enabling scripts to launch at system startup.

snmp

protocol-element §6

smLaunchRowExpireTime is a countdown timer (ticks backwards in centi-seconds); setting it to maximum value 2147483647 disables the timer. When it reaches 0 with no associated smRunTable entries, the row is deleted; otherwise smLaunchOperStatus transitions to 'expired' until all associated run entries are gone.

snmp

protocol-element §5.4

smLaunchTable is indexed by (smLaunchOwner, smLaunchName) and defines the launch button concept: it associates a script (smLaunchScriptOwner/Name), argument (smLaunchArgument), concurrency limit (smLaunchMaxRunning, default 1), history limit (smLaunchMaxCompleted, default 1), lifetime (smLaunchLifeTime), and expire time (smLaunchExpireTime).

snmp

protocol-element §6

smRunExitCode enumerates: noError(1), halted(2), lifeTimeExceeded(3), noResourcesLeft(4), languageError(5), runtimeError(6), invalidArgument(7), securityViolation(8), genericError(9). Default is noError while script is running or not yet started.

snmp

protocol-element §5.5

smRunTable is indexed by (smLaunchOwner, smLaunchName, smRunIndex) and tracks each script invocation with: smRunArgument, smRunStartTime, smRunEndTime, smRunLifeTime (countdown timer, ticks backwards), smRunExpireTime, smRunExitCode (9 values), smRunResult (OCTET STRING), smRunControl, smRunState, smRunError, smRunResultTime, smRunErrorTime.

snmp

protocol-element §5.2

smScriptTable is indexed by (smScriptOwner, smScriptName) and contains smScriptSource (URL or empty string), smScriptAdminStatus (enabled/disabled/editing), smScriptOperStatus (14 possible states), smScriptStorageType, smScriptError, and smScriptLastChange.

snmp

protocol-element §5

The Script MIB (DISMAN-SCRIPT-MIB) defines five object groups: smLangTable/smExtsnTable (language group), smScriptTable (script group), smCodeTable (code group), smLaunchTable (launch group), and smRunTable (run group), registered at mib-2 64.

snmp, yang

registry §9

IANA is requested to register object identifiers for well-known management scripting languages under a new IANA-managed OID subtree, so that implementations can identify language types using globally unique OID values rather than vendor-specific identifiers.

snmp, registry

security-consideration §10

Running scripts are associated with an owner (smLaunchOwner) that the runtime system uses to enforce security profiles and sandbox permissions. The distinction between smLaunchOwner and smScriptOwner allows scripts owned by one manager to be executed under the identity of another.

snmp, security

security-consideration §10

Scripts retrieved via the pull model from remote URLs (FTP, HTTP) may be tampered with in transit; the Script MIB provides no integrity protection for the script content itself, so administrators should use secure URL schemes or out-of-band verification where integrity matters.

snmp, security

security-consideration §10

The Script MIB grants the ability to load and execute arbitrary code on a distributed manager; VACM-based access control is the primary defense, and implementations should use it to restrict who can write to smCodeTable, smScriptTable, and smLaunchTable. The VACM read-access check on smScriptTable columns is mandatory before any script launch.

snmp, security

state-machine §6

smRunState defines seven states: initializing → executing → suspending → suspended → resuming → executing (resume success) or suspended (resume fail); executing → aborting → terminated; executing → terminated. A script that finishes reaches terminated.

snmp

state-machine §5.2

smScriptOperStatus transitions through: disabled → retrieving → compiling → enabled (success path), or → noSuchScript | accessDenied | wrongLanguage | wrongVersion | compilationFailed | noResourcesLeft | unknownProtocol | protocolFailure | genericError (error states). The editing state is entered only by explicit management operation.

snmp