5 ms·
The proper way to handle the problem is to tie session IDs to more than just a cookie or other fixed value; so that if they get exfiltrated they cannot be used
by bombcar 3y ago
The proper way to handle the problem is to tie session IDs to more than just a cookie or other fixed value; so that if they get exfiltrated they cannot be used without reauthenticating.
For example, the Session ID becomes "IP address + session token + browser ID" or something, then if I get your token, and even if I can mimic your browser fingerprint, I'd still have to be coming from your IP.
- 8organicbits 3y agoCareful about doing this. Laptop and phones change networks. If my wifi is weak you'll see my phone switch to data intermittently. Forcing me to re-auth every switch would be painful. Some VPN providers also change IP addresses regularly (I've seen <1 minute between switches).
- bombcar 3y agoYou can adjust it to accommodate this, by allowing more than one single combo to be "legit" but it does add extra friction. However, when combined with other things it can at least let "my browser, at my home on my fixed IP" not have to login every ten minutes. Other systems handle this by only doing the "session detailed check" when you perform privileged activities.
- grishka 3y agoAlso people in countries where the government censors the internet often use VPNs to bypass that censorship, so their IP address might change many times a day, including jumping to a different country. IP addresses should really not be used for anything beyond packet routing.
- eli 3y agoThis is going to fail and break sessions for users way way more often than it's going to stop a bad guy