Skip to content

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

Merged
jrothrock merged 1 commit into
masterfrom
add-ca-cert-config
Sep 18, 2026
Merged

jrothrock merged 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.

@jrothrock
jrothrock changed the base branch from master to release-3.5.4 September 17, 2026 18:55
This was referenced Sep 17, 2026
Base automatically changed from release-3.5.4 to master September 17, 2026 22:04
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.
@jrothrock jrothrock mentioned this pull request Sep 17, 2026
@jrothrock
jrothrock merged commit b674916 into master Sep 18, 2026
12 checks passed
@jrothrock
jrothrock deleted the add-ca-cert-config branch September 18, 2026 18:07
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.

2 participants