The SAML response signature failed to verify

Hi, upgraded to the latest version from 2.6 and getting

ComponentSpace.SAML2 Verbose: 0 : 13348/24: 22/10/2017 10:13:14 AM: Exception: ComponentSpace.SAML2.Exceptions.SAMLSignatureException: The SAML response signature failed to verify.
ComponentSpace.SAML2 Verbose: 0 : 13348/24: 22/10/2017 10:13:14 AM: at ComponentSpace.SAML2.InternalSAMLServiceProvider.VerifySAMLResponseSignature(XmlElement samlResponseElement) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLServiceProvider.cs:line 347"

on the same SAML assertion that worked before OK.
Any ideas?
Thanks
Pavel

Hi Pavel
Please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

[quote]
ComponentSpace - 10/22/2017
Hi Pavel
Please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace
[/quote]

Hi,
What was the solution proposed for the issue earlier.
Im facing similar issue.
Using .NET4.0 dll as a reference .. file version 2.8.8.0.

Getting error as ComponentSpace.SAML2.Exceptions.SAMLSignatureException: 'The SAML response signature failed to verify.'


here is the full stack trace.

Server Error in '/' Application.

The SAML response signature failed to verify.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: ComponentSpace.SAML2.Exceptions.SAMLSignatureException: The SAML response signature failed to verify.
Source Error:
Line 34: // Receive and process the SAML assertion contained in the SAML response.Line 35: // The SAML response is received either as part of IdP-initiated or SP-initiated SSO.Line 36: SAMLServiceProvider.ReceiveSSO(Request, out isInResponseTo, out partnerIdP, out authnContext, out userName, out attributes, out targetUrl);Line 37: Line 38: // If no target URL is provided, provide a default.

Source File: D:\SAMLV20\Examples\SSO\HighLevelAPI\MVC\MvcExampleServiceProvider\Controllers\SAMLController.cs Line: 36
Stack Trace:
[SAMLSignatureException: The SAML response signature failed to verify.] ComponentSpace.SAML2.InternalSAMLServiceProvider.VerifySAMLResponseSignature(XmlElement samlResponseElement) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLServiceProvider.cs:358 ComponentSpace.SAML2.InternalSAMLServiceProvider.ProcessSAMLResponse(XmlElement samlResponseElement, Boolean& isInResponseTo, String& authnContext, String& userName, SAMLAttribute[]& attributes) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLServiceProvider.cs:771 ComponentSpace.SAML2.InternalSAMLServiceProvider.ReceiveSSO(HttpRequestBase httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& authnContext, String& userName, SAMLAttribute[]& attributes, String& relayState) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLServiceProvider.cs:1081 ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequestBase httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& authnContext, String& userName, IDictionary& attributes, String& relayState) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:276 MvcExampleServiceProvider.Controllers.SAMLController.AssertionConsumerService() in D:\SAMLV20\Examples\SSO\HighLevelAPI\MVC\MvcExampleServiceProvider\Controllers\SAMLController.cs:36 lambda_method(Closure , ControllerBase , Object[] ) +61 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary parameters) +182 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary parameters) +27 System.Web.Mvc.Async.<>c__DisplayClass42.b__41() +28 System.Web.Mvc.Async.<>c__DisplayClass8.b__7(IAsyncResult _) +10 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32 System.Web.Mvc.Async.<>c__DisplayClass39.b__33() +58 System.Web.Mvc.Async.<>c__DisplayClass4f.b__49() +228 System.Web.Mvc.Async.<>c__DisplayClass37.b__36(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +24 System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +99 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web.Mvc.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult) +14 System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +16 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36 System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +16 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +25 System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +16 System.Web.Mvc.Async.WrappedAsyncResult.End() +50 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9748665 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2633.0


The most likely cause is that the wrong certificate is being used to verify the signature.
The other possibilities are that the signed XML was modified after signing or that there’s an issue with the signer’s implementation.
Please enable SAML trace and send the generated log file as an email attachment to support@componentspace.com.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace