Debugging an invalid assertion received (no audience) #207
-
I'm trying to debug an old project, using SAML to authenticate against an ADFS IdP. I'm stuck at receiving a saml_response that fails when generating the assertion:
This fails with
Here's an example saml_response:
The library perl-net-saml2 version we're using is still 0.55 from 2022 (I've asked if we can update it), and perl is version 5.32.1. How can I best diagnose what's happening here? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
I don't see an Assertion node in your response. Nothing is found at the XPath level of Based on the code of 0.55, which is a little less strict than the current code, you see that we try to instantiate the object like so:
The error message means you don't have an audience; nothing is found at I've added an assertion.xml (rename it or set the file type correctly in your editor), which shows what an assertion must have. We can file a bug for not having the audience as optional; we need to investigate how/what/when, but other than that, it seems your Assertion XML isn't an Assertion. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. |
Beta Was this translation helpful? Give feedback.
-
Hi
I have seen this with ADFS. If you look in the event log for ADFS on the
server it should say what it believed was wrong with the request. It may
require the removal of the encryption certificate if you created the
service provider via the metadata import.
The other issue is:
NOTE 2: Encrypted assertions require that both the Response and Assertion
be signed. Run the following command from powershell:
Set-ADFS-RelyingPartyTrust -targetname [NAME OF THE RELYING PARTY TRUST]
-SamlResponseSignature “MessageAndAssertion”
Tim
Timothy Legge
***@***.***
***@***.***
…On Wed, Apr 10, 2024 at 1:54 PM Wesley Schwengle ***@***.***> wrote:
They are returning an error: <samlp:StatusCode
Value="urn:oasis:names:tc:SAML:2.0:status:Responder" />
Even if we have a valid assertion, the user would not be able to log in.
But this thing isn't an assertion. May I ask witch which ADFS provider you
are integrating?
—
Reply to this email directly, view it on GitHub
<#207 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3N62K62UJB3BSV5ER6MDY4VVDDAVCNFSM6AAAAABGAPFUICVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANZTHE2DG>
.
You are receiving this because you are subscribed to this thread.Message
ID: <perl-net-saml2/perl-Net-SAML2/repo-discussions/207/comments/9073943@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
You're welcome. I am pretty sure that the ADFS logs will tell us what is
wrong.
Tim
…On Wed, Apr 10, 2024, 3:45 PM Adriano Varoli Piazza < ***@***.***> wrote:
Thank you for this reply, and thanks to @waterkip
<https://github.com/waterkip> for the last, too. At this point I'm
waiting on our Ops team to reply, and will get back to you.
—
Reply to this email directly, view it on GitHub
<#207 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3N62DKNPLR3J2BVLBKDTY4WCEDAVCNFSM6AAAAABGAPFUICVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANZVGAYTM>
.
You are receiving this because you commented.Message ID:
<perl-net-saml2/perl-Net-SAML2/repo-discussions/207/comments/9075016@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Turns out the cert.pem we were using on our sp_federationmetadata.xml file was outdated, and somehow they didn't see that in their event log or error log, "everything looked fine". Updated that and the login flow worked fine. Thank you both for helping me! |
Beta Was this translation helpful? Give feedback.
-
As an FYI, we busy implementing something that deals with this kind of situation, please see #209 |
Beta Was this translation helpful? Give feedback.
Turns out the cert.pem we were using on our sp_federationmetadata.xml file was outdated, and somehow they didn't see that in their event log or error log, "everything looked fine". Updated that and the login flow worked fine.
Thank you both for helping me!