Skip to content

Commit

Permalink
[Synthetics] Add warning if TLS config not set for Synthetics (elasti…
Browse files Browse the repository at this point in the history
…c#195395)

## Summary

Recently while debugging a production issue where the Synthetics plugin
was receiving 401 errors while trying to reach the Synthetics Service
health endpoint, we isolated that there was an issue with the mTLS
handshake between Kibana and the service.

Unfortunately, we were unsure if there was some missing custom config
(especially relevant in Serverless Kibana), or if the certificate values
were not present in the first place.

Adding this warning will help us make this determination better in the
future when reviewing Kibana logs, as we will be assured if the config
is not defined via this warning.
  • Loading branch information
justinkambic authored Oct 9, 2024
1 parent 3f75a1d commit 8e986a6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export class ServiceAPIClient {
cert: tlsConfig.certificate,
key: tlsConfig.key,
});
} else if (!this.server.isDev) {
this.logger.warn(
'TLS certificate and key are not provided. Falling back to default HTTPS agent.'
);
}

return baseHttpsAgent;
Expand Down

0 comments on commit 8e986a6

Please sign in to comment.