Appearance
Session protection
Symptoms of session protection: binding sessions to the client, mismatches, and attribution of events to users.
Many session.hijack events for normal users
- Cause: users change networks beyond the bound prefix (mobile carriers, VPNs, corporate proxies with several exits). A fleet of browsers behind a TLS-terminating proxy changes its TLS stack. Or user agents are rewritten by an extension or proxy.
- Check: the Mismatches view under Session protection (or
waap sessions mismatches -app NAME) shows which factor differs most. The event's message lists the factors that differed, matched and were not compared. - Fix: widen the network (
bind.ipv4_prefix=8,bind.ipv6_prefix=32), or turn the factor off (bind.network=false,bind.tls_fingerprint=false). Keepon_mismatch=loguntil the view is quiet, and add an exception (session.*) for known clients.
Users are logged out after turning on session protection
- Cause:
on_mismatch=endwith the mismatches described above. The grace time passed while users still had sessions without a binding (session.unbound, factorbinding). A client does not keep the__waap_sbcookie (some API clients, or a proxy that drops cookies). Or a session was idle longer than key rotation times keys kept. - Check: events with rule
session.*and their factors;waap sessions get -app NAME(grace_until,keys.*). - Fix: set
on_mismatch=logwhile investigating; setgrace_until=168h; add an exception for the client's paths; raisekeys.keep.
No binding cookie is set
- Cause: no session cookie is named (
cookiesis empty, or the name does not match:remember_*does not matchremember). There is no session key yet; the active node makes one within about 10 seconds, and inspection loads it within 2 more. The upstream did not set the cookie in this answer and the request had none. Orenabled=false. - Check: the trace's
sessionsstep on the answer (set-cookie __waap_sb: session ... bound);waap sessions keys list -app NAME.
The application expects a cookie named waap_...
- Cause: names starting with
waap_or__waap_are reserved for the product. They are removed from every request before it reaches the upstream; the trace showscookie: ... removed (the product's own)in thepipelinestep. - Fix: rename the application's cookie.
Events do not show the user
- Cause:
attribution=off. Or no login endpoint is set underbots.login, or its path, method orusernamefield does not match the login request (form:needs a form body,json:needs a JSON body under 64 KiB). Or the login answer counted as failed (status 400 or above, afailure_status, or a redirect tofailure_location). Or the session was bound before the login, and the application did not answer the login with a session cookie or a successful status. - Check:
waap bots get -app NAME(logins); the login request's trace (the binding note names the user).