Vic*_*cky 5 redirect azure logout azure-ad-b2c
我正在使用 OWIN 和 OpenId 使用 Azure AD B2C 对我的 Web 应用程序的用户进行身份验证,Startup.Auth.cs 具有如下代码:
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
MetadataAddress = string.Format(AadInstance, Tenant, policy),
AuthenticationType = policy,
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,
RedirectUri = postLogoutRedirectUri,
Notifications = new OpenIdConnectAuthenticationNotifica....
Run Code Online (Sandbox Code Playgroud)
在注销时,它会像这样导致重定向到 postLogoutRedirectUrl
登出后重定向 URI 存在于门户的重定向 URI 中。
如果我停止浏览器并将地址栏中的 post logout uri 更改为 https%3A%2F%2Fevil.com%2F,即使此 url https://evil.com/不在允许的重定向中,重定向也会正确发生里。
为什么 AD B2C 不停止重定向?这不是对漏洞开放吗?
使用 Azure AD B2C 登录时,B2C 服务会向“redirect_uri”(应用)发送一个令牌。由于令牌需要保持安全,B2C 服务会要求您将应将令牌发送到的 URL 列入白名单。
当您退出时,B2C 服务不会将任何安全信息传输回应用程序。因此,即使用户被重定向到恶意站点,也不会丢失任何安全内容。
归档时间: |
|
查看次数: |
854 次 |
最近记录: |