My web-app has this secret place only some people are allowed to use. When a user logs in to my secret place, I try gather as much information from them as I can, concatenate it, hash it, and send it as a cookie. Information such as : User Agent, IP Adress, Users's password, plus a few more...
When a client requests anything, I regenerate all those things, hash them, and compare them to the cookie the clients sends me.
If some guy steals the cookies, they will probably have different User-Agents from the guy who legally logged in, and the hashes wont match, not letting him in.
If some older-wiser-guy fakes all the http headers, i'll see the IP address mismatch and the hash wont match.. not letting him in.
There is where my problem resides, what should I do if my legally logged in client loses internet connectivity and the re-establishes it with another IP Adress as his/her ISP leases dynamic IP's. My current algorithm will say "Aha ! This is an attacker ! Close this session !".
This secret place is better if not disrupted for valid users, and since, for some reason internet connectivity has been intermittent the last couple of weeks, my users find uncomfortable the fact that the application requires them to re-login every time their IP changes.
Should I discard the IP validation ?