WACElib is configured through aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tilsor/ModSecIntl_wace_lib/llms.txt
Use this file to discover all available pages before exploring further.
ConfigFileData struct defined in the configstore package. In practice you populate this struct by unmarshalling a YAML file, then pass it to Init alongside an OpenTelemetry meter. Init validates the configuration, initialises the logger, and loads all declared plugins before the library begins processing transactions.
Top-level configuration structure
Filesystem path for the WACElib log file. The directory must be writable; WACElib will attempt to create the file if it does not already exist. An empty value causes
Init to return an error.Minimum severity level for log output. Must be one of:
Values are case-insensitive. An unrecognised value causes
| Value | Meaning |
|---|---|
DEBUG | Verbose output including per-transaction tracing |
INFO | Informational messages about plugin loading and transaction outcomes |
WARN | Non-fatal issues such as a plugin failing to load |
ERROR | Errors that prevent correct operation |
Init to return an error.Connection URL for the NATS messaging server. Required when any model plugin is configured with
remote: true or mode: async. Defaults to localhost:4222 if omitted.List of model plugin configurations. Each entry describes one compiled
.so plugin that analyses a portion of an HTTP transaction. See Model plugin configuration for the full field reference.List of decision plugin configurations. Each entry describes one compiled
.so plugin that receives aggregated model results and WAF signals and returns a block/allow decision. See Decision plugin configuration for the full field reference.Complete example
The following YAML is representative of a production configuration that runs two model plugins synchronously in the same process and one decision plugin.Loading configuration in Go
Pass a populatedConfigFileData value directly to Init. The typical pattern is to unmarshal a YAML file first:
Init creates a singleton ConfigStore. Calling Init a second time without first calling configstore.Clean() returns an error. In tests, call defer configstore.Clean() after each Init to reset state.Next steps
Model plugin configuration
Field reference for every model plugin option, including plugintype, mode, and remote execution.
Decision plugin configuration
Field reference for decision plugins and how they receive WAF signals and model results.