SharePoint 2010错误无法验证证书的签名

时间:2013-05-14 08:35:17

标签: sharepoint x509certificate claims-based-identity siteminder

我的客户希望使用基于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 certificate)+181    Microsoft.SharePoint.SPCertificateValidator.Validate(X509Certificate2 certificate)+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令牌)+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 step,Boolean& completedSynchronously)+171

1 个答案:

答案 0 :(得分: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

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

minRSAPubKeyBitLength:Decimal 512

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

certutil -setreg chain \ minRSAPubKeyBitLength 512

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

重要提示:在客户端环境中不建议这样做,因为这可能会危及服务器环境的安全。

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