0

我的客户希望使用基于 SiteMinder 声明的 STS Web 服务代理对 SharePoint Web 应用程序进行身份验证。当 web 应用程序启动并选择身份验证提供程序时,web 应用程序将重定向到登录页面,并通过正确的凭据重定向回站点。发生的事情是 SharePoint Web 应用程序返回的正确凭据,并出现以下错误:

任何线索可能是什么原因?如果需要更多信息,我很乐意提供帮助。

NotSignatureValid:无法验证证书的签名。1048576:未知错误。

异常详情:

System.IdentityModel.Tokens.SecurityTokenValidationException:NotSignatureValid:无法验证证书的签名。1048576:未知错误。

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:

[SecurityTokenValidationException:NotSignatureValid:无法验证证书的签名。1048576:未知错误。] Microsoft.SharePoint.SPImmutableCertificateValidator.Validate(X509Certificate2 证书)+181 Microsoft.SharePoint.SPCertificateValidator.Validate(X509Certificate2 证书)+260 Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken 令牌)+520

[SecurityTokenValidationException: ID4257: X.509 证书 'E=user@domain.com, CN=certName, OU=WHQ, O=CSC, L=Chantilly, S=Virigina, C=US' 验证通过令牌处理程序失败。] Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token) +1358733 Microsoft.IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken token, Boolean ensureBearerToken, String endpointUri) +118 Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request ) +461 Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +1099702 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤, 布尔值&同步完成)+171

4

1 回答 1

1

解决时间!

特别感谢@gtrig 告诉我错误背后的真正问题。

为什么错误

该错误是由于 Microsoft 安全补丁 (KB2661254) 对证书验证添加了限制。此补丁要求证书 RSA 密钥大于或等于 1024 位。给定的 siteminder.cer 包含一个 512 位的 RSA 密钥。以下链接将详细解释该问题。

http://blogs.technet.com/b/rmilne/archive/2012/09/03/important-upcoming-certificate-changes.aspx

详细的解决方案在这里。http://support.microsoft.com/kb/2661254

但对我来说,只添加以下 regedit 键就可以了。 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\OID\EncodingType 0\CertDllCreateCertificateChainEngine\Config

minRSAPubKeyBitLength : 十进制 512

要应用此注册表修改打开命令提示符(确保用户具有管理员权限,否则启动命令提示符管理员模式)并执行

certutil -setreg 链\minRSAPubKeyBitLength 512

但是,我建议您深入阅读上述链接中的整个解决方案,以找到独特的解决方案。

重要提示:不建议在客户端环境中使用此方法,因为这可能会危及服务器环境的安全性。

推荐的解决方案是使用至少 1024 的最小密钥大小创建一个新证书(尽管建议使用 2048)

于 2013-05-16T14:00:38.120 回答