Feature #4782
open
Task #4780: config: configuration usability improvements
config: add command to dump all active settings
Added by Victor Julien over 1 year ago.
Updated 8 months ago.
Description
Differs from --dump-config
in that the latter only dumps settings that are loaded from the YAML, but not built-in defaults.
Related issues
1 (1 open — 0 closed)
- Tracker changed from Task to Feature
Exim was the tool that was brought up as an example, exim -bP
dumps the active configuration, even if the config file is empty. It does have the benefit of a very flat, key=val
configuration file format.
- Related to Bug #1911: Commandline provided configuration values don't persist after initial startup added
Some thoughts on getting this done.
- All configuration needs to exist in a single datastore.
- This datastore can simply be a hard-coded YAML file that provides a complete fully default configuration.
- There also needs to be a "configuration" factory of sorts, as we have dynamic elements to our configuration. A common example of this is outputs, you can register multiple eve outputs so we can't hard code all these into a defualt configuration, but we can provide a default configuration for each eve logger, provided via a factory method of sorts.
- There also needs to be some precedence order to solve issue #1911 in a more generic way. Where when getting a configuration value with a prefix, the "fixed" set of vars is checked first, this makes sure stuff on the command line always takes precedence over values in the configuration file.
- I'd like this "central datastore" of config to be its own Rust crate that could also be used independently of Suricata for working with the configuration. We can get this pretty much for free by keeping it in mind from the start.
- Modules should not fall back to hard coded configuration they did not get from the main config datastore. The hardcoded value should be put into the datastore.
This should allow one to dump the complete default configuration, as well as a running config, which is the default configuration with the loaded configuration layered on top. With every possible configurable value in the output.
- Status changed from New to In Progress
- Assignee set to Jason Ish
Also available in: Atom
PDF