OWIN Cookie 认证安全

OWIN Cookie Authentication Security

我正在处理一个新项目,我正在权衡通过 OWIN 使用 MVC5 和 Identity。

我是 运行 脚手架项目,它提供 entity framework 用户数据库、注册/登录等。没有第三方或两个因素。

据我目前的理解,OWIN Security 是基于 cookie 的,现在,我已经涉足 Web 几年了,但我的印象是身份和声明应该存储在会话中.

我正在检查用户登录时设置的 cookie,并设置了各种声明。我其实并不知道底层框架是干什么的,苦苦寻找:

我们有很多样品供您试用。 https://github.com/AzureADSamples

回答您的一些问题:

What is actually in this cookie and how can I inspect with EditThisCookie what is set? After authentication succeeds, the users identity is stored in a cookie that contains their identity.

as its encrypted or obfuscated? By default the cookie is encrypted and signed. How is this more secure than session?

If someone, some how got this cookie, could they basically sign in as the same user? Unless Channel binding is in effect, yes.

Does this scale? as normally multiple front ends would talk to the same session server. We have found it does scale. SymmetricKey crypto is used, which is fast.

可以选择使用缓存而不将详细信息放在网上。这需要分布式缓存,而大多数开发人员似乎并不想这样做。