Skip to content

Security

4nass edited this page Aug 19, 2026 · 1 revision

Security

Read the main repository's security policy before reporting a vulnerability.

Rules that must stay true

  • IDMUX_SESSION never contains a clear IdP session ID.
  • AES-256-GCM encrypts and authenticates the complete client state.
  • Every encryption uses a fresh random nonce.
  • The encryption key is never logged or returned in a response.
  • Session cookies are HttpOnly, Secure, and SameSite=Lax or Strict.
  • IDMUX_SESSION is never forwarded to the IdP.
  • An upstream request contains zero or one IdP identity cookie.
  • authuser=new sends no IdP identity cookie upstream.
  • Logout removes only the selected session slot.
  • Invalid input returns a safe response and never causes a panic.
  • Logs never contain cookie values, keys, tokens, or IdP session IDs.

Key rotation

Use IDMUX_ENCRYPTION_KEY for the new key and IDMUX_ENCRYPTION_KEY_PREVIOUS for old keys during a planned rotation. Remove old keys only after old cookies have expired.

Do not share secrets

Never add real cookies, tokens, keys, customer data, or production logs to a wiki page, issue, pull request, or commit.

Clone this wiki locally