Session management gestisce il mantenimento degli utenti collegati tra le richieste — e farlo in modo sicuro è importante, poiché le vulnerabilità delle sessioni (hijacking, fixation) consentono agli attaccanti di impersonare gli utenti. Le sessioni sicure coinvolgono una corretta gestione dei token, la sicurezza dei cookie e la gestione del ciclo di vita.
Come funzionano le sessioni
After login, the server keeps a SESSION identifying the user across requests:
→ a SESSION ID (or token) is stored client-side (usually a cookie) and sent each request
→ the server uses it to know who the user is (without re-authenticating each time)
→ the session ID/token is effectively a key to the user's account → must be PROTECTED.
