Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
940 stars 606 forks source link

XML is invalid - Using XML Validation tool #1420

Closed mcampbell66 closed 6 months ago

mcampbell66 commented 7 months ago

version 2.9.1 when the XML is checked by IDP they are getting an XML is invalid and users are then not able to login.

When we drop the XML into a validation tool this is the message we get: Line: 34 | Column: 0 --> Element '{urn:oasis:names:tc:SAML:2.0:metadata}RequestedAttribute': This element is not expected. Expected is ( {urn:oasis:names:tc:SAML:2.0:metadata}ServiceName ).

This is what is on line 34: <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://oursitenameandisvalid/IdSrv/Saml2/Acs" isDefault="true" index="0"/>

Please note that there is no guarantee that your question will be answered. For commercial support with guaranteed response times, please mail support@sustainsys.com.

AndersAbel commented 7 months ago

This is when the Idp reads the metadata, right?

The error message doesn't match what you've pasted. Please share the entire Metadata file. You can redact sensitive values as long as the Xml structure is intact.

mcampbell66 commented 7 months ago

Hi Support,

Will this screenshot work or do you need a working XML file? Thanks Matt @.***

From: Anders Abel @.> Date: Friday, December 1, 2023 at 12:01 AM To: Sustainsys/Saml2 @.> Cc: matt m2xi.com @.>, Author @.> Subject: Re: [Sustainsys/Saml2] XML is invalid - Using XML Validation tool (Issue #1420)

This is when the Idp reads the metadata, right?

The error message doesn't match what you've pasted. Please share the entire Metadata file. You can redact sensitive values as long as the Xml structure is intact.

— Reply to this email directly, view it on GitHubhttps://github.com/Sustainsys/Saml2/issues/1420#issuecomment-1835643022, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVR4TFWHRBJD4H55FGSN3DLYHGFDLAVCNFSM6AAAAABACDKHUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVGY2DGMBSGI. You are receiving this because you authored the thread.Message ID: @.***>

mcampbell66 commented 7 months ago

Hi Support,

I’ve included the XML attached. I had to zip in order to send. It has been redacted but using this XML Tool it does still get the same error.

https://www.samltool.com/validate_xml.phphttps://www.samltool.com/validate_xml.php%22%20%5Co%20%22https:/www.samltool.com/validate_xml.php

Thank you Matt

From: matt m2xi.com @.> Date: Friday, December 1, 2023 at 6:08 AM To: Sustainsys/Saml2 @.>, Sustainsys/Saml2 @.> Cc: Author @.> Subject: Re: [Sustainsys/Saml2] XML is invalid - Using XML Validation tool (Issue #1420) Hi Support,

Will this screenshot work or do you need a working XML file? Thanks Matt @.***

From: Anders Abel @.> Date: Friday, December 1, 2023 at 12:01 AM To: Sustainsys/Saml2 @.> Cc: matt m2xi.com @.>, Author @.> Subject: Re: [Sustainsys/Saml2] XML is invalid - Using XML Validation tool (Issue #1420)

This is when the Idp reads the metadata, right?

The error message doesn't match what you've pasted. Please share the entire Metadata file. You can redact sensitive values as long as the Xml structure is intact.

— Reply to this email directly, view it on GitHubhttps://github.com/Sustainsys/Saml2/issues/1420#issuecomment-1835643022, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVR4TFWHRBJD4H55FGSN3DLYHGFDLAVCNFSM6AAAAABACDKHUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVGY2DGMBSGI. You are receiving this because you authored the thread.Message ID: @.***>

AndersAbel commented 7 months ago

Attachments and images are lost when using e-mails to interact with GitHub. Please use the GitHub site to respond/update the thread.

The GitHub issue tracker works best for simple questions. If you need support analyzing/troubleshooting specific data, commercial support might be a better fit. Please reach out to support@sustainsys.com for more information.

mcampbell66 commented 7 months ago

Please find XML file attached for review. mysite.com.xml.zip

AndersAbel commented 7 months ago

When using AttributeConsumingService there must be at least one entry in the ServiceNames collection. Unfortunately the library does not warn if that is not configured, but instead produces incorrect metadata.