Enrichment
  • 09 Nov 2023
  • Dark
    Light

Enrichment

  • Dark
    Light

Article Summary

Log Enrichment

Access logs can be enriched with the HUMAN bot information by enabling the px_variables_enabled property and creating NGINX variables with the proper names. To configure this variable use the NGINX map directive in the HTTP section of your NGINX configuration file. This should be added before additional configuration files are added.

The following variables are enabled:

  • Request UUID: pxuuid
  • Request VID: pxvid
  • Risk Round Trip: pxrtt
  • Risk Score: pxscore
  • Pass Reason: pxpass
  • Block Reason: pxblock
  • Cookie Validity: pxcookiets
  • Risk Call Reason: pxcall
....
http {
  ...
      log_format enriched '$remote_addr - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent" '
                    '| perimeterx $pxuuid $pxvid '
                    '$pxscore $pxscore $pxrtt $pxblock '
                    '$pxpass $pxcookiets $pxcall';

      access_log /var/log/nginx/access_log enriched;
  ...
}

Data Enrichment

See the Data Enrichment documentation for a full description of how HUMAN allows you to add enrichment data to each request.

Retrieving Enriched Data From the Enriched Data Cookie (_humande)

The HUMAN NGNIX module receives the HUMANDE value either as a _pxde cookie or as a RiskAPI response.
When HUMANDE extraction is enabled and the _pxde value is successfully extracted and verified, the module will send the HUMANDE value to the origin server in a header (as base64 encoded string).

The new NGINX variable $pxde (used as "log enrichment" and accessible by LUA scripts) contains a base64 encoded HUMANDE value

Configuration options:
px_enable_pxde - enables HUMANDE cookie extraction.
px_pxde_header_name - sets the name of HUMANDE header that is sent to the origin server. The header value will contain a base64 encoded HUMANDE value.


Was this article helpful?