MIB Textual Conventions for Uniform Resource Identifiers (URIs)
Extracted elements (12)
A zero-length URI is not a valid URI per STD 66, but the convention explicitly allows SIZE 0 to express 'URI absent' where required, for example when used as an index field.
Three textual conventions at different length limits are provided to improve compatibility between MIB modules that require restricted-length URIs, rather than having each MIB module define its own representation.
URI normalization (removing unnecessary percent-encoding, lowercasing case-insensitive characters, uppercasing hex digits) is mandated to help provide unique URIs in MIB objects, though the document notes this normalization alone is not sufficient to guarantee uniqueness.
The purpose of defining standard restricted-length textual conventions (Uri255, Uri1024) is to improve compatibility between MIB modules that require restricted-length URIs, avoiding a proliferation of incompatible per-module URI representations.
If a URI needs to be used as an index object, then the 'Uri' TEXTUAL-CONVENTION SHOULD be subtyped to a length appropriate for the OID of which it is part.
Objects using the Uri, Uri255, or Uri1024 textual conventions MUST be in US-ASCII encoding and MUST be normalized as described by RFC 3986 Sections 6.2.1, 6.2.2.1, and 6.2.2.2.
Where no length restriction is required, objects SHOULD use the 'Uri' TEXTUAL-CONVENTION instead of Uri255 or Uri1024; objects used as indices SHOULD subtype the 'Uri' TEXTUAL-CONVENTION.
Where the Uri TEXTUAL-CONVENTION is used for an index field, it MUST be subtyped to restrict its length, due to the absolute limit of 128 subids for an OID.
The URI-TC-MIB module defines three textual conventions for representing URIs in MIB modules: 'Uri' (unrestricted length), 'Uri255' (0..255 octets), and 'Uri1024' (0..1024 octets), all based on OCTET STRING syntax with DISPLAY-HINT indicating ASCII representation.
IANA assigned OID { mib-2 164 } to the URI-TC-MIB module defined in this document.
This MIB module defines only textual conventions and no management objects; meaningful security considerations can only be written in MIB modules that define management objects using these conventions. Implementers should also consult the Security Considerations of STD 66 (RFC 3986).
The Uri textual convention uses OCTET STRING syntax with DISPLAY-HINT '1a', representing an ASCII URI of unrestricted length. Uri255 is OCTET STRING SIZE(0..255) with DISPLAY-HINT '255a', and Uri1024 is OCTET STRING SIZE(0..1024) with DISPLAY-HINT '1024a'.