Add support for CLI flag for mTLS client certificate key passphrase #5489
Labels
enhancement
New feature or request
Team:Elastic-Agent-Control-Plane
Label for the Agent Control Plane team
In the in progress mTLS implementation we do not expose command line options for reading a passphrase-protected certificate key from a file. We need to add support for that, matching the support for fleet-server certificate and the fleet-server client certificate for connecting to Elasticsearch.
Following the current pattern, the new flag should be
--elastic-agent-cert-key-passphrase
.Required tests:
Unit tests:
--elastic-agent-cert-key-passphrase
adheres to the same requirements as--fleet-server-cert-key-passphrase
.--elastic-agent-cert-key
and--elastic-agent-cert
are provided when--elastic-agent-cert-key-passphrase
is present.*enrollCmdOption) remoteConfig()
accurately incorporates the passphrase intotlscommon.CertificateConfig
.fleetclient.NewWithConfig
generates a valid client capable of establishing an mTLS connection to a mock server.policy with SSL config
to ensure the client certificate key passphrase from the cli is not left in the config when the policy's client client certificate key is not passphrase-protected.Integration tests: Out of scope for this ticket, as they are impacted by
--insecure
flag should not be required during enroll/install because we have anhttp
Fleet URL #4896Acceptance criteria:
The text was updated successfully, but these errors were encountered: