ASP.NET 中的 ADFS 2.0 / SAML 令牌是否具有粘性?

Are ADFS 2.0 / SAML Tokens in ASP.NET sticky?

我们是 运行 带有 ADFS 2.0 的 ASP.NET 4.6 应用程序。 web.config ADFS 部分的配置是通过 FedUtil.exe.

创建的

我们现在遇到的问题是 Web 应用程序的第二个实例仍然认为用户未通过身份验证。

但是..

在我们的场景中,只有粘性会话才能在负载平衡环境中工作。我认为这是因为需要 SessionModule:

    <modules>
        <add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />
        <add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />
    </modules>

SessionModule 将 auth* 的任何数据存储到会话中,所以共享会话是不可能的,我们被迫使用粘性会话,我说得对吗?

IdentityServer3 或 IdentityServer4 会解决这个问题吗?

似乎 Microsoft.Identity 不提供没有粘性会话的 SAML 令牌:https://leastprivilege.com/2012/07/12/machinekey-based-session-protection-for-wif/