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

Cannot work with non-namespaced metadata xml #391

Open
wrabit opened this issue Jan 25, 2024 · 1 comment
Open

Cannot work with non-namespaced metadata xml #391

wrabit opened this issue Jan 25, 2024 · 1 comment
Labels

Comments

@wrabit
Copy link

wrabit commented Jan 25, 2024

As per

OneLogin_Saml2_IdPMetadataParser.parse() targets specifically xml that has a 'md' namespace in nodes because it has a fixed xpath selector //md:EntityDescriptor

The XML that comes back from the metadata endpoint at Azure Active Directory (now known as Entra ID) is not namespaced with 'md', for example:

<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="xxx" entityID="https://sts.windows.net/xxx/"> as noted here

So it returns nothing, preventing anything meaningful from happening.

I could handpick the values out of the xml and store them in my environment but having any changes from their side automatically propagate to our implementation is more desirable.

Is this recognised? Will a PR addressing this be considered?

@pitbulk
Copy link
Contributor

pitbulk commented Feb 8, 2024

@wrabit

The parse method is able to process Metadata XML with
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"

Check this test:
https://github.com/SAML-Toolkits/python3-saml/blob/master/tests/src/OneLogin/saml2_tests/idp_metadata_parser_test.py#L115

That uses this metadata:
https://github.com/SAML-Toolkits/python3-saml/blob/a1211a8695c855b74591a607cf589682307572a6/tests/data/metadata/idp_metadata.xml

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

No branches or pull requests

2 participants