GithubHelp home page GithubHelp logo

Comments (3)

TheJayMann avatar TheJayMann commented on August 11, 2024 1

Testing this with WS-Federation shows that the issue has been resolved.

from systemweb-adapters.

mjrousos avatar mjrousos commented on August 11, 2024

Thanks for reporting this, @TheJayMann. It looks like the shared auth support isn't working quite right with WS-Fed auth. /systemweb-adapters/authenticate is the endpoint that serves authentication information from the ASP.NET app (the ASP.NET Core app will call it from its remote app auth handler) but users shouldn't be re-directed back to that URL (since, as you've discovered, it will fail with 407 for any requests not coming from the ASP.NET Core app).

For other auth scenarios (ASP.NET Identity cookie auth), there's logic in the auth handler to actually intercept redirects to /systemweb-adapters/authenticate and rewrite them. It seems that isn't working for the WS-Fed scenario, though. Probably it's because the auth process actually redirects away from the site entirely and when the STS redirects back the 'redirect back to' URL it was given is /systemweb-adapters/authenticate and the result processor that usually fixes up redirects won't apply.

I've got some ideas of how we might be able to solve this. One option would be to include the "real" re-direct URI in a query string when calling /systemweb-adapters/authenticate and then look for that when the redirect comes back. Whether that works or not would depend on whether or not query strings persist through auth and redirection. Another option would be to just allow users to configure a URL that should be used instead if an auth process tries to redirect to /systemweb-adapters/authenticate.

I'll investigate this week and report back with what I find and which options seem the most promising.

from systemweb-adapters.

mjrousos avatar mjrousos commented on August 11, 2024

It looks like OIDC cookie scenarios (like using AAD B2C from an MVC app) has a similar problem, which is nice since that's an easier scenario to repro (no need to set up an STS). It seems the common thing that doesn't work well is the flow of the ASP.NET app having to redirect to an external site for authentication and then handle a redirect when auth is complete. I'll work on getting a fix together.

from systemweb-adapters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.