Appearance
Cookie protection
Symptoms of cookie protection: sealed cookies, key rotation, grace periods and cookie attributes.
Users are logged out after turning on cookie protection
- Cause: after
grace_until, unsealed copies of protected cookies count as tampered and are removed (on_tamper: remove). The grace period was empty (set by hand in the past) or too short for the cookie's lifetime. Or a key was rotated more thankeys.keeptimes since the cookie was sealed (cookie.expired_key). - Check: events with rule
cookie.unprotectedorcookie.expired_keyand the cookie name;waap cookies get -app NAME(grace_until, keys); the inventory's lifetime and "outlives its keys" note. - Fix: run
waap cookies set -app NAME grace_until=168h; raisekeys.keeporkeys.rotationabove the cookie's lifetime; or seton_tamper=logwhile you investigate.
The application receives a value like w1~... or ...~w1... in a cookie
- Cause: the
cookiessection was removed while clients still hold sealed cookies. Only the section's presence makes inspection open them;enabled=falsestill opens them. Or the request did not go through inspection (fail-open after an inspection error). - Check:
waap cookies get -app NAME(is the section configured?); the event's trace has acookiesstep with "opened". - Fix: put the section back (
waap cookies set -app NAME enabled=falsekeeps opening cookies without protecting them), and remove it only after the cookies have expired.
A protected cookie is not sealed
- Cause: detect mode (the application's or the module's setting). No key yet: the trace says "no cookie key yet"; the active node creates one within about 10 seconds, and inspection loads it within 2 more. The cookie is being deleted (empty value or
Max-Age=0). Sealed, it would exceed 4,096 bytes (cookie.too_large). The name does not match (remember_*does not matchremember). Or more than 64 Set-Cookie headers in one answer. - Check: the trace's
cookiesstep on the answer;waap cookies keys list -app NAME;waap_cookie_verdicts_total{result="no_key"|"too_large"}.
A script can no longer read a cookie, or a single sign-on stopped working
- Cause:
HttpOnlywas added (names containing csrf or xsrf are left readable).Securewas added on HTTPS, so the cookie is no longer sent over plain HTTP. SameSite was added to a cookie that had none; a cross-site POST back from an identity provider needsNone. - Check: the inventory (attributes as the upstream sets them) and the trace's
set-cookie <name>: +HttpOnly ...notes. - Fix: add the cookie to
attributes.except, or have the application setSameSite=None; Secureon the single sign-on cookie (an existing value is never overridden).
Only one Set-Cookie arrives when the upstream sends several
- Cause: a data plane that ignores
append_actionin ext_proc header mutations. Envoy 1.39 reads the deprecatedappendflag, and the product's adapter sets both. This is seen only with a different or modified Envoy build. - Check: in a source checkout, the end-to-end test
TestCookieProtectionand the Envoy version check (make check-envoy).