Skip to content

fix(seuxdr): trust TLS CA in agent register client#5

Merged
MikeAnast merged 1 commit into
mainfrom
fix/seuxdr-agent-register-tls-ca
Jul 3, 2026
Merged

fix(seuxdr): trust TLS CA in agent register client#5
MikeAnast merged 1 commit into
mainfrom
fix/seuxdr-agent-register-tls-ca

Conversation

@eusuntcarol

Copy link
Copy Markdown
Member

The manager serves its API/TLS server cert on the mTLS registration port (:8081) so agents can verify it, but InitmTLSClient only trusted the mTLS CA (server-ca-crt.pem). Agent registration failed with 'certificate signed by unknown authority'. Also append the TLS CA (certs/server-ca.crt) to the register client's RootCAs pool.

The manager serves its API/TLS server cert on the mTLS registration port
(:8081) so agents can verify it, but InitmTLSClient only trusted the mTLS
CA (server-ca-crt.pem). Agent registration failed with 'certificate signed
by unknown authority'. Also append the TLS CA (certs/server-ca.crt) to the
register client's RootCAs pool.
Copilot AI review requested due to automatic review settings July 3, 2026 13:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes agent registration TLS verification by ensuring the agent’s mTLS registration client trusts the manager’s API/TLS CA, preventing “certificate signed by unknown authority” failures during /api/register.

Changes:

  • Appends the manager API/TLS CA (certs/server-ca.crt) into the registration client’s RootCAs pool in InitmTLSClient.
  • Adds in-code rationale explaining why both the mTLS CA and the API/TLS CA must be trusted on the registration port.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +102 to +104
if tlsCACert, tlsErr := commSvc.EmbeddedFiles.ReadFile("certs/server-ca.crt"); tlsErr == nil {
caCertPool.AppendCertsFromPEM(tlsCACert)
}
@MikeAnast MikeAnast merged commit 5ebe987 into main Jul 3, 2026
1 check passed
@MikeAnast MikeAnast deleted the fix/seuxdr-agent-register-tls-ca branch July 3, 2026 14:00
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.

3 participants