Skip to content

Add core_agent_ca_cert config option to pass --ca-cert to the Core Agent - #855

Open
jrothrock wants to merge 1 commit into
masterfrom
add-ca-cert-config
Open

jrothrock wants to merge 1 commit into
masterfrom
add-ca-cert-config

Conversation

@jrothrock

Copy link
Copy Markdown
Contributor

Add core_agent_ca_cert config option to pass --ca-cert to the Core Agent

Adds a core_agent_ca_cert configuration option that is passed to the Core Agent
as --ca-cert <path> when it is launched as a subprocess. This lets the Core
Agent 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-cert support (scoutapp/core-agent#167).

Wiring

Mirrors the existing --log-file / --config-file / --socket argv handling in
CoreAgentManager:

  • src/scout_apm/core/config.py — register core_agent_ca_cert (default None).
  • src/scout_apm/core/agent/manager.py — new ca_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

  • Unit tests: test_ca_cert (flag emitted when set) and test_ca_cert_not_set
    (no flag when unset) in tests/unit/core/agent/test_manager.py.
  • Verified end-to-end in a container: the agent launches
    core-agent start … --ca-cert /path/to/ca.pem, and core-agent reports
    200 OK to checkin.scoutapp.com over TLS that requires the extra CA.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant