Skip to content

Endpoint insights Since v0.2 ​

The discovery and traffic modules learn from real requests. Four views turn that into decisions: which endpoints are exposed without credentials, how much traffic one client normally sends to an endpoint, whether the scripts on your pages change, and what rate limit would have affected almost no legitimate client.

Before you begin ​

  • Role: viewer reads. operator changes settings and approves suggestions.
  • The posture and volume views need API protection on for the application. For details, see Endpoint inventory.

Review authentication posture ​

The discovery module counts, per endpoint template, calls with and without credentials (an Authorization header, an API key, or an identity from a session, JWT or consumer), and answers that held sensitive data (found by the data leak module). Labels are computed when read.

text
1. Open Applications > All applications, and select the application.
2. Open Request checks > API protection and read the inventory with its Auth and Risk columns.
3. Open an endpoint to see its Authentication card.
sh
waap api posture -app shop -window 90d -label unauthenticated
waap api set -app shop posture.min_calls=100 posture.unauthenticated_share=90
yaml
# applications[].policy.api.posture
posture:
  min_calls: 100
  unauthenticated_share: 90
LabelMeaning
unauthenticatedAt least posture.unauthenticated_share of calls carry no credential.
mixed_authBoth kinds are at least posture.mixed_share of calls. A check may be missing on some path.
sensitive_dataAt least posture.sensitive_share of answers held sensitive data.
sensitive_unauthenticatedBoth of the above for unauthenticated calls.
staleNot called for posture.stale_days, or described and never called.
shadowSeen in traffic but not in the specification.

The labels unauthenticated and mixed_auth need posture.min_calls calls first. Risk is high for sensitive_unauthenticated, or mixed_auth with sensitive_data. It is medium for any one of unauthenticated, mixed_auth or sensitive_data. Otherwise it is low.

An endpoint that is public by design (login, health check) gets an endpoint note marked public. In the console, open the endpoint's detail and set Public by design. From the CLI, use waap api list set -app shop -list endpoint_notes -f notes.yaml. A public note removes unauthenticated, but not sensitive_unauthenticated.

SettingWhat it doesDefaultAllowed valuesApplies in
Calls before judging (posture.min_calls)Calls an endpoint needs before the ratio labels apply.50integer, at least 1API protection on
Unauthenticated share (posture.unauthenticated_share)Percent of calls without credentials for unauthenticated.951 to 100API protection on
Mixed authentication share (posture.mixed_share)Minimum percent of each kind for mixed_auth.51 to 50API protection on
Sensitive answers share (posture.sensitive_share)Percent of answers with sensitive data for sensitive_data.11 to 100API protection on
Stale after (posture.stale_days)Days without a call before stale.301 to 365API protection on

Learn per-endpoint request volume ​

For each endpoint, the discovery module counts each client's requests per window (default 5 minutes; counts only, never request values) and reports the distribution. After the learning period (default 7 days) and at least volume_baseline.min_samples client-windows (default 1,000), the limit is max(p99 * factor, floor), with factor 3 and floor 20 requests per window. Learned limits are suggestions until you approve them.

Once in the policy, the rate-limit module enforces a learned limit. With volume_baseline.action log (the default) it records an event with reason ratelimit.learned naming the endpoint, client, count and baseline, at most one per client and endpoint per minute. With block it answers 429, but only when the rate-limit module blocks. An application in detect still only logs.

text
1. Open the application's API protection page and select Learned volume.
2. Review each endpoint's p50, p99, samples, suggested limit and active limit.
3. Approve some endpoints or all, Reject, or Reset.
sh
waap api volume list -app shop -status suggested
waap api volume approve -app shop -endpoint "GET /search" -m "learned limits"
waap api volume reject -app shop -endpoint "GET /health"
waap api volume reset -app shop -all -observations
waap api set -app shop volume_baseline.auto_apply=true
yaml
# applications[].policy.api.volume_baseline
volume_baseline:
  action: log
  auto_apply: false
  • Status (-status learning|suggested|changed|active|rejected): changed means the learned limit is 25 percent or more away from the one in the policy.
  • Approve puts the limits into api.volume_baselines as a new version. Reject stops the endpoint from being proposed again (stored in the policy). Reset removes learned entries and keeps hand-written ones. -observations also forgets the counted volume and starts learning again. All three need API protection on.
  • Apply learned limits (volume_baseline.auto_apply, default off) approves new and changed limits once an hour as author system, never touching rejected or hand-written entries.

Limits learned with another window length are relearned, so change the window rarely.

The script watch checks that the scripts on your pages do not change unexpectedly. The cookie inventory shows missing flags.

text
1. Open Applications > All applications, and select the application.
2. Open Response checks > Response headers, tab Scripts.
3. Turn on the watch, enter the page paths and the interval, then Preview changes and Apply.
sh
waap scripts settings set -app shop watch.enabled=true watch.pages=/checkout,/login watch.interval=1h
waap scripts check -app shop
waap scripts list -app shop
waap scripts history -app shop -url https://shop.example/app.js
waap scripts confirm -app shop -hash sha256:HEX
yaml
# applications[].policy.scripts
watch:
  enabled: true
  pages: [/checkout, /login]
  interval: 1h
  • Up to 20 page paths on the application's own host are fetched from its server pool every interval (default 1 hour). The first check records the scripts without alerts.
  • Each check parses the page for external and inline scripts and downloads each external script (up to 2 MiB and 10 s each, at most 3 redirects, 100 scripts per page, 500 per application) to store its SHA-256. Scripts on other hosts go through the outbound guard, so private, loopback and metadata addresses are refused, also after a redirect or a changed DNS answer. A page is never followed through a redirect; it is reported. Inline scripts are named by page and position (/checkout#inline-2).
  • Alerts are events (module scripts): script.new and script.changed, with the URL, old and new hash and size. They go to the SIEM like other events. A changed cache-busting query string with an identical body does not alert.
  • Known good: after you verify new content, waap scripts confirm adds its hash to scripts.known_good (per application, wherever the content is loaded) and it stops alerting.
  • The list also shows origins that browsers reported under a report-only CSP (script-src). They are shown, not downloaded.

The cookie inventory of cookie protection adds First seen and Flags: missing Secure on HTTPS, missing HttpOnly on a session-like cookie (the name contains sess, sid, auth, token, jwt, login or remember), SameSite=None without Secure, a lifetime over 400 days, and a size over 4 KiB. A cookie name that the upstream starts setting after the first 7 days raises a cookie.new event. Rows from before the upgrade count as first seen at the upgrade, so the 7 days start then. For details, see Cookies.

Accept suggested rate limits ​

The suggestions are described with the other rate-limit procedures in Rate limits.

run (or the daily job) reads the traffic log for the window (default 24 hours; 1 minute to 7 days) for the application's twenty busiest endpoints and its watched login endpoints. It counts requests per client per minute (verified bots excluded) and proposes the smallest round number (1, 2 or 5 times a power of ten) above 1.5 times the 99.9th percentile, if that would have limited at most 0.1 percent of clients and none that held a valid challenge token. A path needs at least 5 clients and 50 client-minutes of data, otherwise it is listed as skipped.

Accept adds the rule as a new version with action log, by client, per 1 minute. An endpoint template becomes a prefix such as /users/*. Change the action to block after you have watched Events. Reject hides the suggestion.

Limits ​

LimitValue
Script watch pages20 per application
Script download2 MiB and 10 s each, 3 redirects
Scripts100 per page, 500 per application
Suggestion window1 minute to 7 days
Busiest endpoints analysed for suggestions20

Troubleshooting ​

No endpoint is labelled unauthenticated ​

  • Cause: the endpoint has fewer than posture.min_calls calls in the window.
  • Fix: widen -window or lower posture.min_calls.

No volume limits are suggested ​

  • Cause: the learning period has not ended or there are fewer than min_samples client-windows.
  • Check: waap api volume list -app shop -status learning.

A changed script does not alert ​

  • Cause: only the cache-busting query string changed, or the hash was confirmed as known good.
  • Check: waap scripts history -app shop -url URL.