Document each default value from the config
There are some parts at the config documentation (comments) which don't include the default and aren't 100% obvious.
Updated by Victor Julien about 3 years ago
Not sure, maybe this needs to be looked at on a case by case basis. The default yaml is a monster, so adding more things to it is something that I would like to do carefully.
I didn't find a ticket for having multiple yamls (e.g. minimal/normal/everything, or split out yamls), but maybe its time to revisit this.
Updated by Andreas Herz about 3 years ago
Another approach would be to make the current config much smaller, even remove all comments and just rely on the documentation where it's also easier to keep the defaults?
If not, adding the defaults to the current config shouldn't be too much.
Jason, do you know any nice way to deal with multiple yamls?
Updated by Jason Ish over 2 years ago
I think right now we could break it up into multiple files with include statements. It would make sense to keep commonly updated stuff in the suricata.yaml, and less commonly updated stuff in includes.
Assuming the includes are in some system directory, say /usr/share/suricata/config/app-layer.yaml, then tweaking stuff includes does become harder. You would have to make a complete copy of the top level object and modify it, as we don't have a way to override just one deeply nested configuration parameters in a file, but you can do it with the --set.
I've seen in some other projects (maybe docker-compose files? filebeat configuration maybe?) where they provide a dotted syntax to override nested settings.. For example we may have:
vars: address-groups: HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]" EXTERNAL_NET: "!$HOME_NET"
I've seen overrides provided in the format:
which could be convenient. However it gets a little tricker for the arrays we have, which will probably have settings where overrides make sense as well.
It would be nice to define what we want to break out, and maybe go from there.
PostgreSQL has a rather large configuration file when all options are present. What they do is install a smaller file with some common option, then the rest get their default. Their documentation then covers all options, and while I'm not sure if this is maintained anymore, they also had an annotated exchaustive configuration file with defaults:
While it does increase overhead, we could make the sample suricata.yaml in the doc exhaustive, and perhaps trim down what we have in the installed one.