Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
956 stars 602 forks source link

ACS Return URL and nginix load balancer #1432

Closed mattdone01 closed 7 months ago

mattdone01 commented 8 months ago

I am having an issue with the Reply URL. I have the Reply URL set as HTTPS for example https://mycluster.com/my-app/Saml2/Acs. My app is running in Kubernetes with a Nginix load balancer doing most of the initial work (listens to https, has certificates, rotates them requests them etc.). This saves me having to maintain my own certs etc. The error I get it The reply URL 'http://mycluster.com/my-app/Saml2/Acs' specified in the request does not match the reply URLs configured for the application (Which has an https and was originally how I accessed the site.)

Can I force the https in one of the configs, instead of it been derived?

Thanks I am using Blazor with the following. It all works fine locally expect for this one issue.

image

AndersAbel commented 8 months ago

It's perfectly fine to handle the TLS termination at the Nginx. But you need forwarded headers setup so that the Asp.Net Core application sees the correct scheme/host in HttpContext.Request.