Skip to content
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

[Agent] Enforce TLS connection for enrolling or checking in. #16736

Closed
ph opened this issue Mar 2, 2020 · 7 comments · Fixed by #19900
Closed

[Agent] Enforce TLS connection for enrolling or checking in. #16736

ph opened this issue Mar 2, 2020 · 7 comments · Fixed by #19900
Assignees
Labels
Ingest Management:beta1 Group issues for ingest management beta1 [zube]: In Progress

Comments

@ph
Copy link
Contributor

ph commented Mar 2, 2020

Currently, it's possible to enroll the Agent without using a TLS connection, you only need to use the "HTTP" protocol when enrolling. Since the Agent can be effectively controlled by a remote kibana instance we want to enforce the requirement of TLS and refuse to enroll if the Kibana endpoint doesn't have TLS enabled.

It should fail when using the following to enroll

agent enroll http://localhost:5901 <enroll_key>

You can disable the TLS requirement by using the -insecure, using this flag should warn the user that the connection is insecure and this flag should not be used in production.

agent enroll -insecure http://localhost:5901 <enroll_key>
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest (Project:fleet)

@michalpristas
Copy link
Contributor

are we verifying cert in any way? like we have process defined elsewhere comparing cert hash? or will we rely on standard ways

@ph
Copy link
Contributor Author

ph commented Mar 4, 2020

@michalpristas We actually rely on the standard way, the ca_sha256 pins check when provided is done as a callback after the chain was created.

What we want to do is without the -insecure flag set we refuse to connect to the remote host if TLS is not used. I think it will be used in two scenario:

  1. For us as developper, because dealing with TLS in testing is kinda a pain.
  2. Someone that wants to try Fleet/Agent but not in production.

This is why when the -insecure flag is used we want to be noisy in the terminal to inform them about the risk. I believe on the Kibana side they wanted to add a banner to warn if fleet was enabled without TLS.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:ingest-management)

@ph ph added elastic-agent Ingest Management:beta1 Group issues for ingest management beta1 and removed bug labels May 14, 2020
@ph
Copy link
Contributor Author

ph commented May 14, 2020

@blakerouse could you take a look at this to unblock our integration tests?

@ph
Copy link
Contributor Author

ph commented Jul 6, 2020

@blakerouse Could you take a look?

@blakerouse
Copy link
Contributor

@ph looking into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingest Management:beta1 Group issues for ingest management beta1 [zube]: In Progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants