-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Elastic Agent] Require --insecure on enroll for connection to Kibana #19900
Conversation
686d98c
to
534e371
Compare
Pinging @elastic/ingest-management (Team:Ingest Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested locally.
Could we update the documentation in https://github.com/elastic/beats/blob/master/x-pack/elastic-agent/docs/elastic-agent-command-line.asciidoc for the added flags/changes?
@@ -69,6 +71,9 @@ func (e *EnrollCmdOption) kibanaConfig() (*kibana.Config, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
if cfg.Protocol == kibana.ProtocolHTTP && !e.Insecure { | |||
return nil, fmt.Errorf("connection to Kibana is insecure, strongly recommended to use a secure connection (override with --insecure)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ nice message.
…elastic#19900) * Add insecure option to enroll. * Set TLS to not verify on --insecure. * Run mage fmt * Add changelog. * Update enroll for certificate-authorities and ca-sha256. * Update changelog. * Update docstring. (cherry picked from commit 55c4534)
…ll for connection to Kibana (#19910) * [Elastic Agent] Require --insecure on enroll for connection to Kibana (#19900) * Add insecure option to enroll. * Set TLS to not verify on --insecure. * Run mage fmt * Add changelog. * Update enroll for certificate-authorities and ca-sha256. * Update changelog. * Update docstring. (cherry picked from commit 55c4534) * Fix enroll_cmd_test.go.
…elastic#19900) * Add insecure option to enroll. * Set TLS to not verify on --insecure. * Run mage fmt * Add changelog. * Update enroll for certificate-authorities and ca-sha256. * Update changelog. * Update docstring.
What does this PR do?
Adds a
--insecure
option toenroll
command to allow enrollment to Kibana with SSL that is insecure. Adds the requirement of using--insecure
when using the HTTP protocol.This also includes a rename of
--ca_sha256
to--ca-sha256
and--certificate_authorities
to--certificate-authorities
. From a command line standpoint I think its best to standardize on-
versus a mix of-
and_
.Why is it important?
To strongly require users to use secure connection to Kibana.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Related issues