Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome80调整SameSite策略对IdentityServer4的影响 #34

Open
rujianwang opened this issue Dec 14, 2020 · 1 comment
Open

Chrome80调整SameSite策略对IdentityServer4的影响 #34

rujianwang opened this issue Dec 14, 2020 · 1 comment

Comments

@rujianwang
Copy link

想问下这个问题有验证吗?

@linianhui
Copy link
Owner

还没验证,理论上是有影响的。影响主要分为两部分:

1. 默认值从None改为Lax造成的影响

1.1 form_post方式提交idtoken给RP时,浏览器无法发送认证开始时RP记录下来的cookie,比如nonce。
1.2 前端使用iframe做checksession,无法发送OP自己维持登录所需的cookie,导致check失败。
1.3 front channel logout时使用iframe来调用其他的RP退出时无法发送RP自身所需的cookie。

这三个都是OIDC协议中规定使用的form_post和iframe。其中1.1影响最大,这个是在认证阶段用form_post给RP返回信息时,理论上可以通过换成querystring的方式为绕过去。1.2是当你使用session management时。1.3的影响最小,发生在front channel logout阶段。

最简单的解决办法那就是设置成None,同时启用HTTPS。但是也会但来下面一个问题。

2. 旧的一些浏览器不支持None,当成Strict来处理造成的影响。

这个影响就和我们的应用无关了,但是这个影响却是最恶心人的,没太好的处理办法,只能探测user agent来动态调整set-cookie时要不要设置Samesite=None。

以上纯粹是理论上的影响,我这边也没实际去验证。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants