Closed rainbowrain0912 closed 4 years ago
I think it may have something to do with the SSL certificate being in the load balancer and not in the server? Do I need any special set up to get this to work?
@rainbowrain0912 : Hello, I haven't been able to reproduce your 'Connection timed out' error myself, but since it's a timeout issue it's likely the connection is being blocked at some point in your network. You say that it was working in your local environment but not in the production environment, so my best guess would be an issue with what is being allowed through the load balancer or any firewall specific to the production environment.
I don't believe MSAL uses anything other than the typical HTTP ports (80/443), so depending on your production server are you able to test if any outbound connections to those ports are possible? I.e., do you have any other application that also makes HTTP calls, or are able to use some tool ping some server (such as login.microsoftonline.com)?
I will reach out to network team to check and update.
@Avery-Dunn: Network confirmed that firewall and SSL handshake is fine. It is going through. Port 80/443 are working fine too. How do I configure it in application.properties if the SSL cert is on the load balancer? I think this is the key.
@rainbowrain0912 : I'm not sure if there is a way to get a cert on another server, at least not through just the properties file. However, MSAL4J has an HTTP client class used for making connections, and you could implement a custom version of this class which has some way of retrieving the cert from the load balancer. If you aren't able to place the cert on the server that your application is running on, that might be the best way to go.
However, if you're still having issues even after your application gets access to the cert, then I'm not sure what the issue could be other than networking. Maybe connections first have to go through a proxy, or maybe there is some setting on the load balancer that restricts the use of self-signed certificates.
Closing due to lack of activity for a while. If you're still having issues, feel free to leave a comment or re-open this thread.
We resolved it by configuring a proxy.
Thank you for your help.
I'm getting this error after deploying to a production environment. It was working on localhost. I already updated the application.properties to reflect the production redirectURIs set in Azure. Please advise.