Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions backend/seuxdr/agent/comms/tlsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ func (commSvc *CommunicationService) InitmTLSClient(servermTLSCaCrtPath, clientC
return fmt.Errorf("failed to append CA certificate to the pool")
}

// The manager serves its API/TLS server cert (signed by the TLS CA
// certs/server-ca.crt) on the mTLS registration port so agents can verify
// it. Trust that CA too, otherwise TLS verification of /api/register fails
// with "certificate signed by unknown authority".
if tlsCACert, tlsErr := commSvc.EmbeddedFiles.ReadFile("certs/server-ca.crt"); tlsErr == nil {
caCertPool.AppendCertsFromPEM(tlsCACert)
}
Comment on lines +102 to +104

// Decode the PEM file
block, _ := pem.Decode(caCert)
if block == nil || block.Type != "CERTIFICATE" {
Expand Down