Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External configuration data for rules #17

Closed
BernieWhite opened this issue Dec 3, 2018 · 1 comment
Closed

External configuration data for rules #17

BernieWhite opened this issue Dec 3, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@BernieWhite
Copy link
Member

BernieWhite commented Dec 3, 2018

Currently it is easy to define rules with hard coded conditions. A better approach would be to allow conditions to pull in configuration as required.

Adding a common configuration model for rules will make creating configurable baselines much easier.

Rule configuration must be able to support default values, only non default values should need to be set in configuration.

Consider:

rules:
  configuration:
    rule1_config: value1
Rule 'rule1' {
  $option = Configure @{ 'rule1_config' = 'defaultValue' }
  $option.rule1_config -eq 'value1'
}
@BernieWhite BernieWhite added the enhancement New feature or request label Dec 3, 2018
@BernieWhite BernieWhite added this to the v0.2.0 milestone Dec 10, 2018
@BernieWhite BernieWhite self-assigned this Dec 10, 2018
@BernieWhite
Copy link
Member Author

BernieWhite commented Jan 18, 2019

For performance reasons it may be better to include configuration as a property of the rule block.

For example:

Rule 'rule1' {
  $Rule.Configuration.rule1_config -eq 'value1'
} -Configure @{ 'rule1_config' = 'defaultValue' }

BernieWhite added a commit that referenced this issue Jan 25, 2019
- Added support for nested field names with Exists, Within and Match keywords #60
- Added support for rule configuration using baselines #17
- Use rule description when hint message not set #61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant