Skip to content

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 ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.responseobject——Group of settings: response.Response headers
applications[].policy.response.max_bodysize——Sets max body.Response headers
applications[].policy.response.content_typeslist of string——Sets content types.Response headers
applications[].policy.response.skiplist of string——What to leave out of inspection.Response headers
applications[].policy.response.compressboolean——Sets compress.Response headers

Header hardening ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.headersobject——Group of settings: headers.Response headers
applications[].policy.headers.enabledboolean——Turns the feature on or off.Response headers
applications[].policy.headers.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).Response headers
applications[].policy.headers.presetstring——Sets preset.Response headers
applications[].policy.headers.set[]list of object——Group of settings: set.Response headers
applications[].policy.headers.set[].namestring——The name that identifies this entry.Response headers
applications[].policy.headers.set[].valuestring——Sets value.Response headers
applications[].policy.headers.set[].whenstring——always, missing (default), removeResponse headers
applications[].policy.headers.set[].content_typeslist of string——Sets content types.Response headers
applications[].policy.headers.hstsobject——Group of settings: hsts.Response headers
applications[].policy.headers.hsts.enabledboolean——Turns the feature on or off.Response headers
applications[].policy.headers.hsts.max_ageduration——Longest age accepted.Response headers
applications[].policy.headers.hsts.include_subdomainsboolean——Sets include subdomains.Response headers
applications[].policy.headers.hsts.preloadboolean——Sets preload.Response headers
applications[].policy.headers.remove_bannersboolean——Sets remove banners.Response headers
applications[].policy.headers.removelist of string——Sets remove.Response headers
applications[].policy.headers.errorsobject——Group of settings: errors.Response headers
applications[].policy.headers.errors.enabledboolean——Turns the feature on or off.Response headers
applications[].policy.headers.errors.statuseslist of string——Sets statuses.Response headers
applications[].policy.headers.errors.statusstring——keep, or one status for allResponse headers
applications[].policy.headers.errors.skiplist of string——What to leave out of inspection.Response headers
applications[].policy.headers.errors.captureboolean——Sets capture.Response headers
applications[].policy.headers.csp_reportsboolean——Sets csp reports.Response headers
KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.cookiesobject——Group of settings: cookies.Cookie protection
applications[].policy.cookies.enabledboolean——Turns the feature on or off.Cookie protection
applications[].policy.cookies.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).Cookie protection
applications[].policy.cookies.attributesobject——Group of settings: attributes.Cookie protection
applications[].policy.cookies.attributes.secureboolean——Sets secure.Cookie protection
applications[].policy.cookies.attributes.http_onlyboolean——Sets http only.Cookie protection
applications[].policy.cookies.attributes.same_sitestring——Sets same site.Cookie protection
applications[].policy.cookies.attributes.exceptlist of string——Sets except.Cookie protection
applications[].policy.cookies.protect[]list of object——Group of settings: protect.Cookie protection
applications[].policy.cookies.protect[].nameslist of string——Sets names.Cookie protection
applications[].policy.cookies.protect[].methodstring——encrypt (default) or signCookie protection
applications[].policy.cookies.grace_untiltime (RFC 3339)——Sets grace until.Cookie protection
applications[].policy.cookies.on_tamperstring——Sets on tamper.Cookie protection
applications[].policy.cookies.keysobject——Group of settings: keys.Cookie protection
applications[].policy.cookies.keys.rotationduration——Sets rotation.Cookie protection
applications[].policy.cookies.keys.keepinteger——Sets keep.Cookie protection

Session protection ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.sessionsobject——Group of settings: sessions.Session protection
applications[].policy.sessions.enabledboolean——Turns the feature on or off.Session protection
applications[].policy.sessions.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).Session protection
applications[].policy.sessions.cookieslist of string——Cookie names the setting covers.Session protection
applications[].policy.sessions.bindobject——Group of settings: bind.Session protection
applications[].policy.sessions.bind.networkboolean——Sets network.Session protection
applications[].policy.sessions.bind.ipv4_prefixinteger——Sets ipv4 prefix.Session protection
applications[].policy.sessions.bind.ipv6_prefixinteger——Sets ipv6 prefix.Session protection
applications[].policy.sessions.bind.tls_fingerprintboolean——Sets tls fingerprint.Session protection
applications[].policy.sessions.bind.browserboolean——Sets browser.Session protection
applications[].policy.sessions.unboundstring——Sets unbound.Session protection
applications[].policy.sessions.grace_untiltime (RFC 3339)——Sets grace until.Session protection
applications[].policy.sessions.on_mismatchstring——Sets on mismatch.Session protection
applications[].policy.sessions.attributionstring——Sets attribution.Session protection
applications[].policy.sessions.keysobject——Group of settings: keys.Session protection
applications[].policy.sessions.keys.rotationduration——Sets rotation.Session protection
applications[].policy.sessions.keys.keepinteger——Sets keep.Session protection

CSRF ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.csrfobject——Group of settings: csrf.CSRF and CORS
applications[].policy.csrf.enabledboolean——Turns the feature on or off.CSRF and CORS
applications[].policy.csrf.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).CSRF and CORS
applications[].policy.csrf.methodslist of string——HTTP methods the setting applies to.CSRF and CORS
applications[].policy.csrf.trusted_originslist of string——Sets trusted origins.CSRF and CORS
applications[].policy.csrf.skiplist of string——What to leave out of inspection.CSRF and CORS
applications[].policy.csrf.tokensobject——Group of settings: tokens.CSRF and CORS
applications[].policy.csrf.tokens.pageslist of string——Sets pages.CSRF and CORS
applications[].policy.csrf.tokens.requirelist of string——Sets require.CSRF and CORS
applications[].policy.csrf.tokens.ttlduration——How long the value is kept.CSRF and CORS

CORS ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.corsobject——Group of settings: cors.CSRF and CORS
applications[].policy.cors.enabledboolean——Turns the feature on or off.CSRF and CORS
applications[].policy.cors.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).CSRF and CORS
applications[].policy.cors.on_disallowedstring——Sets on disallowed.CSRF and CORS
applications[].policy.cors.assessboolean——Sets assess.CSRF and CORS
applications[].policy.cors.rules[]list of object——Group of settings: rules.CSRF and CORS
applications[].policy.cors.rules[].namestring——The name that identifies this entry.CSRF and CORS
applications[].policy.cors.rules[].pathslist of string——Request paths the setting applies to.CSRF and CORS
applications[].policy.cors.rules[].originslist of string——Sets origins.CSRF and CORS
applications[].policy.cors.rules[].methodslist of string——HTTP methods the setting applies to.CSRF and CORS
applications[].policy.cors.rules[].headerslist of string——Header names or values.CSRF and CORS
applications[].policy.cors.rules[].exposelist of string——Sets expose.CSRF and CORS
applications[].policy.cors.rules[].credentialsboolean——Sets credentials.CSRF and CORS
applications[].policy.cors.rules[].max_ageduration——Longest age accepted.CSRF and CORS
applications[].policy.cors.rules[].preflightstring——Sets preflight.CSRF and CORS

Data leak masking ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.dlpobject——Group of settings: dlp.Data leaks
applications[].policy.dlp.enabledboolean——Turns the feature on or off.Data leaks
applications[].policy.dlp.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).Data leaks
applications[].policy.dlp.detectorsobject——Group of settings: detectors.Data leaks
applications[].policy.dlp.detectors.cardobject——Group of settings: card.Data leaks
applications[].policy.dlp.detectors.card.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.detectors.card.block_atinteger——Score at which the request is blocked.Data leaks
applications[].policy.dlp.detectors.card.keep_last4boolean——Sets keep last4.Data leaks
applications[].policy.dlp.detectors.us_ssnobject——Group of settings: us ssn.Data leaks
applications[].policy.dlp.detectors.us_ssn.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.detectors.us_ssn.block_atinteger——Score at which the request is blocked.Data leaks
applications[].policy.dlp.detectors.ibanobject——Group of settings: iban.Data leaks
applications[].policy.dlp.detectors.iban.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.detectors.iban.block_atinteger——Score at which the request is blocked.Data leaks
applications[].policy.dlp.detectors.aadhaarobject——Group of settings: aadhaar.Data leaks
applications[].policy.dlp.detectors.aadhaar.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.detectors.aadhaar.block_atinteger——Score at which the request is blocked.Data leaks
applications[].policy.dlp.detectors.uk_ninoobject——Group of settings: uk nino.Data leaks
applications[].policy.dlp.detectors.uk_nino.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.detectors.uk_nino.block_atinteger——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[].namestring——The name that identifies this entry.Data leaks
applications[].policy.dlp.patterns[].regexstring——Sets regex.Data leaks
applications[].policy.dlp.patterns[].actionstring——What happens on a match.Data leaks
applications[].policy.dlp.patterns[].min_countinteger——Sets min count.Data leaks
applications[].policy.dlp.patterns[].block_atinteger——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[].namestring——The name that identifies this entry.Data leaks
applications[].policy.dlp.dictionaries[].wordslist of string——Sets words.Data leaks
applications[].policy.dlp.dictionaries[].case_sensitiveboolean——Sets case sensitive.Data leaks
applications[].policy.dlp.dictionaries[].actionstring——What happens on a match.Data leaks
applications[].policy.dlp.dictionaries[].min_countinteger——Sets min count.Data leaks
applications[].policy.dlp.dictionaries[].block_atinteger——Score at which the request is blocked.Data leaks
applications[].policy.dlp.skiplist of string——What to leave out of inspection.Data leaks
applications[].policy.dlp.block_statusinteger——Sets block status.Data leaks
applications[].policy.dlp.requestsobject——Group of settings: requests.Data leaks
applications[].policy.dlp.requests.actionstring——What happens on a match.Data leaks
applications[].policy.dlp.requests.skiplist of string——What to leave out of inspection.Data leaks

Client-side scripts ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.scriptsobject——scripts is the page watch and the confirmed script hashes.Endpoint insights
applications[].policy.scripts.watchobject——Group of settings: watch.Endpoint insights
applications[].policy.scripts.watch.enabledbooleanoff—default offEndpoint insights
applications[].policy.scripts.watch.pageslist of string——paths fetched from the server poolEndpoint insights
applications[].policy.scripts.watch.intervalduration1h—default 1hEndpoint insights
applications[].policy.scripts.watch.alert_newbooleanon—default onEndpoint insights
applications[].policy.scripts.watch.alert_changedbooleanon—default onEndpoint insights
applications[].policy.scripts.known_goodlist 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) ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.ssrfobject——ssrf checks URL-shaped values for internal destinations.Outbound guard
applications[].policy.ssrf.enabledboolean——Turns the feature on or off.Outbound guard
applications[].policy.ssrf.modestring—detect, blockempty: same as the application (detect wins)Outbound guard
applications[].policy.ssrf.actionstring——action: refuse (the module's mode decides whether that blocks) or log (never blocks).Outbound guard
applications[].policy.ssrf.wherelist of string——parameter locations checkedOutbound guard
applications[].policy.ssrf.headerslist of string——request headers checked as URLsOutbound guard
applications[].policy.ssrf.url_nameslist of string——Sets url names.Outbound guard
applications[].policy.ssrf.bare_hostsboolean——Sets bare hosts.Outbound guard
applications[].policy.ssrf.categorieslist of string——Per-category actions.Outbound guard
applications[].policy.ssrf.schemeslist of string——Sets schemes.Outbound guard
applications[].policy.ssrf.allow_networkslist of string——Sets allow networks.Outbound guard
applications[].policy.ssrf.allow_hostslist of string——Sets allow hosts.Outbound guard
applications[].policy.ssrf.internal_domainslist of string——Sets internal domains.Outbound guard
applications[].policy.ssrf.redirectorsboolean——Sets redirectors.Outbound guard
applications[].policy.ssrf.dnsobject——Group of settings: dns.Outbound guard
applications[].policy.ssrf.dns.enabledboolean——Turns the feature on or off.Outbound guard
applications[].policy.ssrf.dns.modestring——async | syncOutbound guard
applications[].policy.ssrf.dns.timeoutduration——Time allowed before the operation is abandoned.Outbound guard
applications[].policy.ssrf.dns.cache_sizeinteger——Sets cache size.Outbound guard
applications[].policy.ssrf.dns.cache_ttlduration——Sets cache ttl.Outbound guard
applications[].policy.ssrf.egressobject——Group of settings: egress.Outbound guard
applications[].policy.ssrf.egress.enabledboolean——Turns the feature on or off.Outbound guard
applications[].policy.ssrf.egress.listenstring——loopback IP:port, or an absolute unix socket pathOutbound guard
applications[].policy.ssrf.egress.allow_hostslist of string——empty: any host that is not internalOutbound guard
applications[].policy.ssrf.egress.allow_portslist of string——Sets allow ports.Outbound guard
applications[].policy.ssrf.egress.deny_internalboolean——Sets deny internal.Outbound guard
applications[].policy.ssrf.egress.connectboolean——connect tunnels (HTTPS through the proxy)Outbound guard
applications[].policy.ssrf.egress.max_connectionsinteger——Sets max connections.Outbound guard
applications[].policy.ssrf.egress.dns_timeoutduration——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