Conversation
Passes a configured CA certificate path through to the Core Agent binary as a --ca-cert flag when launching it as a subprocess, mirroring the existing --log-file/--config-file/--socket handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
core_agent_ca_certconfig option to pass--ca-certto the Core AgentAdds a
core_agent_ca_certconfiguration option that is passed to the Core Agentas
--ca-cert <path>when it is launched as a subprocess. This lets the CoreAgent trust an additional CA certificate (e.g. a private/self-signed CA presented
by a corporate TLS-terminating proxy) when reporting over HTTPS.
Pairs with core-agent's
ca_cert/--ca-certsupport (scoutapp/core-agent#167).Wiring
Mirrors the existing
--log-file/--config-file/--socketargv handling inCoreAgentManager:src/scout_apm/core/config.py— registercore_agent_ca_cert(defaultNone).src/scout_apm/core/agent/manager.py— newca_cert()helper returns["--ca-cert", path]when configured (else[]), appended to the launch argv.Behavior
When unset, no flag is added. When set, the path is forwarded verbatim to the
Core Agent, which adds it as an extra trusted root.
Testing
test_ca_cert(flag emitted when set) andtest_ca_cert_not_set(no flag when unset) in
tests/unit/core/agent/test_manager.py.core-agent start … --ca-cert /path/to/ca.pem, and core-agent reports200 OKto checkin.scoutapp.com over TLS that requires the extra CA.