The new format for Policy and CIC Definitions in rConfig has been simplified for ease of use and readability. This replaces the old verbose JSON format with a more streamlined approach. This documentation will guide you through the new format, its benefits, and usage tips.
Benefits
Simplified Format: The new format is less verbose and easier to write and understand.
Efficiency: Reduces the complexity of writing policy definitions and CIC definitions.
Ease of Use: Includes auto-complete features in the editor, making it easier to use predefined methods.
Format Description
The new format uses a combination of comments and method annotations to define policies. Each policy is described with a comment followed by a method annotation and the command it applies to.
How to write a policy definition:
Blocks must be seperated by a line blank line i.e. // Some described policy followed by a method annotation
Each block must start with a comment describing the policy followed by a method annotation
The method annotation must be enclosed in square brackets prefaced by a # symbol i.e. #[method_annotation]
The text following the method annotation is the command the policy applies to or will be evaluated
Blocks that have a STRING (#[must_match_single_string]) method annotation must have a single string value following the method annotation i.e. #[method_annotation] single_string_value
Blocks that have a ARRAY (#[must_match_all_from_array]) method annotation must have a list of strings following the method annotation i.e. #[method_annotation] string1, string2, string3
Blocks that have a REGEX (#[must_match_regex]) method annotation must have one of many regex patterns following the method annotation i.e. #[method_annotation] /regex_pattern/