Giter Club home page Giter Club logo

Comments (5)

leastprivilege avatar leastprivilege commented on September 2, 2024

ADFS uses a technique to look at the user agent string to determine if the browser can support windows authentication or not. If not - they show a login HTML page.

I guess you could use a similar approach (but this is also not perfect).

If you want to build something like that - feel free to contribute.

from windowsauthentication.

ThisNoName avatar ThisNoName commented on September 2, 2024

Thanks for the tip, quite a few good reads show up from that. I also woke up midnight think I might be able to customize the Windows Authentication source to return 418 instead 401. Somewhere in there, you must know Windows authentication doesn't work before IIS?

from windowsauthentication.

ThisNoName avatar ThisNoName commented on September 2, 2024

It does not appear possible to cut in between. There are two 401s around this call and you have to let the first one pass. By the second one, browser already prompted Id/Password.

WSFederationMessage.TryCreateFromUri(Request.RequestUri, out message)

User agent string doesn't really guarantee success, for example, you need to set intranet zone with FQDN. So sounds like this is only feasible in some very tightly controlled environment, like a remote virtual desktop session.

Most web users probably don't mind entering password once, so this is really just for Windows application open a browser session and auto login as user. In worse case scenario, I'm considering let the windows client using a local user to login and fake windows user via acrvalues. Not sure if there's any significant security risk.

from windowsauthentication.

leastprivilege avatar leastprivilege commented on September 2, 2024

I don't understand what that means

In worse case scenario, I'm considering let the windows client using a local user to login and fake windows user via acrvalues. Not sure if there's any significant security risk.

from windowsauthentication.

ThisNoName avatar ThisNoName commented on September 2, 2024

Sorry for the delay. In my settings, I don't really have a local user store. My AuthenticateLocalAsync calls PrincipalContext.ValidateCredentials to verify user's domain credential.

If an application login with a special Id/Password, and pass domain user Id in acr_values, can I simply return domain user in AuthenticateResult? That would allow the application open a browser and login as domain user, right?

At one point, I created UserStoreFactory that spin off different stores for end user and application, but then sidetracked trying to catch the 401 and redirect to login page.

from windowsauthentication.

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.