Running Identity Server 4 behind the proxy #682
-
I was wondering if anyone has ever tried running Identity Server 4 behind the proxy (as a separate service, so not adding it inside the proxy itself) and managed to get it to work, I certainly didn't ;) I use docker and secure my proxy with a "AddOpenIdConnect", but I can only getting it to work to bypass the proxy and connect to the Identity Server externally (by exposing a different port in my docker configuration). I rather don't expose this directly, but I haven't found a way to do so... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What kind of errors are you getting? I'd expect the standard ASP.NET Proxy guidance to apply. |
Beta Was this translation helpful? Give feedback.
-
I tried some more things this morning, but still got issues. Problem seems to be that the proxy itself is making some calls to the Identity Server, but also redirect me to the login page (which is correct). The thing that seems to be working is when I set the OpenId Authority to my internal docker container name (options.Authority = "http://backend-identityservice";), then I at least get redirected, but only to the name of the docker container, which gives a 404 since that container is not exposed (it is behind the proxy). I tried changing the issuer urls in IS4, but this gives me even stranger errors, both domains are now in there (browsing to the second one works):
Any clues? |
Beta Was this translation helpful? Give feedback.
What kind of errors are you getting?
I'd expect the standard ASP.NET Proxy guidance to apply.
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0