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

Avoid applying .toLowerCase() to the authority URL #7067

Closed
alexqbm opened this issue Apr 30, 2024 · 5 comments
Closed

Avoid applying .toLowerCase() to the authority URL #7067

alexqbm opened this issue Apr 30, 2024 · 5 comments
Assignees
Labels
feature-unconfirmed msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information. tracked-internally Bugs that are tracked by Msft internally

Comments

@alexqbm
Copy link
Contributor

alexqbm commented Apr 30, 2024

Core Library

MSAL.js (@azure/msal-browser)

Wrapper Library

Not Applicable

Public or Confidential Client?

Public

Description

My issue happens trying to use a non-Microsoft identity provider.

When using Microsoft as the identity provider, the authority URL is always using the https://login.microsoftonline.com structure, and for that, everything works fine.

However, when trying to use any non-Microsoft authority, such as, in this case, https://my-own-domain.com/realms/EXAMPLE I am unable to even start my application due to several requests that MSAL performs under the hood that are using https://my-own-domain.com/realms/example as the URL.

Notice how /EXAMPLE is /example after MSAL manipulates it. This results in any request performed using this URL to throw a 404 error, since URLs are case sensitive, and hence, the URL that MSAL is using is not the one I've specified and thus, fails.

This issue seems to happen because the canonicalizeUri(url: string): string called in the UrlString class constructor always applies a .toLowerCase() transformation to the URL, and since the class is invoked from the Authority class, any authority that has some uppercase segment will always fail.

I see that this was partially addressed in #4366, but it looks that it was abandoned. I see it has caused some problems in #3621 too.

I understand that the priorities from the MSAL team maybe don't include improving support for other identity providers, but to me this is an issue that, were it to be solved, would really expand MSAL's support for more people since this matter is not a MSAL not wanting to support other identity providers but rather MSAL doing something that, unfortunately, unintentionally limits support for other identity providers. I hope I have explained myself there correctly.

Source

External (Customer)

@alexqbm alexqbm added feature-unconfirmed question Customer is asking for a clarification, use case or information. labels Apr 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Apr 30, 2024
@github-actions github-actions bot added msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Apr 30, 2024
@sameerag
Copy link
Member

sameerag commented May 7, 2024

@alexqbm Thanks for raising this. Tracking this internally.

@sameerag sameerag self-assigned this May 7, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels May 7, 2024
@sameerag sameerag added Needs: Attention 👋 Awaiting response from the MSAL.js team tracked-internally Bugs that are tracked by Msft internally labels May 7, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Author Feedback Awaiting response from issue author label May 7, 2024
@alexqbm
Copy link
Contributor Author

alexqbm commented Jun 3, 2024

Hi! Any news on this topic, @sameerag ?

@alexqbm
Copy link
Contributor Author

alexqbm commented Jun 19, 2024

Hello again. I don't want to bother you all, guys, but I'd like to check on you regarding this issue. Mentioning @sameerag again. Thank you in advance.

@tnorling
Copy link
Collaborator

We unfortunately do not have bandwidth to prioritize issues for external IDPs right now. If you are unable to update your IDP to use case insensitive urls you may propose the changes you need through PR and we would be more than happy to consider them.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Jul 15, 2024
Copy link
Contributor

@alexqbm This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 5 days. If your issue has been resolved please let us know by closing the issue. If your issue has not been resolved please leave a comment to keep this open. It will be closed automatically in 7 days if it remains stale.

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-issue-activity Issue author has not responded in 5 days label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-unconfirmed msal-browser Related to msal-browser package Needs: Author Feedback Awaiting response from issue author no-issue-activity Issue author has not responded in 5 days public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information. tracked-internally Bugs that are tracked by Msft internally
Projects
None yet
Development

No branches or pull requests

3 participants