I received federation metadata endpoint from customer which I used to configure WsFederationAuthentication in identityserver3.
Everything works fine from developer machine like identity server login redirecting to adfs login page, but after deploying the solution into AWS elastic bean stalk (which is in private subnet) then I receive 504 HTTP status code when I try to login through External(ADFS) login.
I simulated this scenario in postman. I receive 302 response in developer machine but the request never ends (postman result pane shows 'Loading...') in AWS ec2 instance.
I am able to browse federation metadata URL and /adfs/ls endpoint from AWS ec2 instance.
In idnetity server log, I can see below logs,
External login requested for provider: adfs
Triggering challenge for external identity provider
HTTP Response
{ "StatusCode": 401, "Headers": { "Content-Type": [ "text/html" ], "Server": [ "Microsoft-IIS/10.0" ], "Content-Length": [ "0" ] }, "Body": "" }
After this, gateway timeout happens (by AWS load balancer).
As per code in Microsoft.Owin.Security.WsFederation.WsFederationAuthenticationHandler.cs, from ApplyResponseChallengeAsync() method, redirect response should generate with location header having adfs login page URL. But, this is not happening.
I see below error in HTTPError.Log.
GET /identity/external?provider=adfs&signin=699036641a8b2b6ddccea61bc8c1f715 -- 1 Connection_Abandoned_By_ReqQueue DefaultAppPool
I do not see any event related to above HTTP error in event viewer log.
I searched for the above error but the solutions did not yield any good results for this issue.