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

[Feature Request] [M] MSAL improves search of metadata in the federation metadata XML during WS-Trust flows. #2665

Closed
trwalke opened this issue May 27, 2021 · 1 comment · Fixed by #2668

Comments

@trwalke
Copy link
Member

trwalke commented May 27, 2021

Is your feature request related to a problem? Please describe.
Continuation of #2152

Describe the solution you'd like
MSAL should search for the "wsdl:definitions" node within the provided federation metadata document during WS-Trust instead of assuming it is always the top node. WHile ADFS provided by Microsoft will always follow this pattern, third party IDPs may not which can cause authentication errors.

MSAL should search for the node in the Federation metadata provided by either the endpoint or the WithFederationMetadata(string federationMetadata) api instead of assuming that the top node will always have the metadata.
This will enable third party IDPs to provide federation metadata in a slightly different format.

The location where this parsing occurs is here:

IEnumerable<XElement> policyElements = mexDocument.Elements().First().Elements(XmlNamespace.Wsp + "Policy");

here:

IEnumerable<XElement> bindingElements = mexDocument.Elements().First().Elements(XmlNamespace.Wsdl + "binding");

and here:

XElement serviceElement = mexDocument.Elements().First().Elements(XmlNamespace.Wsdl + "service").First();

Alternatives
MSAL can provide an api that enables developers to provide the parent node of the XML node that contains the required "wsdl:definitions". If the required node is the top node this api should not be used as MSAL already searches the top node by default.

@trwalke trwalke added this to Estimated/Committed in MSAL.NET (legacy) May 27, 2021
@trwalke trwalke changed the title [Feature Request] Enable developers to specify the location of the required metadata in the federation metadata XML during WS-Trust flows. [Feature Request] [M] Enable developers to specify the location of the required metadata in the federation metadata XML during WS-Trust flows. May 27, 2021
@trwalke
Copy link
Member Author

trwalke commented May 27, 2021

There is still an ongoing discussion on whether or not MSAL should provide the api for this or do it internally in Email

@bgavrilMS bgavrilMS changed the title [Feature Request] [M] Enable developers to specify the location of the required metadata in the federation metadata XML during WS-Trust flows. [Feature Request] [M] MSAL improves search of metadata in the federation metadata XML during WS-Trust flows. May 27, 2021
@trwalke trwalke moved this from Estimated/Committed to In Progress in MSAL.NET (legacy) May 27, 2021
@trwalke trwalke added the In PR label May 28, 2021
@bgavrilMS bgavrilMS moved this from In Progress to Fixed in MSAL.NET (legacy) Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2 participants