skoruba / Duende.IdentityServer.Admin

The administration for the Duende IdentityServer and Asp.Net Core Identity ⚡
Apache License 2.0
556 stars 194 forks source link

Logging into admin with "admin" and out-of-box configuration causes "Invalid HTTP request for token endpoint" #76

Closed darthmolen closed 2 years ago

darthmolen commented 2 years ago

Question

When logging into admin with the admin username and password set during template setup, the sts-identity container gives an "Invalid HTTP request for token endpoint" even after authenticating the user successfully.

Relevant parts of the log file

AuthorizeResponseLog {SubjectId="cc12fe0f-653b-472f-ba58-2d37f3951452", ClientId="pakilti", RedirectUri="https://admin.skoruba.local/signin-oidc", State="CfDJ8HMsAYg5n-pNuXCcyfAcJXJzYFg5vBgpsYOOWtfRc4uNJHqnOZNhKDRfHaV_bazNRxzei7loMbZJsJVDk95NOoZ-48n5UbL_Kd1Swx8vptbEvq82WXmetN5bVXXxL2sHetOiPd4ASLbZUeo4gy7c1AFTdrb-uiqjgPR0RVu3qAXNQeUlZ9a9MLhuoPH7Lki3iY44ozKH2G84aIocuxg48XacsacxfBlv7MsjjEXFqbY1u1mA_wz5Fdz73XR7sHtrFQ4TFVmjdBbTijOI2-04-Ibb0qE8Whxywj7pr4rjwbyc9dB855l9pQVNXn7TQpKcmbztLPaOoamFcNDNPvf7Py1lB4yBV7cyJ2HXjBwaZc9je3CPGhkbBiKQzl9VJBlhIQ", Scope="openid profile email roles", Error=null, ErrorDescription=null}
[2022-05-20T00:22:43.7126418+00:00][DBUG][62][Duende.IdentityServer.Hosting.IdentityServerAuthenticationService] Augmenting SignInContext
[2022-05-20T00:22:43.7129630+00:00][INFO][62][Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler] AuthenticationScheme: "Identity.Application" signed in.
[2022-05-20T00:22:43.7132937+00:00][INFO][62][Microsoft.AspNetCore.Hosting.Diagnostics] Request finished HTTP/1.1 GET http://sts.skoruba.local/connect/authorize/callback?client_id=pakilti&redirect_uri=https%3A%2F%2Fadmin.skoruba.local%2Fsignin-oidc&response_type=code&scope=openid%20profile%20email%20roles&code_challenge=Vl2jVJh4hNTAZhsBNz5Iy9fd6jxB3IIN1ci-fNuX2ZM&code_challenge_method=S256&response_mode=form_post&nonce=637886026473912852.NDQ2YWQ4NDgtMzI0YS00MDE2LWIwYjAtNDRiZTE1MWQ1YjAzMmNkY2JjODMtMWJjOS00NDJiLTk0OWMtZjlkMTJkNmQzYzBj&state=CfDJ8HMsAYg5n-pNuXCcyfAcJXJzYFg5vBgpsYOOWtfRc4uNJHqnOZNhKDRfHaV_bazNRxzei7loMbZJsJVDk95NOoZ-48n5UbL_Kd1Swx8vptbEvq82WXmetN5bVXXxL2sHetOiPd4ASLbZUeo4gy7c1AFTdrb-uiqjgPR0RVu3qAXNQeUlZ9a9MLhuoPH7Lki3iY44ozKH2G84aIocuxg48XacsacxfBlv7MsjjEXFqbY1u1mA_wz5Fdz73XR7sHtrFQ4TFVmjdBbTijOI2-04-Ibb0qE8Whxywj7pr4rjwbyc9dB855l9pQVNXn7TQpKcmbztLPaOoamFcNDNPvf7Py1lB4yBV7cyJ2HXjBwaZc9je3CPGhkbBiKQzl9VJBlhIQ&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.10.0.0 - - - 200 - text/html;+charset=UTF-8 123.5724ms
[2022-05-20T00:22:43.9605436+00:00][INFO][62][Microsoft.AspNetCore.Hosting.Diagnostics] Request starting HTTP/1.1 GET http://sts.skoruba.local/connect/token - -
[2022-05-20T00:22:43.9612899+00:00][DBUG][62][Duende.IdentityServer.Hosting.EndpointRouter] Request path "/connect/token" matched to endpoint type "Token"
[2022-05-20T00:22:43.9788499+00:00][DBUG][62][Duende.IdentityServer.Hosting.EndpointRouter] Endpoint enabled: "Token", successfully created handler: "Duende.IdentityServer.Endpoints.TokenEndpoint"
[2022-05-20T00:22:43.9789449+00:00][INFO][62][Duende.IdentityServer.Hosting.IdentityServerMiddleware] Invoking IdentityServer endpoint: "Duende.IdentityServer.Endpoints.TokenEndpoint" for "/connect/token"
[2022-05-20T00:22:43.9789620+00:00][WARN][62][Duende.IdentityServer.Endpoints.TokenEndpoint] Invalid HTTP request for token endpoint
[2022-05-20T00:22:43.9791270+00:00][INFO][62][Microsoft.AspNetCore.Hosting.Diagnostics] Request finished HTTP/1.1 GET http://sts.skoruba.local/connect/token - - - 400 - application/json;+charset=UTF-8 18.5841ms
darthmolen commented 2 years ago

I rebooted my system, and it magically cleared up. No clue. I was in the process of implementing HttpLogging