Appearance
Configuration file Since v0.2
Spalto reads one YAML document that holds every setting. You can write it by hand, edit it in the console, or change single settings with the CLI. This page explains the document, and the pages below list every key.
Document structure
The document is a single YAML mapping. The top-level keys are:
| Key | Holds | Page |
|---|---|---|
version | Format number, 1 or 2. Required. | This page |
server_pools, vips, listeners, trusted_proxies | Where clients connect and where traffic goes. | Delivery |
applications | Protected backends and each one's policy. | Applications |
ip_lists, bot_lists, file_lists, icap_servers, bot_catalog, geoip | Shared objects that policies refer to by name. | Lists and catalogs |
management, ha | Management access and the node pair. | Management and HA |
events, traffic, siem, enrichment | What is stored about requests and where it goes. | Logging |
analytics, analyst, helpers | Analytics bounds, the analyst and helper processes. | Analytics and analyst |
assess, scan_targets | Assessment settings and scannable targets. | Assessments |
Every top-level key except version is optional apart from the listeners and applications that validation requires (see below). A key you leave out takes its default.
The version key
version is the format of the document, not a counter of changes.
- Format
2names backends inserver_poolsand points each application at one withserver_pool. - Format
1gives each application its ownupstream. Spalto upgrades it to format 2 when you apply it, keeping every application's backend as its own pool. - Any other value is rejected with
version: must be 1 or 2.
Configuration versions, the numbered history that every change creates, are a separate thing. They are listed by waap config versions.
Validation
Every load validates the whole document before anything changes.
- The file may be at most 4 MiB, and must be a single YAML document.
- Unknown keys are errors. The message ends with a hint to check the spelling, or whether the file was written for a newer release.
waap validatenames the line. - Empty values take safe defaults, then every range, reference and name rule is checked. A reference to an unknown pool, list, listener or ICAP server is an error.
- Several problems are reported together, each with its key path (
applications[0].policy.signatures.paranoia_level: must be between 1 and 4, got 9). - New applications start in
detectmode.
Check a file without applying it:
sh
waap validate -config waap.yamlFor details, see Validation.
Versioning, applying and reloading
The control plane keeps the configuration as numbered versions. A change from the console, the API or the CLI writes a new version. The previous ones stay available.
waap config apply -f FILE -m WHYimports a file as a new version and rolls it out to the inspection services and then the data plane.- When the process started with
-config FILE,kill -HUP(orsystemctl reload waap) imports the file again. The file never overrides newer changes on its own. - A version that fails validation is never applied; the active version keeps serving.
- On a standby node of a pair, changes are refused. Apply them on the active node.
To list, show, compare and apply versions, use waap config versions, waap config show, waap config diff and waap config apply. For details, see Configuration.
Notation used in the key tables
- Paths use
[]for a list of objects:applications[].hostnamesmeans thehostnameskey of each application. - Policy pages write paths in full (
applications[].policy.access.rules[].action). - Duration is Go syntax (
500ms,5s,720h). There is nodunit. - Size is a plain integer or a binary unit (
512,32KiB,1MiB). - A Default of a dash means the code sets none: the key is empty or off. A bound is in Limits and defaults.
- Allowed values lists the accepted words of a fixed set, or the numeric range when the code enforces one. Where it shows a dash, check the guide page; validation reports a bad value with the key path.
- The one-line meanings are short. The linked guide page explains behavior.
Pages
| Page | Keys | Key count |
|---|---|---|
| Applications and core policy | applications[] (core policy) | 78 |
| Access, rate limits, bans and identity | policy.access, rate_limits, bans, identity | 49 |
| API protection policy | policy.api | 263 |
| Bot mitigation policy | policy.bots | 94 |
| Response, session and data protection policy | policy.response, headers, cookies, sessions, csrf, cors, dlp, scripts, ssrf | 161 |
| Files, positive model, virtual patches and validation policy | policy.files, positive, virtual_patches, validation | 88 |
| Server pools, VIPs, virtual servers and trusted proxies | server_pools, vips, listeners, trusted_proxies | 34 |
| Lists, ICAP servers, bot catalog and geolocation | ip_lists, bot_lists, file_lists, icap_servers, bot_catalog, geoip | 45 |
| Management and high availability | management, ha | 15 |
| Events, traffic log, SIEM and enrichment | events, traffic, siem, enrichment | 33 |
| Analytics, analyst and helper processes | analytics, analyst, helpers | 59 |
| Assessments and scan targets | assess, scan_targets | 60 |
Example
The smallest useful file: one listener, one pool and one application in detect mode.
yaml
version: 2
listeners:
- {name: web, address: "0.0.0.0:8080", protocol: http}
server_pools:
- name: shop
servers:
- {address: "127.0.0.1:9000", weight: 1, state: active}
applications:
- name: shop
hostnames: [shop.example.com]
listeners: [web]
server_pool: shop