STS 不支持请求的身份验证方法

Ras*_*tko 3 adfs windows-authentication saml saml-2.0 adfs3.0

我们的 Java 应用程序与客户的 ADFS 3.0 服务器联合。通过 SAMLP 向 ADFS 服务器发送身份验证请求(SP 发起)后出现问题。它适用于 Intranet 用例,其中 Windows 身份验证在身份验证策略中的 ADFS 服务器上指定。SP 应用程序正在使用 ForgeRock 的 Fedlet 库,该库通过 SAML 身份验证请求强制发送 RequestedAuthnContext 属性:

samlp:RequestedAuthnContext xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                             Comparison="exact"
                             >
    <saml:AuthnContextClassRef xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
</samlp:RequestedAuthnContext>
Run Code Online (Sandbox Code Playgroud)

我们最初也遇到了 Extranet 身份验证的问题,其中在 ADFS 上选择了表单身份验证。我们通过为我们的 RP 添加 Claim 自定义规则解决了这个问题:

exists([Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"]) => issue(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod", Value = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password");
Run Code Online (Sandbox Code Playgroud)

现在我们堆满了 Intranet 用例。在 ADFS 方面,我们收到以下错误:

MSIS7102: Requested Authentication Method is not supported on the STS.
   at Microsoft.IdentityServer.Web.Authentication.GlobalAuthenticationPolicyEvaluator.EvaluatePolicy(IList`1 mappedRequestedAuthMethods, AccessLocation location, ProtocolContext context, HashSet`1 authMethodsInToken, Boolean& validAuthMethodsInToken)
   at Microsoft.IdentityServer.Web.Authentication.AuthenticationPolicyEvaluator.RetrieveFirstStageAuthenticationDomain(Boolean& validAuthMethodsInToken)
   at Microsoft.IdentityServer.Web.Authentication.AuthenticationPolicyEvaluator.EvaluatePolicy(Boolean& isLastStage, AuthenticationStage& currentStage, Boolean& strongAuthRequried)
   at Microsoft.IdentityServer.Web.PassiveProtocolListener.GetAuthMethodsFromAuthPolicyRules(PassiveProtocolHandler protocolHandler, ProtocolContext protocolContext)
   at Microsoft.IdentityServer.Web.PassiveProtocolListener.GetAuthenticationMethods(PassiveProtocolHandler protocolHandler, ProtocolContext protocolContext)
   at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)
Run Code Online (Sandbox Code Playgroud)

我可以为它添加/做点什么吗?是否可以在自定义规则中说如果它是 Intranet,AUTH 方法是 WINDOWS 或类似的东西?

And*_* K. 5

您可以随时尝试authnContextClassRef="urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified",这应该让 IdP 选择它可以使用的任何内容。作为 SP,您并不真正知道(您是否应该关心?)IdP 可以使用哪些方法...