【问题标题】:How to sign the Authentication?如何签署认证?
【发布时间】:2021-08-25 19:13:12
【问题描述】:

我对 AuthnResponseSignType 的工作方式感到困惑。使用默认值时,不会被签名。

AuthnResponseSignType = Saml2AuthnResponseSignTypes.SignResponse

对响应和断言都签名确实有效。

AuthnResponseSignType = Saml2AuthnResponseSignTypes.SignAssertionAndResponse

查看源代码,特别是https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/blob/0c0cef05050d633f000be9399dc6a5b1a009a6da/src/ITfoxtec.Identity.Saml2/Bindings/Saml2PostBinding.cs#L37,当我认为它应该是一个 == 时,它是一个 !=。

想法?我错过了什么吗?

【问题讨论】:

    标签: c# itfoxtec-identity-saml2


    【解决方案1】:

    回复是用line 53签名的。

    SignAuthnResponse 方法应该被称为更有意义的东西,它只处理断言签名。方法一直是renamed

    【讨论】:

    • 但第 53 行仅在 AuthnResponseSignType == Saml2AuthnResponseSignTypes.SignAssertion 时运行,不适用于 SignResponse
    • 如果没有,请查看! --> if (!(saml2RequestResponse is Saml2AuthnResponse && saml2RequestResponse.Config.AuthnResponseSignType == Saml2AuthnResponseSignTypes.SignAssertion))
    猜你喜欢
    • 2021-11-03
    • 2014-10-09
    • 1970-01-01
    • 2011-09-28
    • 2015-04-29
    • 1970-01-01
    • 1970-01-01
    • 2017-11-28
    • 1970-01-01
    相关资源
    最近更新 更多