Skip to content

Keep the rules current Since v0.1 ​

Learning keeps running while rules enforce, so the model follows the application. It learns clean traffic, requests whose only findings are log-only unknown endpoints, methods or parameters, and, kept apart, values that broke a rule but were only logged as unconfirmed. Nothing changes in the policy until you approve.

Before you begin ​

  • Role: operator approves, rejects and restores. viewer reads.
  • Learning on and some approved learned rules. Manual rules are never changed or proposed for removal.

What the engine proposes ​

KindWhenWhat approving does
new endpointA ready endpoint no rule covers.Adds a rule.
updateThe learned rule no longer fits: new parameter, widened profile or new content type.Replaces the rule; parameters are marked new or widened.
foldedThe model now learns /items/{var} where the policy holds literal rules such as /items/42.Approving the whole endpoint deletes the literal learned rules; one parameter keeps them.
removalA learned rule's endpoint had no learned request for 30 days.Deletes the rule.

Removals are proposed only while learning is on and after 30 days of data, and only by name: Approve all new never removes.

Out-of-rule values (drift) ​

A value that breaks an approved rule and is logged as unconfirmed goes into the parameter's drift lane, not its profile. The values join the profile, and the suggestion proposes the wider rule, only when at least learning.min_clients distinct clients sent at least a fifth of learning.min_samples values. A request a rule covers is learned under that rule's endpoint even when its path looks different now. Confirmed attacks and refused requests are never learned. With confirm_anomalies off, out-of-rule values are refused and not learned: watch the Violations tab instead.

Application change detected ​

When at least 5 endpoints without a rule were first seen in the last 7 days (and at least a tenth as many as there are learned rules), the queue shows a banner with the first 20 endpoints. Review them before approving.

Review updates and removals ​

text
1. Open Learned model > Suggestions. Use Suggestion change to filter by kind.
2. For an update, compare Current rule and Proposed rule. Expand Unchanged parameters
   for the rest. Use Approve..., Edit before approve or Reject....
3. For a folded endpoint, review the literal rules listed below the badge.
4. In Removals, review endpoint, last seen and evidence. Select Approve removal...,
   then Preview approval and Approve rules. Reject... keeps the rule;
   Restore... proposes its removal again.
5. In the Application change detected banner, select an endpoint to open it
   in the URL tree.
sh
waap learning suggestions -app shop
waap learning suggestions -id UPDATE_ID -app shop
waap learning preview -remove REMOVAL_ID -app shop
waap learning approve -dry-run -remove REMOVAL_ID -app shop
waap learning approve -m "unused rule" -remove REMOVAL_ID -app shop
waap learning model -endpoint 'GET /products/{var}' -app shop

The suggestion list shows a CHANGE column, a Removals table and an Application change line. Repeat -remove for several IDs (at most 1,000). -all alone never removes; explicit -remove IDs may be added next to it. reject and restore accept removal IDs. The parameter detail's Drift column shows out-of-rule values, estimated clients and acceptance ("not learned until ..." states the thresholds). Acceptance changes the learned profile, not the policy; approve the proposed update.

If the policy moves (409), the dialog reloads the suggestions and disables approval. Close it, review the refreshed queue and preview again. Writes are never retried automatically.

Limits ​

LimitValue
Unused rule proposal30 days without a learned request
Application change5 new endpoints in 7 days, at least a tenth of the learned rules
Endpoints listed in the banner20
Removal IDs per command1 to 1,000