rfc-8819

YANG Module Tags

C. Hopps, L. Berger, D. Bogdanovic
date2021-01 streamIETF areaops wgnetmod statusPROPOSED STANDARD pages19 canonicalhttps://www.rfc-editor.org/rfc/rfc8819 doi10.17487/RFC8819
This document provides for the association of tags with YANG modules. The expectation is for such tags to be used to help classify and organize modules. A method for defining, reading, and writing modules tags is provided. Tags may be registered and assigned during module definition, assigned by implementations, or dynamically defined and set by users. This document also provides guidance to future model writers; as such, this document updates RFC 8407.

updates

Extracted elements (22)

design-rationale §1

Tags were chosen over a rigid classification structure because they are more flexible and can more easily adapt over time as technologies evolve, analogous to '#hashtags' widely used on the internet.

yang

design-rationale §2

The document intentionally does not impose structure on tag values beyond the registered prefix, in order to avoid arbitrarily restricting what designers, implementers, and users can express with tags.

yang

interoperability-note §B

A non-NMDA state module ('ietf-module-tags-state') is provided for implementations that do not yet support the Network Management Datastore Architecture (NMDA); its container and list are marked deprecated.

yang, netconf

interoperability-note §6

This document updates RFC 8407 (Guidelines for Authors and Reviewers of YANG Data Models) by adding Section 6 guidance requiring that standard module-tag extension usage for IETF modules reference registered IANA tags.

yang

normative-requirement §2 SHOULD

All tags SHOULD begin with a prefix indicating who owns their definition, using prefixes registered in the IANA 'YANG Module Tag Prefixes' registry.

yang, registry

normative-requirement §6.1 MUST

For IETF standardized modules, new tags used in module-tag extension statements MUST be assigned in the IANA 'IETF YANG Module Tags' registry.

yang, registry

normative-requirement §7.2 MUST

IANA-assigned tags in the 'IETF YANG Module Tags' registry must conform to Net-Unicode as defined in RFC 5198 and shall not need normalization.

yang, registry

normative-requirement §3.1 MUST

If a module is defined in an IETF Standards Track document, any design-time tags indicated using the module-tag extension MUST be IETF tags (i.e., registered with IANA).

yang, registry

normative-requirement §3.2 SHOULD

Implementation-time tags added by an implementation SHOULD be IETF tags (registered) or vendor-specific tags.

yang

normative-requirement §2 MUST NOT

Tag values may contain any YANG type 'string' characters except carriage returns, newlines, and tabs.

yang

protocol-element §2.4

Any tag not starting with 'ietf:', 'vendor:', or 'user:' is reserved for future use; such tags are not invalid but reserved in the context of specifications.

yang, registry

protocol-element §2.1

IETF tags have the prefix 'ietf:' and must all be registered with IANA in the 'IETF YANG Module Tags' registry defined in Section 7.2.

yang, registry

protocol-element §4.1

The 'ietf-module-tags' YANG module defines a 'module-tags' container with a 'module' list keyed by name, each entry having 'tag' and 'masked-tag' leaf-lists of type 'tag'.

yang, netconf

protocol-element §4.2

The 'module-tag' extension statement takes a 'tag' argument and is used by module authors to indicate tags that SHOULD be added automatically by the system with origin set to 'system' per RFC 8342.

yang

protocol-element §4.2

The operational state view of the tag list is constructed by: (1) adding system tags, (2) adding user-configured tags, (3) removing any tag equal to a masked-tag entry.

yang, netconf

protocol-element §3.3

To remove a tag from the operational datastore, a user adds a matching 'masked-tag' entry for the given module in the ietf-module-tags configuration.

yang, netconf

protocol-element §2.3

User tags have the prefix 'user:' and are defined by the user/administrator without registration. Using the 'user:' prefix is RECOMMENDED to help avoid collisions.

yang

protocol-element §2.2

Vendor tags have the prefix 'vendor:' and are defined by the module implementer without registration. It is RECOMMENDED that vendors include extra identification (e.g., enterprise name) after the prefix to avoid collisions.

yang

registry §7.2

IANA created the 'IETF YANG Module Tags' subregistry within the 'YANG Module Tags' registry, with allocation policy IETF Review. Initial tags include ietf:network-element-class, ietf:network-service-class, ietf:sdo-defined-class, ietf:vendor-defined-class, ietf:user-defined-class, ietf:hardware, ietf:software, ietf:protocol, ietf:qos, ietf:network-service-app, ietf:system-management, ietf:oam, ietf:routing, ietf:security, ietf:signaling, and ietf:link-management.

yang, registry

registry §7.1

IANA created the 'YANG Module Tag Prefixes' subregistry within the 'YANG Module Tags' registry, with allocation policy Specification Required (RFC 8126). Initial entries: 'ietf:', 'vendor:', and 'user:'.

yang, registry

security-consideration §8

The ietf-module-tags module is designed to be accessed via NETCONF over a secure transport (mandatory-to-implement: SSH). The document itself does not define any actions based on tag associations and therefore does not directly introduce new security considerations.

yang, netconf, security

security-consideration §8

Users who define actions based on tag metadata must consider the security implications of those actions, including the potential for a tag to be 'masked' by another user.

yang, security