Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Make it easier to disable windows auth #15

Closed
brockallen opened this issue Oct 16, 2015 · 5 comments
Closed

Make it easier to disable windows auth #15

brockallen opened this issue Oct 16, 2015 · 5 comments
Assignees
Milestone

Comments

@brockallen
Copy link

The reverse proxy feature is quite useful on its own, and the windows authentication feature is windows specific. Also, I might want the reverse proxy from IIS, but not want windows authentication to be passed along.

Consider this into 2 different middlewares. Perhaps: UseWindowsAuthentication and UseReverseProxy.

I guess the UseIISPlatformHandler could stay and just encapsulate the two?

@brockallen
Copy link
Author

Looks like some of the forwarded headers code is already here:

https://github.com/aspnet/BasicMiddleware/tree/dev/src/Microsoft.AspNet.HttpOverrides

@Tratcher
Copy link
Member

UseOverrideHeaders is already the reverse proxy middleware you're asking for. This middleware only handles forwarders supported by httpplatformhandler.

The Windows auth components can be disabled in the options. Note that forwarding windows auth is really a httpplatformhandler option in web.config. If that's enabled then you need to consume it to avoid leaking handles.

@brockallen
Copy link
Author

The authentication handler is being registered and run regardless of the flag (In Invoke).

Also I can send an invalid handle value in the headers it will trigger the creation of a WindowsIdentity and presumably throw (this is in the UpdateUser method).

@Tratcher
Copy link
Member

Fair, the windows auth stuff could be further disabled. How about Options.EnableWindowsAuthentication = false?

@brockallen
Copy link
Author

Yea, the more I was thinking about it, I guess it doesn't make sense to split this up since the other middleware give reverse proxy support. I guess the reason I suggested it in the first place is because this MW doesn't use the other.

As for the windows auth -- yes, something to really disable it so none of that code runs would be appreciated. Thx.

@Tratcher Tratcher changed the title Consider splitting this into 2 different middlewares Make it easier to disable windows auth Oct 29, 2015
@muratg muratg added this to the 1.0.0-rc2 milestone Nov 23, 2015
@pakrym pakrym closed this as completed Nov 24, 2015
jkotalik pushed a commit that referenced this issue Dec 8, 2017
Jhkim/add installancm ps1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants