Appearance
Response, session and data protection policy Since v0.2
These sections edit or check responses and protect sessions and data. 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).
Response
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.response | object | — | — | Group of settings: response. | Response headers |
applications[].policy.response.max_body | size | — | — | Sets max body. | Response headers |
applications[].policy.response.content_types | list of string | — | — | Sets content types. | Response headers |
applications[].policy.response.skip | list of string | — | — | What to leave out of inspection. | Response headers |
applications[].policy.response.compress | boolean | — | — | Sets compress. | Response headers |
Header hardening
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.headers | object | — | — | Group of settings: headers. | Response headers |
applications[].policy.headers.enabled | boolean | — | — | Turns the feature on or off. | Response headers |
applications[].policy.headers.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | Response headers |
applications[].policy.headers.preset | string | — | — | Sets preset. | Response headers |
applications[].policy.headers.set[] | list of object | — | — | Group of settings: set. | Response headers |
applications[].policy.headers.set[].name | string | — | — | The name that identifies this entry. | Response headers |
applications[].policy.headers.set[].value | string | — | — | Sets value. | Response headers |
applications[].policy.headers.set[].when | string | — | — | always, missing (default), remove | Response headers |
applications[].policy.headers.set[].content_types | list of string | — | — | Sets content types. | Response headers |
applications[].policy.headers.hsts | object | — | — | Group of settings: hsts. | Response headers |
applications[].policy.headers.hsts.enabled | boolean | — | — | Turns the feature on or off. | Response headers |
applications[].policy.headers.hsts.max_age | duration | — | — | Longest age accepted. | Response headers |
applications[].policy.headers.hsts.include_subdomains | boolean | — | — | Sets include subdomains. | Response headers |
applications[].policy.headers.hsts.preload | boolean | — | — | Sets preload. | Response headers |
applications[].policy.headers.remove_banners | boolean | — | — | Sets remove banners. | Response headers |
applications[].policy.headers.remove | list of string | — | — | Sets remove. | Response headers |
applications[].policy.headers.errors | object | — | — | Group of settings: errors. | Response headers |
applications[].policy.headers.errors.enabled | boolean | — | — | Turns the feature on or off. | Response headers |
applications[].policy.headers.errors.statuses | list of string | — | — | Sets statuses. | Response headers |
applications[].policy.headers.errors.status | string | — | — | keep, or one status for all | Response headers |
applications[].policy.headers.errors.skip | list of string | — | — | What to leave out of inspection. | Response headers |
applications[].policy.headers.errors.capture | boolean | — | — | Sets capture. | Response headers |
applications[].policy.headers.csp_reports | boolean | — | — | Sets csp reports. | Response headers |
Cookie protection
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.cookies | object | — | — | Group of settings: cookies. | Cookie protection |
applications[].policy.cookies.enabled | boolean | — | — | Turns the feature on or off. | Cookie protection |
applications[].policy.cookies.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | Cookie protection |
applications[].policy.cookies.attributes | object | — | — | Group of settings: attributes. | Cookie protection |
applications[].policy.cookies.attributes.secure | boolean | — | — | Sets secure. | Cookie protection |
applications[].policy.cookies.attributes.http_only | boolean | — | — | Sets http only. | Cookie protection |
applications[].policy.cookies.attributes.same_site | string | — | — | Sets same site. | Cookie protection |
applications[].policy.cookies.attributes.except | list of string | — | — | Sets except. | Cookie protection |
applications[].policy.cookies.protect[] | list of object | — | — | Group of settings: protect. | Cookie protection |
applications[].policy.cookies.protect[].names | list of string | — | — | Sets names. | Cookie protection |
applications[].policy.cookies.protect[].method | string | — | — | encrypt (default) or sign | Cookie protection |
applications[].policy.cookies.grace_until | time (RFC 3339) | — | — | Sets grace until. | Cookie protection |
applications[].policy.cookies.on_tamper | string | — | — | Sets on tamper. | Cookie protection |
applications[].policy.cookies.keys | object | — | — | Group of settings: keys. | Cookie protection |
applications[].policy.cookies.keys.rotation | duration | — | — | Sets rotation. | Cookie protection |
applications[].policy.cookies.keys.keep | integer | — | — | Sets keep. | Cookie protection |
Session protection
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.sessions | object | — | — | Group of settings: sessions. | Session protection |
applications[].policy.sessions.enabled | boolean | — | — | Turns the feature on or off. | Session protection |
applications[].policy.sessions.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | Session protection |
applications[].policy.sessions.cookies | list of string | — | — | Cookie names the setting covers. | Session protection |
applications[].policy.sessions.bind | object | — | — | Group of settings: bind. | Session protection |
applications[].policy.sessions.bind.network | boolean | — | — | Sets network. | Session protection |
applications[].policy.sessions.bind.ipv4_prefix | integer | — | — | Sets ipv4 prefix. | Session protection |
applications[].policy.sessions.bind.ipv6_prefix | integer | — | — | Sets ipv6 prefix. | Session protection |
applications[].policy.sessions.bind.tls_fingerprint | boolean | — | — | Sets tls fingerprint. | Session protection |
applications[].policy.sessions.bind.browser | boolean | — | — | Sets browser. | Session protection |
applications[].policy.sessions.unbound | string | — | — | Sets unbound. | Session protection |
applications[].policy.sessions.grace_until | time (RFC 3339) | — | — | Sets grace until. | Session protection |
applications[].policy.sessions.on_mismatch | string | — | — | Sets on mismatch. | Session protection |
applications[].policy.sessions.attribution | string | — | — | Sets attribution. | Session protection |
applications[].policy.sessions.keys | object | — | — | Group of settings: keys. | Session protection |
applications[].policy.sessions.keys.rotation | duration | — | — | Sets rotation. | Session protection |
applications[].policy.sessions.keys.keep | integer | — | — | Sets keep. | Session protection |
CSRF
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.csrf | object | — | — | Group of settings: csrf. | CSRF and CORS |
applications[].policy.csrf.enabled | boolean | — | — | Turns the feature on or off. | CSRF and CORS |
applications[].policy.csrf.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | CSRF and CORS |
applications[].policy.csrf.methods | list of string | — | — | HTTP methods the setting applies to. | CSRF and CORS |
applications[].policy.csrf.trusted_origins | list of string | — | — | Sets trusted origins. | CSRF and CORS |
applications[].policy.csrf.skip | list of string | — | — | What to leave out of inspection. | CSRF and CORS |
applications[].policy.csrf.tokens | object | — | — | Group of settings: tokens. | CSRF and CORS |
applications[].policy.csrf.tokens.pages | list of string | — | — | Sets pages. | CSRF and CORS |
applications[].policy.csrf.tokens.require | list of string | — | — | Sets require. | CSRF and CORS |
applications[].policy.csrf.tokens.ttl | duration | — | — | How long the value is kept. | CSRF and CORS |
CORS
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.cors | object | — | — | Group of settings: cors. | CSRF and CORS |
applications[].policy.cors.enabled | boolean | — | — | Turns the feature on or off. | CSRF and CORS |
applications[].policy.cors.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | CSRF and CORS |
applications[].policy.cors.on_disallowed | string | — | — | Sets on disallowed. | CSRF and CORS |
applications[].policy.cors.assess | boolean | — | — | Sets assess. | CSRF and CORS |
applications[].policy.cors.rules[] | list of object | — | — | Group of settings: rules. | CSRF and CORS |
applications[].policy.cors.rules[].name | string | — | — | The name that identifies this entry. | CSRF and CORS |
applications[].policy.cors.rules[].paths | list of string | — | — | Request paths the setting applies to. | CSRF and CORS |
applications[].policy.cors.rules[].origins | list of string | — | — | Sets origins. | CSRF and CORS |
applications[].policy.cors.rules[].methods | list of string | — | — | HTTP methods the setting applies to. | CSRF and CORS |
applications[].policy.cors.rules[].headers | list of string | — | — | Header names or values. | CSRF and CORS |
applications[].policy.cors.rules[].expose | list of string | — | — | Sets expose. | CSRF and CORS |
applications[].policy.cors.rules[].credentials | boolean | — | — | Sets credentials. | CSRF and CORS |
applications[].policy.cors.rules[].max_age | duration | — | — | Longest age accepted. | CSRF and CORS |
applications[].policy.cors.rules[].preflight | string | — | — | Sets preflight. | CSRF and CORS |
Data leak masking
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.dlp | object | — | — | Group of settings: dlp. | Data leaks |
applications[].policy.dlp.enabled | boolean | — | — | Turns the feature on or off. | Data leaks |
applications[].policy.dlp.mode | string | — | detect, block | Whether the feature only logs (detect) or also acts (block). | Data leaks |
applications[].policy.dlp.detectors | object | — | — | Group of settings: detectors. | Data leaks |
applications[].policy.dlp.detectors.card | object | — | — | Group of settings: card. | Data leaks |
applications[].policy.dlp.detectors.card.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.detectors.card.block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.detectors.card.keep_last4 | boolean | — | — | Sets keep last4. | Data leaks |
applications[].policy.dlp.detectors.us_ssn | object | — | — | Group of settings: us ssn. | Data leaks |
applications[].policy.dlp.detectors.us_ssn.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.detectors.us_ssn.block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.detectors.iban | object | — | — | Group of settings: iban. | Data leaks |
applications[].policy.dlp.detectors.iban.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.detectors.iban.block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.detectors.aadhaar | object | — | — | Group of settings: aadhaar. | Data leaks |
applications[].policy.dlp.detectors.aadhaar.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.detectors.aadhaar.block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.detectors.uk_nino | object | — | — | Group of settings: uk nino. | Data leaks |
applications[].policy.dlp.detectors.uk_nino.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.detectors.uk_nino.block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.patterns[] | list of object | — | — | Group of settings: patterns. | Data leaks |
applications[].policy.dlp.patterns[].name | string | — | — | The name that identifies this entry. | Data leaks |
applications[].policy.dlp.patterns[].regex | string | — | — | Sets regex. | Data leaks |
applications[].policy.dlp.patterns[].action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.patterns[].min_count | integer | — | — | Sets min count. | Data leaks |
applications[].policy.dlp.patterns[].block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.dictionaries[] | list of object | — | — | Group of settings: dictionaries. | Data leaks |
applications[].policy.dlp.dictionaries[].name | string | — | — | The name that identifies this entry. | Data leaks |
applications[].policy.dlp.dictionaries[].words | list of string | — | — | Sets words. | Data leaks |
applications[].policy.dlp.dictionaries[].case_sensitive | boolean | — | — | Sets case sensitive. | Data leaks |
applications[].policy.dlp.dictionaries[].action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.dictionaries[].min_count | integer | — | — | Sets min count. | Data leaks |
applications[].policy.dlp.dictionaries[].block_at | integer | — | — | Score at which the request is blocked. | Data leaks |
applications[].policy.dlp.skip | list of string | — | — | What to leave out of inspection. | Data leaks |
applications[].policy.dlp.block_status | integer | — | — | Sets block status. | Data leaks |
applications[].policy.dlp.requests | object | — | — | Group of settings: requests. | Data leaks |
applications[].policy.dlp.requests.action | string | — | — | What happens on a match. | Data leaks |
applications[].policy.dlp.requests.skip | list of string | — | — | What to leave out of inspection. | Data leaks |
Client-side scripts
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.scripts | object | — | — | scripts is the page watch and the confirmed script hashes. | Endpoint insights |
applications[].policy.scripts.watch | object | — | — | Group of settings: watch. | Endpoint insights |
applications[].policy.scripts.watch.enabled | boolean | off | — | default off | Endpoint insights |
applications[].policy.scripts.watch.pages | list of string | — | — | paths fetched from the server pool | Endpoint insights |
applications[].policy.scripts.watch.interval | duration | 1h | — | default 1h | Endpoint insights |
applications[].policy.scripts.watch.alert_new | boolean | on | — | default on | Endpoint insights |
applications[].policy.scripts.watch.alert_changed | boolean | on | — | default on | Endpoint insights |
applications[].policy.scripts.known_good | list of string | — | — | known_good are confirmed script content hashes (sha256:<64 hex>): a change to one of them raises no script.changed alert. | Endpoint insights |
Outbound guard (SSRF)
| Key | Type | Default | Allowed values / range | Meaning | Guide page |
|---|---|---|---|---|---|
applications[].policy.ssrf | object | — | — | ssrf checks URL-shaped values for internal destinations. | Outbound guard |
applications[].policy.ssrf.enabled | boolean | — | — | Turns the feature on or off. | Outbound guard |
applications[].policy.ssrf.mode | string | — | detect, block | empty: same as the application (detect wins) | Outbound guard |
applications[].policy.ssrf.action | string | — | — | action: refuse (the module's mode decides whether that blocks) or log (never blocks). | Outbound guard |
applications[].policy.ssrf.where | list of string | — | — | parameter locations checked | Outbound guard |
applications[].policy.ssrf.headers | list of string | — | — | request headers checked as URLs | Outbound guard |
applications[].policy.ssrf.url_names | list of string | — | — | Sets url names. | Outbound guard |
applications[].policy.ssrf.bare_hosts | boolean | — | — | Sets bare hosts. | Outbound guard |
applications[].policy.ssrf.categories | list of string | — | — | Per-category actions. | Outbound guard |
applications[].policy.ssrf.schemes | list of string | — | — | Sets schemes. | Outbound guard |
applications[].policy.ssrf.allow_networks | list of string | — | — | Sets allow networks. | Outbound guard |
applications[].policy.ssrf.allow_hosts | list of string | — | — | Sets allow hosts. | Outbound guard |
applications[].policy.ssrf.internal_domains | list of string | — | — | Sets internal domains. | Outbound guard |
applications[].policy.ssrf.redirectors | boolean | — | — | Sets redirectors. | Outbound guard |
applications[].policy.ssrf.dns | object | — | — | Group of settings: dns. | Outbound guard |
applications[].policy.ssrf.dns.enabled | boolean | — | — | Turns the feature on or off. | Outbound guard |
applications[].policy.ssrf.dns.mode | string | — | — | async | sync | Outbound guard |
applications[].policy.ssrf.dns.timeout | duration | — | — | Time allowed before the operation is abandoned. | Outbound guard |
applications[].policy.ssrf.dns.cache_size | integer | — | — | Sets cache size. | Outbound guard |
applications[].policy.ssrf.dns.cache_ttl | duration | — | — | Sets cache ttl. | Outbound guard |
applications[].policy.ssrf.egress | object | — | — | Group of settings: egress. | Outbound guard |
applications[].policy.ssrf.egress.enabled | boolean | — | — | Turns the feature on or off. | Outbound guard |
applications[].policy.ssrf.egress.listen | string | — | — | loopback IP:port, or an absolute unix socket path | Outbound guard |
applications[].policy.ssrf.egress.allow_hosts | list of string | — | — | empty: any host that is not internal | Outbound guard |
applications[].policy.ssrf.egress.allow_ports | list of string | — | — | Sets allow ports. | Outbound guard |
applications[].policy.ssrf.egress.deny_internal | boolean | — | — | Sets deny internal. | Outbound guard |
applications[].policy.ssrf.egress.connect | boolean | — | — | connect tunnels (HTTPS through the proxy) | Outbound guard |
applications[].policy.ssrf.egress.max_connections | integer | — | — | Sets max connections. | Outbound guard |
applications[].policy.ssrf.egress.dns_timeout | duration | — | — | Sets dns timeout. | Outbound guard |
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}
applications:
- name: shop
hostnames: [shop.example.com]
listeners: [web]
server_pool: shop
policy:
headers:
mode: block
preset: baseline
hsts: {enabled: true, max_age: 8760h, include_subdomains: true}
response:
max_body: 2MiB
skip: ["/static/*"]
compress: true