Blazor Windows Authentication on Kestrel works locally only? An anonymous request was received in between authentication handshake requests

大城市里の小女人 提交于 2020-01-03 01:59:07

问题


I created a Blazor application with Windows authentication and hosting with Kestrel/Negotiate following the steps.

Create Blazor app with Windows Authentication

Create a Blazor application using Visual Studio 2019 (16.4.0). (Windows Authentication, https)

Support Windows Authentication using Negotiate and Kerberos

Following the steps to make all work when running using Kestrel.

  1. Import NuGet package Microsoft.AspNetCore.Authentication.Negotiate
  2. Add the following code in ConfigureService() in Startup.cs.
   services.AddAuthentication(NegotiateDefaults.AuthenticationScheme).AddNegotiate();
  1. Add the following code in Configure() in Startup.cs. They are added between app.UseRouting(); and app.UseEndpoints(...;
            app.UseAuthentication();
            app.UseAuthorization();

Windows Authentication not working. Add middleware ValidateAuthentication

It still doesn't work with Windows Authentication until the answer from this question is applied.

  1. Add this in your Configure method:
app.UseMiddleware<ValidateAuthentication>();
  1. Here is the middleware itself:
internal class ValidateAuthentication : IMiddleware
{
  public async Task InvokeAsync(HttpContext context, RequestDelegate next)
  {
    if (context.User.Identity.IsAuthenticated)
        await next(context);
    else
        await context.ChallengeAsync();
  }
}
  1. And in ConfigureServices :
 services.AddSingleton<ValidateAuthentication>();

Now it works on the local PC.


And the following code is added to CreateHostBuilder() in Program.cs for remotely.

webBuilder.UseUrls(new string[] { "https://*:5001", "http://*:5000" });

Not work on another computer!

However, it pops up a window for the user name/password (it's Windows authentication and shouldn't ask for it again) and gets the following error on my company computer.

When trying at home PCs, it just shows the following message without popup window for username/password.

The output window shows

      Request starting HTTP/1.1 GET https://mymachinename:5001/
info: Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler[0]
      None
info: Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler[1]
      Incomplete Negotiate handshake, sending an additional 401 Negotiate challenge.
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 5.3618ms 401
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://MyMachineName:5001/_blazor?id=5PKkHuIU8OTq2i8tGbkP0A text/plain;charset=UTF-8 3
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint '/_blazor'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/_blazor'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 5.6983ms 200 text/plain
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://MyMachineName:5001/_blazor?id=5PKkHuIU8OTq2i8tGbkP0A text/plain;charset=UTF-8 3
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint '/_blazor'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/_blazor'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 5.331ms 200 text/plain
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://MyMachineName:5001/
fail: Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler[5]
      An exception occurred while processing the authentication request.
System.InvalidOperationException: An anonymous request was received in between authentication handshake requests.
   at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.HandleRequestAsync()
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.InvalidOperationException: An anonymous request was received in between authentication handshake requests.
   at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.Negotiate.NegotiateHandler.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 80.1697ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://MyMachineName:5001/_blazor?id=5PKkHuIU8OTq2i8tGbkP0A text/plain;charset=UTF-8 3
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint '/_blazor'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/_blazor'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 11.6024ms 200 text/plain
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/_blazor'
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://MyMachineName:5001/_blazor?id=5PKkHuIU8OTq2i8tGbkP0A text/plain;charset=UTF-8 3

I got the prompt when capturing the network traffice

Session #13: The server (us005) presented a certificate that did not validate, due to RemoteCertificateNameMismatch, RemoteCertificateChainErrors.

0 - A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

SAN: localhost
SUBJECT: CN=localhost
ISSUER: CN=localhost

This warning can be disabled by clicking Tools > Options.

It asks for username/password after I chose ignore the warning. Why it asks for username/password?

The sessions before popup the username/password:

GET https://us005:8091/ HTTP/1.1
Host: us005:8091
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Site: none
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9


HTTP/1.1 401 Unauthorized
Date: Fri, 06 Dec 2019 23:11:38 GMT
Server: Kestrel
Content-Length: 0
WWW-Authenticate: Negotiate
Strict-Transport-Security: max-age=2592000
Proxy-Support: Session-Based-Authentication



------------------------------------------------------------------
GET https://us005:8091/ HTTP/1.1
Host: us005:8091
Connection: keep-alive
Cache-Control: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R17Czx0xy9V2qFSCcgYkEm4KET9Jr9JzG+j/gmsNM7ZKBPu/hZEXeDf/Mmw7P36iWwXvm+UcRMfvnMg10Mxo1tAVgUc0JXiBCFyOfTIfkenUmFfN25TP72NgibBMnwSzI5BubaI0VMFwUwoG4UPwt3K98gLLQ6sLZ3G6mbKn9NHOjNktuK+QkK/JzK6TLopduWbhUH/oQFvNPIVyoO3zau0LNKj+RG0DXTKeMlSD7RsK8W/V1nzVL83AjxUbunzbo9PvYGBvgHlnZys+ssc7Cuv8y1Q/IEie8XLeKLob0GyyU2DH+ObzGEwg3H+cs/vto7RJYPKNmIz03BkTm4t737h2l+XN8U3zrCeVERojst8edwbLrbOR3lFC7g43gdF1TnIDGwA4xjM4G7GcTsHfpR9HqHchkmccwWQ9/quoJuzO6zYuLuWG9cIh2AgYM2w1ghEYfz9bdIc7wY9vNNFp0P9glOamEQplg5DBLd24udA111d6o/V+1ht9v4vaGmArg+gHqoinHxlo4+eugjMYHlswdBqCU+2Ssk1hRM+yyQXzN9MMP2a9LPqd6pSwp4VjbfN38r5dkR+nzgUN
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Site: none
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9


HTTP/1.1 401 Unauthorized
Date: Fri, 06 Dec 2019 23:11:38 GMT
Server: Kestrel
Content-Length: 0
WWW-Authenticate: Negotiate oYIITTCCCEmgAwoBAaELBgkqhkiC9xIBAgKigggzBIIIL2CCCCsGCSqGSIb3EgECAgMAfoIIGjCCCBagAwIBBaEDAgEepBEYDzIwMTkxMjA2MjMxMTM5WqUEAgIFSaYDAgFFqRMbEUdCTC5BRC5IRUR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shWTqSGjSbQc/AC4TYiBqn8z+X6fLDzQ5y/Q4oyilC0JKfGLqopXQJJOlE7OEA21KuzqzmJuma1E9QQ4PABndykDA7PcGgTZrbCKrOqxPeE6FH6mv54LfPlXrmrzb7BtIiLhuPaaCQME/fRwPwoWEwcwv9aiihSJ8Ot7kd2hxCTtVMi/ce8NjH4uGaRrLh+TQr+OVPWXPbie/Y8mQnK290BZ23I8S/VJhUcog8v99A9GtRS9IpXrOan/Mt9Gyqax1rJiQSmRJJkulXZ5gD/8lneMkJdz0q9/PWb6jtF10Fx00bOv72NDo9S5Q6TGZXBDca2bZFi5TeGQhL/2kg1LkHuMgCb2B5dDCxFJV+a77UFqFEtjOg5jobDDHaDA2Rfbgxh9q74Es+Ix7CG0ByZhdkvtAG5x1ri741hQMgtnD55IAM9FYQuen39ET3epXqYMy/nAZat090C/AT/swsE/B6tFv22iS4NQ0ckarQJ206ylZFcEwUOhhllXixvIdH5UG73IsCrFMUU=
Strict-Transport-Security: max-age=2592000
Proxy-Support: Session-Based-Authentication



------------------------------------------------------------------
GET https://us005:8091/ HTTP/1.1
Host: us005:8091
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Site: none
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9


HTTP/1.1 401 Unauthorized
Date: Fri, 06 Dec 2019 23:11:38 GMT
Server: Kestrel
Content-Length: 0
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
WWW-Authenticate: Negotiate
Strict-Transport-Security: max-age=2592000
Proxy-Support: Session-Based-Authentication

来源:https://stackoverflow.com/questions/59204346/blazor-windows-authentication-on-kestrel-works-locally-only-an-anonymous-reques

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!