Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions x-pack/elastic-agent/CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
- Verify communication to Kibana before updating Fleet client. {pull}24489[24489]
- Fix nil pointer when null is generated as list item. {issue}23734[23734]
- Add support for filestream input. {pull}24820[24820]
- Add check for URL set when cert and cert key. {pull}24904[24904]

==== New features

Expand Down
4 changes: 4 additions & 0 deletions x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ func (c *enrollCmd) prepareFleetTLS() error {
c.options.URL = fmt.Sprintf("https://%s:%d", hostname, port)
c.options.CAs = []string{string(ca.Crt())}
}
// running with custom Cert and CertKey; URL is required to be set
if c.options.URL == "" {
return errors.New("url is required when a certificate is provided")
}
return nil
}

Expand Down