Skip to content

Bot mitigation ​

These commands configure and inspect bot mitigation for an application: its settings, response ladder, known clients, challenges and CAPTCHA, signature agents, the bot catalog, and the shared fingerprint and file lists that applications use.

waap bots get ​

Shows every bot mitigation setting of the application: key, effective value, default, whether it is written, and the allowed values or range. Durations are shown as 1m0s to 24h0m0s. The first line says whether bot mitigation is on. The last line lists the fingerprint lists defined.

sh
waap bots get -app NAME [-json]

waap bots set ​

Changes bot mitigation settings. It works as waap api set, for policy.bots.

sh
waap bots set -app NAME [-m WHY] [-dry-run] KEY=VALUE...

Setting keys include the challenge settings:

  • non_browser
  • challenge.token_ttl, challenge.key_rotation
  • challenge.bind.ipv4_prefix, challenge.bind.ipv6_prefix, challenge.bind.tls_fingerprint
  • challenge.work, challenge.ignored_after
  • challenge.skip (comma-separated paths), challenge.path
  • tarpit.delay, tarpit.max_concurrent
  • weights.challenge_ignored, weights.token_invalid, weights.signature_invalid
  • captcha.provider, captcha.site_key, captcha.work, captcha.timeout, captcha.proxy, captcha.verify_url

And the behaviour settings:

  • behavior.crawl.enabled, behavior.crawl.distinct_paths, behavior.crawl.per, behavior.crawl.weight
  • behavior.scan.* (enabled, not_found, per, weight)
  • behavior.scrape.* (paths, requests, per, no_assets, weight)
  • behavior.enumerate.* (paths, parameter, distinct, per, weight)

Durations take a unit (30s, 10m, 1h). The first set creates the bots section, which turns bot mitigation on. A deny or allow list must be defined in bot_lists first.

sh
waap bots set -app shop -m "deny tools" mode=block fingerprints.deny_lists=known-tools

waap bots list get ​

Prints one of the application's record lists as YAML.

sh
waap bots list get -app NAME -list LIST

LIST is one of:

  • responses: the response ladder.
  • known_clients: known clients.
  • login: the watched login endpoints. See docs/bots.md.

waap bots list set ​

Replaces a record list with the records in FILE (YAML or JSON).

sh
waap bots list set -app NAME -list LIST -f FILE [-m WHY] [-dry-run]

The record formats are:

  • responses (the ladder): at, action (log, challenge, captcha, tarpit, block or ban), and for for bans.
  • known_clients: name, ja4, ja3, user_agent, action (no_challenge or allow).

An empty list ([]) removes it. For responses, the default ladder (block at 80) then applies.

waap bots fingerprints ​

Lists the client kinds seen in the window, most requests first.

sh
waap bots fingerprints -app NAME [-window 7d] [-limit 50] [-json]
  • -window is 24h, 7d, 30d or 90d at most.
  • Each row shows requests, refusals, JA4, JA4H, and user agent (truncated; full with -json).
  • It also shows the inline fingerprint lists containing the kind, and the known client it matches.

Counts reach the store within 10 seconds.

waap bots catalog ​

Shows the bot catalog. Per category it shows the number of bots and how many can be verified. Then it lists the verifiable bots and operator entries, with how each is verified, and its range lists' entry count, last fetch and error. -all also lists the vendored patterns. The last lines give the vendored version and any skipped patterns.

sh
waap bots catalog [-category C] [-all] [-json]

waap bots classify ​

Shows which catalog bot a user agent claims, or "not a catalog bot".

sh
waap bots classify -ua USER-AGENT [-ip ADDRESS] [-app NAME] [-json]
  • With -ip, it shows whether the address is in the bot's published ranges or address lists, and what reverse DNS says. The control plane looks it up now, up to 5 s.
  • With -app, it shows the application's action for the category and its effect.
  • -app is not needed otherwise.

waap bots challenge-keys list ​

Lists the application's challenge signing keys: ID, when and by whom each was made (system for scheduled rotations), which one signs new challenges and tokens, the rotation period and the next scheduled rotation. Keys are never printed.

sh
waap bots challenge-keys list -app NAME [-json]

waap bots challenge-keys rotate ​

Makes a new challenge signing key now. It is answered by the active node and needs the operator role. The previous key keeps verifying until the next rotation, so tokens signed with the one before that stop working. The rotation is recorded in the audit log.

sh
waap bots challenge-keys rotate -app NAME [-json]

waap bots agents list ​

Lists the signature agents (signed bot requests): every agent from the catalog and the configuration, with its origin, bot or category, source, keys (configured, or in the last fetched directory), directory fetch status, and signed requests per application (verified and invalid).

sh
waap bots agents list [-json]

waap bots agents add ​

Puts an agent in bot_catalog.agents, or replaces one with the same name.

sh
waap bots agents add -name NAME -origin URL [-bot BOT | -category C] [-keys X,...] [-m WHY] [-dry-run] [-json]
  • -bot names the catalog bot the agent is.
  • -category names the category instead.
  • -keys gives Ed25519 public keys (JWK x, base64url) instead of fetching its key directory.

waap bots agents remove ​

Deletes a configuration agent. Catalog agents can only be replaced by name.

sh
waap bots agents remove -name NAME [-m WHY] [-dry-run] [-json]

add and remove need an operator with access to every application.

waap bots clients ​

Lists the clients with the highest bot scores on every node. Each node publishes every 10 seconds. A client seen on several nodes appears once, with its highest score.

sh
waap bots clients -app NAME [-limit 50] [-json]

Each row shows the score, the signals with their current weights, the behaviour counts over the application's windows (distinct paths, misses, content requests, distinct values), JA4, user agent and last seen. -limit is up to 200. Token holders appear as token:ID.

waap bots trust ​

Trusts one client address for the application's bot mitigation. It adds the access rule trust-bots-<address> as a new configuration version. The rule goes first in policy.access.rules, with action: trust and skip: [bots]. Other modules still run for the client.

sh
waap bots trust -app NAME -client ADDRESS [-m WHY] [-dry-run]

To refuse a client instead, use waap bans add. Remove the rule with waap config like any access rule.

waap bots logins ​

Shows, for each watched login endpoint (policy.bots.login), its thresholds, then its attempts, failures (with the ratio) and refusals over the window. It sums these over the nodes. It also lists the clients and usernames with the most failures. Usernames are redacted: first character and a keyed hash.

sh
waap bots logins -app NAME [-window 1h] [-json]

-window is 1m to 168h, default 1h. Edit the endpoints with waap bots list set -app NAME -list login -f FILE.

waap bots captcha ​

Manages the CAPTCHA provider for the application.

sh
waap bots captcha get -app NAME [-json]
waap bots captcha set -app NAME [-f FILE] [-json]
waap bots captcha remove -app NAME [-json]
waap bots captcha test -app NAME [-json]
  • get prints the CAPTCHA provider, its site key, and whether the secret is set (when, by whom). It never prints the secret.
  • set stores the third-party provider's secret. It is read from the first line of standard input, or from -f FILE. The secret goes to the store, never into the configuration.
  • remove deletes the secret. The self-hosted CAPTCHA is used then.
  • test asks the provider, from the control plane, to verify a dummy answer with the stored secret. It exits 0 when the provider is reachable and the secret is accepted, and 1 otherwise. The reason is printed.

set, remove and test need the operator role and are recorded in the audit log.

waap bots page set ​

Sets the application's challenge or CAPTCHA page from a file.

sh
waap bots page set -app NAME -kind challenge|captcha -f FILE [-m WHY] [-dry-run]

FILE is read from standard input when it is -. At most 64 KiB. The page is rolled out as a new configuration version (policy.bots.challenge.page).

The page must contain exactly once. It may use , , and .

waap bots page reset ​

Returns the challenge or CAPTCHA page to the built-in page.

sh
waap bots page reset -app NAME -kind challenge|captcha [-m WHY] [-dry-run]

waap bot-lists get ​

Shows the fingerprint lists as configured, as YAML. Then it shows each list's source (inline or url), entry count, last fetch, last error, and the applications using it.

sh
waap bot-lists get [-json]

waap bot-lists set ​

Replaces all fingerprint lists (bot_lists) with the records in FILE. Each record has name, then ja4, ja4h or ja3 values (leading parts ending in * are allowed for JA4 and JA4H), or url and refresh.

sh
waap bot-lists set -f FILE [-m WHY] [-dry-run]

A list still named by an application cannot be removed. Needs access to every application.

waap bot-lists refresh ​

Fetches a list defined with a url, now, on the active node. It prints the lists' status. Exit code 1 with the reason if the download fails. The last good copy stays.

sh
waap bot-lists refresh -name LIST [-json]

waap file-lists get ​

Shows the file hash lists as configured, as YAML. Then it shows each list's source (inline or url), entry count, last fetch, last error, and the applications using it.

sh
waap file-lists get [-json]

waap file-lists set ​

Replaces all file lists (file_lists) with the records in FILE. Each record has name, then either sha256 values (64 hexadecimal digits, at most 10,000 inline), or url (https) and refresh (5m to 168h, default 1h).

sh
waap file-lists set -f FILE [-m WHY] [-dry-run]

A fetched list has one SHA-256 per line, or sha256sum output. # starts a comment. A list still named by an application cannot be removed. Needs access to every application.

waap file-lists refresh ​

Fetches a list defined with a url, now, on the active node, and prints the lists' status. Exit code 1 with the reason if the download fails. The last good copy stays.

sh
waap file-lists refresh -name LIST [-json]