How to impersonate the original caller without Windows authentication
Jason Taylor, Prashant Bansode, Carlos Farre, Madhu Sundararajan, Steve Gregersen
When using non-windows authentication like Certificate Authentication or username authentication, if you need to access impersonate the original caller (if it has windows account) or a service account you have following 2 options
- Using the S4U Kerberos extensions – For this you must grant your process account the "Act as part of the operating system" user right.
- Using the LogonUser windows API – this needs to have access to the user credentials (username and password) – which increases the security risk of maintaining the user credentials in WCF Service.
S4U Kerberos extensions place your process within the trusted computing base (TCB) of the Web server, which makes your Web server process very highly privileged. Where possible, you should avoid this approach because an attacker who manages to
inject code and compromise your Web application will have unrestricted capabilities on the local computer.