Werk #14067: REST-API host_config: addition of validation for host labels

Component REST API
Title REST-API host_config: addition of validation for host labels
Date Apr 26, 2022
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p4 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p26 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

Host labels take the key:value format where both key and value are of the string type. In the previous version, it was possible to specify non valid entries such as a list of strings as the REST API did not perform validation for the labels. This consequently led to other problems as Checkmk attempted to process the label values expecting a string. This werk introduces validation for the host labels in order to prevent such instances.

To the list of all Werks