I've got a website that hosts many asp.net applications. Some of written in MVC2, some are written in MVC3, some are not written in house and binary deployed (although we can find source code) and many many more are written in ASP.Net 2.0 webforms. Across all of these sites we use a single login page from a login application. We can do this because all applications share:
- The same application pool
- The same machine key
- The same login cookie name
My problem is they also share the security problem, no cookie spoofing protection. My plan is to add some extra information (first 2 bytes of ip, user agent) to the login cookie (possibly in the useradata field) and then verify this on every request before accepting the cookie.
My question is where does asp.net check the forms authentication ticket and load the user and can I override this to check a few extra things before using the login.
It would be a plus if I didn't have to add this code to every global.cs and could put it in some dll and reference that dll in the config file.