Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAML Response XML is invalid: The SAML XSD requires the Signature element to be just after the Issuer element #2

Closed
MrChrisRodriguez opened this issue Dec 27, 2020 · 4 comments
Assignees
Milestone

Comments

@MrChrisRodriguez
Copy link

SAML response XML is invalid: The SAML XSD requires the Signature element to be just after the Issuer element

This is a duplicate of fusionauth-issues #1047. It seemed like it might be more appropriate here.

Description

The SAML response XML being generated by FusionAuth is invalid. The XSD requires that the Signature element appear immediately after the Issuer element. FusionAuth is not fulfilling this requirement, so some SPs aren't even processing the Response because it fails validation (Twilio, for example). Auth0 had this same issue back in 2017, as well.

Affects versions

v1.22.2

Steps to reproduce

Steps to reproduce the behavior:

  1. Set up a SAML Application
  2. Turn on debugging
  3. Try to authorize
  4. Copy the Response XML from the log
  5. Paste into an XML validator and see it fails

Expected behavior

The Signature element should appear immediately following the issuer element.

Screenshots

Platform

(Please complete the following information)

  • Device: MacBook Pro, but the instance is running on Fargate.
  • OS: Mac
  • Browser + version Chrome
  • Database: MySQL

Additional context

N/A

@MrChrisRodriguez
Copy link
Author

@robotdan
Copy link
Member

Thanks for the report @MrChrisRodriguez we will take a look shortly.

robotdan added a commit that referenced this issue Jan 5, 2021
@robotdan
Copy link
Member

robotdan commented Jan 5, 2021

I'll have to dig into this a big further, it seems to be in the correct location so far, I added some additional assertions for the location of the signature element.
c042748

robotdan added a commit that referenced this issue Jan 5, 2021
@robotdan
Copy link
Member

robotdan commented Jan 5, 2021

Think I've got it - when configured to sign the assertion, it was in the correct location, but when configured to sign the response or for an un-successful response - the signature was in the incorrect location.

c1b5650

I produced XML responses for both scenarios and they both passed validation of the SAML Response schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants