Skip to content

Session protection ​

These commands configure session protection: how sessions are bound to the client that opened them, what happens on a mismatch, and the keys that seal the bindings.

waap sessions get ​

Prints the session protection settings.

sh
waap sessions get -app NAME [-json]

waap sessions set ​

Changes the session protection settings as a new version. KEY= goes back to the default. The first set turns session protection on. Sessions are bound once cookies names them.

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

Keys:

  • enabled, mode
  • cookies: session cookie names, comma-separated, with a * suffix for a prefix. At most 8.
  • bind.network
  • bind.ipv4_prefix (8 to 32)
  • bind.ipv6_prefix (16 to 128)
  • bind.tls_fingerprint
  • bind.browser
  • on_mismatch: log, end or block
  • unbound: bind or log
  • grace_until: an RFC 3339 time, or a duration from now such as 72h. It is set 7 days ahead when cookies is first set without it. grace_until= removes it: always bind.
  • attribution: off, hashed or full
  • keys.rotation: 1h to 8760h
  • keys.keep: 1 to 12

waap sessions mismatches ​

Lists sessions whose binding did not match, from the events of the window (at most 90d).

sh
waap sessions mismatches -app NAME [-window 24h] [-json]

It shows:

  • the number of sessions
  • the count by factor that differed: network, tls, browser, session or binding
  • the newest events: time, rule, session (a short hash, never the value), cookies, factors, client, user, action and event ID

waap sessions keys list ​

Lists the session keys: ID, created, by, and which key seals new bindings. The keys themselves are never shown.

sh
waap sessions keys list -app NAME [-json]

waap sessions keys rotate ​

Makes a new session key now, on the active node. Keys beyond keys.keep are deleted, and bindings sealed with them no longer open.

sh
waap sessions keys rotate -app NAME [-json]