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

Question: Windows Authentication + Delegation #75

Closed
@jruckert

Description

@jruckert

Hi All,

Traditionally when we want to setup impersonation/delegation we would usually setup the apppool credentials with a SPN (associated with the http/) + turn on impersonation under the web.config file.

In the new world, we have done the same regarding the SPN and http/ (NOTE: This url is different from the Kestrel hosting.json server.url)

We have tried every permutation under the sun (apart from the right one that is!) to try to get a simple IIS Windows Auth vNext Website + HttpPlatformHandler to delegate through the windows credentials to SQL, it always uses the app pool. (We have modified the web.config file to pass through the windows auth token as per documentation under this site)

Note: When we render out on the MVC Webpage the IHttpContextAccessor -> Context -> Identity -> Username, this is showing the correct authenticated username, not the app pool.

My theory to make this work is as follows:

If someone can please verify if this is correct, I would really appreciate it.

Dnx.exe (which is the one connecting to the DB, doing the web requests etc), is fundamentally proxied through IIS (+ the HttpPlatformHandler) to localhost:5002 at the moment. The w3wp.exe process is actually redundant in the security side of things.

localhost:5002 does not have any SPN’s etc for this service account etc.

If we update the hosting.json file (“server.urls”) to be say http://secure-dotnet.mywebserver.com:5002 and set the SPN to this (e.g. http/secure-dotnet.mywebserver.com:5002)

Will we have a fighting chance?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions