Short session expiration does not help security

3 years ago by canpolat to c/security

When logged into a web application, the session does not remain valid forever. Typically, the session expires after a fixed time after login, or after the user has been idle for some time. How long should these times be?
steventrouble 8 points 3 years ago
path: 0 2547702, hotness: undefined, score: 8, children: 0
towerful 1 point 3 years ago

Tbh, for typical consumers I think 2-4 hours is fine.
Chances are, if the user cares, they will reuse a session in that timeframe. Otherwise, they log in again.
Any good password manager will clear the clipboard after 10s or so!

Anything that is critical should use a physical key. Is it YubiKey that do this? (I'm sure it's becoming a web standard).
If the YuniKey needs more? Add a biometrics reader on it. Or a password decrypt.
Have multiple identities or are worried about privacy? Have a key that can provide multiple identies, along with the infra to support this.

Even if we make passwords absolutely tied to a physical sack of meat.... There is still social engineering that can use the user to bypass all that!

path: 0 2550164, hotness: undefined, score: 1, children: 0
security
security

@programming.dev

login for more options
2202
173
93

A community for discussion about cybersecurity, hacking, cybersecurity news, exploits, bounties etc.

Rules :

  1. All instance-wide rules apply.
  2. Keep it totally legal.
  3. Remember the human, be civil.
  4. Be helpful, don't be rude.

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

go to feed...