When troubleshooting SAML 2.0 SSO use cases, it is often useful to view the SAML Response generated by the Identity Provider (IdP) and sent to the Service Provider (SP).
For Sentry administrators, this can be very important when trying to configure Forum Sentry as an IdP to generate SAML Responses that match a "known good" sample from a working solution.
The following steps describe how to view the SAML Response from your IdP in your browser using the built-in developer tools with Google Chrome and Mozilla Firefox. Other browsers also have this same capability. The same steps can be used to capture and view a SAML Request.
For both browsers, go to the page where you can reproduce the issue. Then follow the steps below.
Google Chrome
To view a SAML Response in Chrome
These steps were tested using version 7.0.x. The steps should be similar in different versions.
-
Press F12 to open the DevTools.
-
Select the Network tab, and then select Preserve log.
-
Trigger the SAML SSO flow.
-
Look for the HTTP POST to the SAML SSO Service Provider endpoint in the developer console pane. This should be the next call after you hit the IdP endpoint. Select that row, and then view the Headers tab at the bottom. Scroll until you see the Form Data section and you should see a SAMLResponse parameter, the value is base64 encoded.
Mozilla Firefox
To view a SAML response in Firefox
This procedure was tested on version 66.0.x of Mozilla Firefox. The steps should be similar in different versions.
-
Press F12 to start the developer tools.
-
Select the Network tab. Enable the Persist Logs option
- Trigger the SAML SSO flow.
-
Look for the HTTP POST to the SAML SSO Service Provider endpoint in the developer console pane. This should be the next call after you hit the IdP endpoint. Select that row, and then view the Params tab. Look for the Form Data section and you should see a SAMLResponse parameter, the value is base64 encoded.
Decoding the Base64 SAML Response
Once you find the base64 encoded SAML Response element in your browser, copy it and use your favorite base-64 decoding tool to extract the XML SAML Response. Notepad++ is one text editor that has a built-in base64 decoding option as well as tools to parse and pretty print XML data.
Remember that SAML Responses may include sensitive information, so be careful using online decoders.
Note that Sentry also has the capability to decode base-64 data via the Convert Value task.
The decoded XML SAML Response XML will be similar to the following:
<?xml version="1.0"?>
<samlp:Response Destination="https://fs-training-dev-ed.my.salesforce.com?so=00D36000000uutk" ID="id-1cea1a02949aba74403415aefcbeb74be2000660" IssueInstant="2019-04-02T00:55:42.269Z" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://www.forumsys.com/sentry</saml:Issuer>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</samlp:Status>
<saml:Assertion ID="id-eb60002bc5bfab1facbadc97b9d2e16ef8c26736" IssueInstant="2019-04-02T00:55:42.269Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<saml:Issuer>https://www.forumsys.com/sentry</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-eb60002bc5bfab1facbadc97b9d2e16ef8c26736">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>A48Pd57DdK6bR6LrH2Bn6BLMKVE=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
0tfkMJSQAeqLuVnqstye+DoVbagk9FO8kQAiG9+5E3k53ftKgIVHKmZ3kpF6Ir0LBOZ4Mzc8Toaj
zR2diqv8pawy1gXBuCb0S0FfB61jWEWSEsJ+zFrFvB3k8xTE0ILPB0MrQgVSJrkubMbnpv7/RN/Y
zItJmsm8h4Z4PvFXZF4=
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIIChjCCAe+gAwIBAgIBCDANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQGEwJVUzEYMBYGA1UEChMP
VS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb2QxEDAOBgNVBAsTB1Rlc3R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GA1UdDgQKBAirmuv5wudUjzAMBgNVHRMEBTADAQH/
MBMGA1UdIwQMMAqACKua6/nC51SPMA0GCSqGSIb3DQEBBQUAA4GBABZWD2Gsh4tP62QSG8OFWUpo
4TulIcFZLpGsaP4T/2Nt7lXUoIJMN7wWjqkmYf5/Rvo4HxNcimq3EkeYcrm1VoDueJUYGvRjcCY5
mxkghI27Yl/fLKE9/BvQOrvYzBs2EqKrrT7m4VK0dRMR7CeVpmPP08z0Tti6uK2tzBplp1pF
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">training</saml:NameID>
<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData NotOnOrAfter="2019-04-02T00:56:42.269Z" Recipient="https://fs-training-dev-ed.my.salesforce.com?so=00D36000000uutk"/>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Conditions NotBefore="2019-04-02T00:55:42.269Z" NotOnOrAfter="2019-04-02T00:56:42.269Z">
<saml:AudienceRestriction>
<saml:Audience>https://www.forumsys.com/sentry</saml:Audience>
</saml:AudienceRestriction>
</saml:Conditions>
<saml:AuthnStatement AuthnInstant="2019-04-02T00:55:42.269Z">
<saml:AuthnContext>
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</saml:AuthnContextClassRef>
</saml:AuthnContext>
</saml:AuthnStatement>
<saml:AttributeStatement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<saml:Attribute Name="sf_user" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
<saml:AttributeValue xsi:type="xsd:string">training@forumsys.com</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
</saml:Assertion>
</samlp:Response>
0 Comments