AspNetCore.Diagnostics.HealthChecks
AspNetCore.Diagnostics.HealthChecks copied to clipboard
HealthCheck docker container unable to connect to services with self-signed ssl certificates
Please, fill the following sections to help us fix the issue
What happened: When I try to connect to another docker container that is using ssl I get the following error:
GetHealthReport threw an exception when trying to get report from https://my_container:5003/health-report-ui configured with name firstTest.
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: PartialChain
...
What you expected to happen: The health check works as expected.
How to reproduce it (as minimally and precisely as possible):
- Create a project using with the health-check API with a self-signed SSL certificate
- deploy
- Try to connect to it using the docker container version of health check UI
Anything else we need to know?: I understand that som may want to check if the certificate is valid as well but a setting to turn it off would go a long way.
Environment:
- .NET Core version: 9
- Healthchecks version: 9.0.0
- Operative system: Windows 10/Rancher
- Others:
I think https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/289 approach could be used, toggled by an env variable