❔ ASP.NET Core authorization server in Kubernetes environment
I have an authorization server created on OpenIddict library.
After removing
I've started getting errors. For example, when I want to check "https://auth.domain.com/.well-known/openid-configuration" I'm getting this:
Just for context: I have such services as Traefik and Linkerd, so they also can be involved in causing this problem.
I know it is almost impossible to say what I did wrong based on the provided description, but I would be glad for any tips on how I can debug it and find out the reason of this problem.
9 Replies
So, it looks like even when I call endpoint with https scheme, under the hood it uses http protocol
Also, my middleware contains
I found this documentation and have tried to add the same code:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1#other-proxy-server-and-load-balancer-scenarios-1
After that the error changed and now I'm getting this:
And the 10.244.1.22 is an inner ip of the POD where authentification server is running
After adding this everything works correctly
Are you using https inside the cluster too?
its fairly common to let traefik apply https and run http once past the ingress
app.UseHttpsRedirection();
will mess with this
based on your error messages, it looks like its trying to access your .well-known/openid-configuration
but not finding either a file or an endpoint that responds to thatI'm using service mesh. So it should be mTLS for all traffic inside node
even between traefik and your asp pod?
Yes, namespace for traefic and cert-manager also includes annotations for Linkerd
Alright. Unusual, but shouldn't be a problem.
Forwarding headers is likely a good idea, assuming you've configured it in traefik too
and then finally, what seems to be the root cause here is that the request for your
.well-known/openid-configuration
resource doesnt hit anythingWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.Why it's unusual? I'm quite new to kubernetes, so probably doing something wrong
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.