Fastly for wizard¶
The Wallarm Edge node can be connected to Fastly running your APIs in either synchronous or asynchronous mode - without blocking any requests.
Follow the steps below to set up the connection.
Deploy Wallarm code on Fastly
-
Download the provided code bundle for your platform.
-
Go to Fastly UI → Account → API tokens → Personal tokens → Create token:
- Type: Automation token
- Scope: Global API access
- Leave other settings at their default unless specific changes are required
-
Go to Fastly UI → Compute → Compute services → Create service → Use a local project and create an instance for Wallarm.
-
Once created, copy the generated
--service-id
. -
Go to the local directory containing the Wallarm package and deploy it:
fastly compute deploy --service-id=<SERVICE_ID> --package=wallarm-api-security.tar.gz --token=<FASTLY_TOKEN>
The success message:
Specify Wallarm Node's and backend's hosts
For proper traffic routing for analysis and forwarding, you need to define the Wallarm Node and backend hosts in the Fastly service configuration:
-
Go to Fastly UI → Compute → Compute services → Wallarm service → Edit configuration.
-
Go to Origins and Create hosts:
- Add the Wallarm node URL as the
wallarm-node
host to route traffic to the Wallarm node for analysis. - Add your backend address as another host (e.g.,
backend
) to forward traffic from the node to your origin backend.
- Add the Wallarm node URL as the
-
Activate the new service version.
Create the Wallarm config store
Create the wallarm_config
config defining Wallarm-specific settings:
-
Go to Fastly UI → Resources → Config stores → Create a config store and create the
wallarm_config
store with the following key-value items:WALLARM_BACKEND
: Host name for the Wallarm Node instance specified in Compute service settings.ORIGIN_BACKEND
: Host name for the backend specified in Compute service settings.WALLARM_MODE_ASYNC
: Enables traffic copy analysis without affecting the original flow (true
) or inline analysis (false
, default).
-
Link the config store to the Wallarm Compute service.