Appearance
Add your first application Since v0.1
An application is a protected backend: the host names it answers, the virtual servers it is reachable on and the server pool that holds its servers. Every security policy is scoped to one application. A new application starts in detect mode, so it logs attacks and blocks nothing until you decide otherwise.
Before you begin
- A running node and a first administrator: see Install a node.
- Role:
operatororadminwith access to all applications. Scoped operators cannot add applications. - The address and port of your backend server, for example
10.0.0.5:8080.
Create a server pool
An application needs a pool. Create it first; see Server pools for every setting.
text
1. Open Applications > New application.
2. Under Servers, select Create a pool inline.
3. Enter the pool name and the server address (host:port), then preview and apply.sh
waap pools add -pool blog-servers -f servers.yaml -m "blog backend"yaml
# servers.yaml (waap pools add), or server_pools[].servers in the configuration
- {address: "10.0.0.5:8080", weight: 1, state: active}An inline pool is its own version
Creating a pool in the application form stores it as a separate configuration version, selects it and keeps your application draft. You still apply the application afterwards.
Add the application
text
1. Open Applications > New application.
2. Enter the Name, the Hostnames and the Listening addresses (virtual servers).
3. Under Servers, choose the server pool.
4. Optionally copy another application's security policy (its exceptions are not copied).
5. For an https virtual server, upload the certificate chain and key.
6. Select Preview changes, add a comment and select Apply.sh
waap apps add -app blog -m "first application" hostnames=blog.example.com listeners=web server_pool=blog-serversyaml
# applications[] in the configuration
- name: blog
hostnames: [blog.example.com]
listeners: [web]
server_pool: blog-servers
policy:
mode: detectUse -copy-from shop to copy another application's policy and -cert FILE -key FILE to upload a certificate (both before the hostnames= pairs). Every command accepts -dry-run to preview the change.
Send a test attack and read the event
Send a request that looks like SQL injection to the virtual server, with the application's host name:
sh
curl -i -H 'Host: blog.example.com' "http://127.0.0.1:8080/?q=1%27%20OR%201=1--"In detect mode the request reaches your server. The event records what the product would have blocked.
text
1. Open Monitor > Events.
2. Select the newest event to open its drawer.sh
waap events list -app blogAn event names the application, the module, the rule, the matched value, the action and the mode. For details, see Modes and limits.
Switch to block
When the events of normal traffic show no false positives, switch the application.
text
1. Open Applications > All applications, and select the application.
2. Open Request checks > General.
3. Set Protection mode to block, then select Preview changes and Apply.sh
waap apps set -app blog -m "enforce" policy.mode=blockyaml
applications:
- name: blog
policy:
mode: blockThe same attack now receives the block page with status 403 and an event reference.
Watch for false positives first
A false positive blocks a real customer. Read the events of a few days of normal traffic and add exceptions before you switch. Modules that you set to detect stay in detect, whatever the application mode.
Remove an application
In the application's General page, open Remove this application, type its name, preview and apply. CLI: waap apps remove -app blog -m "retire". Its events stay, its pool stays, and the last application cannot be removed. A rollback brings it back.
Troubleshooting
Unknown host name returns 404. Cause: no application answers the Host header. Fix: add the name to Hostnames and addresses, or send the request with the right Host.
An https virtual server is refused. Cause: the application has no certificate. Fix: upload one on the application's Certificates page.