Appearance
Files, positive model, virtual patches and validation policy Since v0.2
These sections cover uploads, the learned positive model, virtual patches and validation scans. Paths are relative to one entry of applications.
For the structure of the file, see Configuration file. Defaults of limits are also listed in Limits and defaults. A dash in Default means the code sets no default value (the setting is empty or off).
File uploads
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.files | object | — | — | Group of settings: files. | File uploads |
applications[].policy.files.enabled | boolean | — | — | Turns the feature on or off. | File uploads |
applications[].policy.files.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | File uploads |
applications[].policy.files.rules[] | list of object | — | — | Group of settings: rules. | File uploads |
applications[].policy.files.rules[].paths | list of string | — | — | Request paths the setting applies to. | File uploads |
applications[].policy.files.rules[].max_size | size | — | — | Sets max size. | File uploads |
applications[].policy.files.rules[].allow | list of string | — | — | Sets allow. | File uploads |
applications[].policy.files.rules[].deny | list of string | — | — | Sets deny. | File uploads |
applications[].policy.files.rules[].json_fields | list of string | — | — | Sets json fields. | File uploads |
applications[].policy.files.rules[].raw | boolean | — | — | Sets raw. | File uploads |
applications[].policy.files.rules[].archives | string | — | — | Sets archives. | File uploads |
applications[].policy.files.rules[].encrypted | string | — | — | Sets encrypted. | File uploads |
applications[].policy.files.mismatch | string | — | — | Sets mismatch. | File uploads |
applications[].policy.files.scripts | string | — | — | Sets scripts. | File uploads |
applications[].policy.files.names | string | — | — | Sets names. | File uploads |
applications[].policy.files.webshells | string | — | — | Sets webshells. | File uploads |
applications[].policy.files.hash_lists | object | — | — | Group of settings: hash lists. | File uploads |
applications[].policy.files.hash_lists.deny | list of string | — | — | Sets deny. | File uploads |
applications[].policy.files.hash_lists.allow | list of string | — | — | Sets allow. | File uploads |
applications[].policy.files.icap | object | — | — | Group of settings: icap. | File uploads |
applications[].policy.files.icap.server | string | — | — | Sets server. | File uploads |
applications[].policy.files.icap.max_size | size | — | — | Sets max size. | File uploads |
applications[].policy.files.icap.oversize | string | — | — | a file over max_size: block or allow (reported as not scanned) | File uploads |
applications[].policy.files.icap.on_failure | string | — | — | server unavailable: inherit (the application's failure policy), open or closed | File uploads |
applications[].policy.files.icap.members | boolean | — | — | also send archive members (servers that do not unpack archives) | File uploads |
Positive model
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.positive | object | — | — | Group of settings: positive. | Positive model |
applications[].policy.positive.enabled | boolean | — | — | Turns the feature on or off. | Positive model |
applications[].policy.positive.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | Positive model |
applications[].policy.positive.learning | object | — | — | Group of settings: learning. | Positive model |
applications[].policy.positive.learning.enabled | boolean | — | — | Turns the feature on or off. | Positive model |
applications[].policy.positive.learning.sample_rate | integer | — | — | Sets sample rate. | Positive model |
applications[].policy.positive.learning.min_samples | integer | — | — | Sets min samples. | Positive model |
applications[].policy.positive.learning.min_clients | integer | — | — | Sets min clients. | Positive model |
applications[].policy.positive.learning.min_duration | duration | — | — | Sets min duration. | Positive model |
applications[].policy.positive.learning.min_confidence | integer | — | — | percent | Positive model |
applications[].policy.positive.learning.fold_threshold | integer | — | — | Sets fold threshold. | Positive model |
applications[].policy.positive.learning.headers | list of string | — | — | Header names or values. | Positive model |
applications[].policy.positive.learning.cookies | list of string | — | — | Cookie names the setting covers. | Positive model |
applications[].policy.positive.learning.bodies | boolean | — | — | learn JSON request body structure | Positive model |
applications[].policy.positive.learning.responses | boolean | — | — | learn JSON answers (asks for response bodies) | Positive model |
applications[].policy.positive.learning.response_sample_rate | integer | — | — | answers per second per endpoint | Positive model |
applications[].policy.positive.unknown_endpoints | string | — | — | log | refuse | Positive model |
applications[].policy.positive.unknown_parameters | string | — | — | log | refuse | Positive model |
applications[].policy.positive.confirm_anomalies | boolean | — | — | Sets confirm anomalies. | Positive model |
applications[].policy.positive.staged_rules[] | list of object | — | — | staged_rules only log until a date: refusals of these rules (pos.param.* ...) are recorded as staged, so new rules can run in block mode without refusing yet. | Positive model |
applications[].policy.positive.staged_until | time (RFC 3339) | — | — | Sets staged until. | Positive model |
applications[].policy.positive.rules | list of object | — | — | rules are the endpoints' rules: learned (approved suggestions) and manual, in one list (the policy list positive_rules). | Positive model |
Virtual patches
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.virtual_patches[] | list of object | — | — | Group of settings: virtual patches. | Virtual patches |
applications[].policy.virtual_patches[].id | string | — | — | vp-NNNN (1 to 9999), assigned on import | Virtual patches |
applications[].policy.virtual_patches[].class | string | — | — | one of VirtualPatchClasses | Virtual patches |
applications[].policy.virtual_patches[].target | string | — | — | arg:NAME, header:NAME, cookie:NAME, body, any_arg, path | Virtual patches |
applications[].policy.virtual_patches[].paths | list of string | — | — | exact, or a prefix ending in * | Virtual patches |
applications[].policy.virtual_patches[].methods | list of string | — | — | HTTP methods the setting applies to. | Virtual patches |
applications[].policy.virtual_patches[].scanner | string | — | — | Where the patch came from (empty for a hand-made patch). | Virtual patches |
applications[].policy.virtual_patches[].report | string | — | — | Sets report. | Virtual patches |
applications[].policy.virtual_patches[].finding | string | — | — | the finding's key in the report | Virtual patches |
applications[].policy.virtual_patches[].comment | string | — | — | Free-text note kept with the entry. | Virtual patches |
applications[].policy.virtual_patches[].enforce | string | — | — | enforce "block" makes the patch refuse what it matches even while the application or the signatures module is in detect, so one proven patch can block while the rest of the rules only log. | Virtual patches |
Validation
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.validation | object | — | — | validation says whether and how this application may be scanned (ADM-17). | Prove it |
applications[].policy.validation.allow_scan | boolean | — | — | Sets allow scan. | Prove it |
applications[].policy.validation.note | string | — | — | Free-text note for operators. | Prove it |
applications[].policy.validation.listener | string | — | — | Sets listener. | Prove it |
applications[].policy.validation.host | string | — | — | Host name this entry applies to or connects to. | Prove it |
applications[].policy.validation.health_path | string | — | — | Sets health path. | Prove it |
applications[].policy.validation.seeds | object | — | — | Group of settings: seeds. | Prove it |
applications[].policy.validation.seeds.urls | list of string | — | — | Sets urls. | Prove it |
applications[].policy.validation.seeds.openapi | list of string | — | — | Sets openapi. | Prove it |
applications[].policy.validation.seeds.graphql | list of string | — | — | Sets graphql. | Prove it |
applications[].policy.validation.seeds.openapi_files | list of string | — | — | openapi_files are descriptions on the control node's disk, for an API that does not serve its own. | Prove it |
applications[].policy.validation.exclude_paths | list of string | — | — | Sets exclude paths. | Prove it |
applications[].policy.validation.engines | list of string | — | — | Sets engines. | Prove it |
applications[].policy.validation.auth | object | — | — | Group of settings: auth. | Prove it |
applications[].policy.validation.auth.type | string | — | — | Kind of this entry. | Prove it |
applications[].policy.validation.auth.login_path | string | — | — | Sets login path. | Prove it |
applications[].policy.validation.auth.username_field | string | — | — | Sets username field. | Prove it |
applications[].policy.validation.auth.password_field | string | — | — | Sets password field. | Prove it |
applications[].policy.validation.auth.username | string | — | — | Sets username. | Prove it |
applications[].policy.validation.auth.token_field | string | — | — | Sets token field. | Prove it |
applications[].policy.validation.auth.fields | list of string | — | — | Sets fields. | Prove it |
applications[].policy.validation.auth.cookies | list of string | — | — | Cookie names the setting covers. | Prove it |
applications[].policy.validation.auth.header | string | — | — | Name of the header. | Prove it |
applications[].policy.validation.auth.check_path | string | — | — | Sets check path. | Prove it |
applications[].policy.validation.limits | object | — | — | Group of settings: limits. | Prove it |
applications[].policy.validation.limits.profile | string | — | — | Sets profile. | Prove it |
applications[].policy.validation.limits.rate | integer | — | — | Sets rate. | Prove it |
applications[].policy.validation.limits.concurrency | integer | — | — | Sets concurrency. | Prove it |
applications[].policy.validation.limits.requests | integer | — | — | Sets requests. | Prove it |
applications[].policy.validation.limits.duration | duration | — | — | Sets duration. | Prove it |
Example
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}
icap_servers:
- name: av
url: icap://av.internal/avscan
applications:
- name: shop
hostnames: [shop.example.com]
listeners: [web]
server_pool: shop
policy:
files:
mode: block
icap: {server: av, on_failure: open}
rules:
- paths: ["/upload/*"]
allow: [image, pdf]
max_size: 5MiB