我开发网络应用程序已经有一段时间了。在制作网站时,“记住我”功能是要实现的最琐碎(读作客户必备)功能之一。直到今天,我只是使用 ASP.NET 身份验证系统提供的默认实现——我必须说,它非常安全(只要不摆弄提供的默认实现)。但是今天,我只是好奇这个功能的实现细节。我做了一些研究,并浏览了一些相关文章:
Troy 的文章基本上得出的结论是,如果可能的话,最好不要实现这个功能,因为无论如何,尽管你尽了最大的努力,但你总是不得不归结为与安全相关的妥协. 同样,Barry 的文章,基于 Miller,Charles 的设计,他有一些非常好的战略步骤来最小化攻击面并使攻击向量复杂化。
所以,归根结底,在阅读了这些文章之后,我脑海中浮现的一件事是, why are the cookies not signed by the browsers ? Wouldn't it be best if each browser-client (mobile/desktop/whatever), had their own unique GUID kind of thing, which was not to be modified(under any circumstances), and then they can send their GUID to the servers, and the server could then use as the key-value to decrypt/verify any client-side information(cookies/querystrings) ?
Wouldn't this solve the issue of session-hijacking/cookie-hijacking completely, as a cookie from one browser would then be totally useless for another browser ?
抱歉,如果这听起来很幼稚,但我非常感谢您对此提出建议和反馈。谢谢。