Configuration Reference

Overview

All HUMAN enforcer configuration is stored in a data group named pxconfig. Configuration values are read from this data group at runtime.

Modifying Configuration

To modify a configuration value, use the following command on the F5 shell:

$modify /ltm data-group internal pxconfig records modify { KEY_NAME { data VALUE } }

Where:

  • KEY_NAME is the name of the configuration directive
  • VALUE is the value to set

Example: Enable blocking mode:

$modify /ltm data-group internal pxconfig records modify { module_mode { data 2 } }

Example: Set a custom IP header:

$modify /ltm data-group internal pxconfig records modify { ip_header { data X-Forwarded-For } }

Directives

DirectiveDescriptionDefaultValue
app_idHUMAN application idNONEString
cookie_secret_keyCookie hashing secret (salt)NONEString
auth_tokenJWT used to authenticate with px serversNONEString
enable_moduleSets the module on/off1int
module_modeSets the module working mode: 2 = blocking, 1 = sync monitor, 0 = async monitor1int
whitelisted_routes_className of the class for allowlist routespx_<APP_ID>_whitelisted_routesString
whitelisted_query_params_className of the class for allowlist query parameterspx_<APP_ID>_whitelisted_query_paramsString
specific_routes_className of the class for specific routespx_<APP_ID>_specific_routesString
sensitive_routes_className of the class for sensitive routespx_<APP_ID>_sensitive_routesString
monitor_routes_className of the class for monitor routes (domain/path based monitor mode)px_<APP_ID>_monitor_routesString
send_page_activitiesToggles send page requested activity0int
send_block_activitiesToggles send block activities1int
excluded_extensionsFlags which extensions the module will skipregex StringString
risk_vsCorrelates with the virtual server for making risk api callspx_backend_<APP_ID>_vipString
risk_timeoutSets the timeout for api calls (in milliseconds)2500int
debugToggles debug mode on/off, see troubleshooting for more information0int
ip_headerCustom user header that contains real user ipNONEString
sensitive_headersList of sensitive headers not to send in risk api calls[“cookie”]list
custom_logoPath to url that contains a logo to be displayed on default block pageNONEString
js_refPath to url that contains a custom js file to inject into the default block pageNONEString
css_refPath to url that contains a custom css file to inject into the default block pageNONEString
allowed_domainsA list of domain names on which the enforcer will run on. Run on all if blank[""]list
enable_module_header_nameThe header name that should be used to enable the module (The header’s value should be True)NONEString
whitelist_ipsA list of ips/CIDRs to allow. If empty all the requests will be processed.[""]list
bypass_monitor_headerThe header name that can be used to bypass monitor mode on blocking activities.NONEString
enable_advanced_blocking_responseToggles the use of advanced blocking response1int
custom_cookie_headerA header name which will be used to extract the HUMAN cookie from.NONEString
enable_first_partyToggles first-party mode on/off.1int
enable_sensor_injectionToggles automatic JavaScript sensor injection on/off0int
enable_score_headerToggles sending the risk score to origin via x-px-score header0int
px_data_enrichment_header_nameHeader name to use for sending PXDE (data enrichment) payload to originNONEString

Directives containing APP_ID

Some directives in the configuration may require a specific name which contains the appID of the application taken from the portal.

The name in the configuration must be identical to the name configured in the data group/virtual server/pool.

A mismatch in the name may lead to errors on the module.

Configuration Examples

Enable Blocking Mode

$modify /ltm data-group internal pxconfig records modify { module_mode { data 2 } }

Enable Sensor Injection

When enabled, the iRule will automatically inject the HUMAN JavaScript sensor into HTML pages:

$modify /ltm data-group internal pxconfig records modify { enable_sensor_injection { data 1 } }

When sensor injection is enabled, the iRule will remove the Accept-Encoding header from incoming requests so the origin will NOT return compressed content. Make sure to enable compression on the LTM level if you use script injection.

Enable Score Header

Send the risk score to your origin server for custom handling:

$modify /ltm data-group internal pxconfig records modify { enable_score_header { data 1 } }

This will add an x-px-score header to requests forwarded to your origin.

Enable Data Enrichment Header

Send the PXDE (PerimeterX Data Enrichment) payload to your origin:

$modify /ltm data-group internal pxconfig records modify { px_data_enrichment_header_name { data x-px-data-enrichment } }

Set Custom IP Header

If your application is behind a proxy or CDN, specify the header containing the real client IP:

$modify /ltm data-group internal pxconfig records modify { ip_header { data X-Real-IP } }

Enable Debug Logging

For troubleshooting, enable debug logging:

$modify /ltm data-group internal pxconfig records modify { debug { data 1 } }

Remember to disable debug logging in production as it can impact performance.