elastic / apm-agent-php

Apache License 2.0
254 stars 69 forks source link

Allow Custom CA Certificates #430

Open zklodnic opened 3 years ago

zklodnic commented 3 years ago

Describe the bug Users who have custom certificate authorities in the chain are not able to use TLS validation, as there is no way to add more trusted CA certificates.

The Node agent has the option serverCaCertFile, but the PHP agent does not have an equivalent option.

Disabling TLS verification is not an acceptable solution.

To Reproduce Steps to reproduce the behavior:

  1. Put the APM server behind a custom CA
  2. Try to use the PHP Elastic APM Agent
  3. Notice cert errors in the PHP logs
  4. Try to find the option for custom CA certs
  5. Fail to find such an option

Expected behavior The agent should be usable with custom CAs in the chain without circumventing security.

wouterj commented 3 years ago

I've submitted a fix for this in https://github.com/elastic/apm-agent-php/pull/423