If you have an existing Fastly VCL Enforcer configuration, you can learn how to upgrade to v12 in this article.
If you are using the Deploy Tool method, you may need:
/deploy folder. Possible files include:
main.vcl (MAIN): Ensure all the px_* subroutines are invoked where needed.px.vcl (PX)px_configs.vcl (PX_CONFIGS): Ensure it aligns with the information in the enforcerConfig.json provided.px_custom.vcl (PX_CUSTOM): Use the latest version and add any custom implementations as needed.If you are upgrading manually, have the following ready, including with any custom implementations if needed:
main.vcl (MAIN): Fastly’s default main VCL with HUMAN logic already integrated. This file can be used as the main VCL file for Fastly services that don’t have one, or as a basic example for how to integrate the HUMAN logic into an existing main VCL file.px.vcl (PX): All HUMAN core logic. This file should not be customized or modified in any way. Provided by HUMAN.px_configs.vcl (PX_CONFIGS): Contains Enforcer configuration table and additional backend configs. This file can be modified based on the desired Enforcer configuration. Provided by HUMAN.px_custom.vcl (PX_CUSTOM): Contains Enforcer custom code, defined custom behavior, and Enforcer features. This file can be modified based on the desired Enforcer configuration or desired custom logic that should be executed within the Enforcer. Provided by HUMAN.You can use HUMAN’s Deploy Tool to quickly walk through the necessary configuration changes needed to upgrade your Enforcer version. This reduces the manual work you need to complete to upgrade the Enforcer.
Be aware that if your Enforcer version is very old, then some features and configurations may not completely carry over. Especially in these cases, the best practice is to review the upgraded Fastly service thoroughly before activating it.
The Enforcer configuration file, enforcerConfig.json, has important information about your HUMAN account such as your Application ID or server token that the Enforcer uses to work with your application. If you don’t have one already, you need to download this file from the HUMAN console. Otherwise, move on to Create a Fastly API token.
button to download enforcerConfig.json./deploy.If you do not have a Fastly API token yet, create one with the following steps. If you have one, move on to Run the Deploy Tool.
global) . Be sure to also deselect Read-only access (global:read), which is selected by default.This will be the only time you’ll see your token, so be sure to save it before closing the page!
You can run the Deploy Tool with either of the following methods:
Note for Windows users
Windows users also need to complete additional setup for Docker:
C:\Windows\System32\wsl.exe --update --web-download, then hit Enter.enforcerConfig.json. Based on our example from above, this would be the /deploy directory.enforcerConfig.json. Based on our example from above, this would be the /deploy directory.cdn-enforcer-deploy-tool.zip to the same directory you saved enforcerConfig.json in.cdn-enforcer-deploy-tool.batcdn-enforcer-deploy-tool.commandIf you have any custom VCL files that are different from the default, such as custom subroutines in PX_CUSTOM, be sure to choose to deploy custom VCL files and choose those files.
y to deploy the Enforcer.To ensure that you are taking advantage of the latest features, several configurations and deploy changes need to be made in order to upgrade your Fastly VCL Enforcer to version 12. This document serves as a comprehensive guide to the changes that must be made.
This change is required if upgrading from version <9.x.
Instead of using a Syslog log streaming endpoint, we’ve changed our async activities and telemetry logs to use Fastly’s HTTP logging endpoint.
This change requires removing the older PX-Syslog logging endpoint and configuring two new logging endpoints instead. For more information about Fastly log streaming, see here.
On your Fastly service, go to “Logging” tab
Add a new Logging endpoint with the information below:
https://collector-<px_app_id>.perimeterx.net/api/v1/collector/s2shttps://collector-<px_app_id>.perimeterx.net/api/v2/risk/telemetrySeveral configuration options were deprecated in Fastly VCL v10. If one or more configurations in the list below are present in the px_configs table of the PX_CONFIGS VCL file, please modify them accordingly.
To change the PX_CUSTOM file:
Some tables and dictionaries in the PX_CUSTOM VCL file have also changed. See the table below for details.
As part of an effort to reduce HUMAN’s Fastly VCL workspace footprint, many custom subroutines in the PX_CUSTOM VCL file have been changed to return boolean values instead of setting headers.
Please pay special attention to these custom subroutines:
We’ve also adjusted px_custom_check_sensitive_route subroutine to return a boolean value instead of setting a header. Here is the previous implementation of this subroutine:
Compare this with the newer implementation of the subroutine:
The regular expression in the condition (i.e., <sensitive_routes>) should stay the same for both implementations. The difference is that instead of setting the X-PX-sensitive-route header, we can simply return true.
In version 9.x and earlier, HUMAN used headers beginning with x-px-* to store information during the duration of the Fastly request life cycle. These headers have been renamed in version 12 and will no longer be present on the request. Any references to these headers in your Fastly VCL code should be removed.
If you have logic in your Fastly VCL files that relies on these x-px-* headers, please reach out to your HUMAN Solution Architect or Customer Support for guidance on how to align this code with version 12.
Version 12 includes the new remote configuration feature. Remote configuration is a feature that lets you access and modify your Enforcer’s configuration remotely without redeploying. This also allows the HUMAN team to troubleshoot or customize your Enforcer directly. Remote configuration is required as part of your Enforcer setup.
HUMAN will never change your Enforcer configuration without your permission. You can learn more about remote configurations with our help article.
As part of version 12 we have moved the sending of our async activities to the px_log subroutine, which should be called at the beginning of the vcl_log subroutine. Please add a call to the px_log subroutine at the beginning of the vcl_log subroutine (see Install the Fastly VCL Enforcer v12 for an example).