-
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] Add options to bootstrap Fleet Server with TLS #24142
Conversation
Pinging @elastic/agent (Team:Agent) |
Pinging @elastic/ingest-management (Team:Ingest Management) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
/test |
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.
change looks good overall, we're starting to have a lot of flags
tested for regression on mac/linux seems ok
return errors.New("certificate private key is required when certificate provided") | ||
} | ||
if c.options.FleetServerCertKey != "" && c.options.FleetServerCert == "" { | ||
return errors.New("certificate is required when certificate private key is provided") |
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.
can we add TypeSecurity or TypeConfig here
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.
these are printed to stdout and not logged, so I think its best to just make them simple messages so its clear when using the CLI
host = "localhost" | ||
} | ||
port := c.options.FleetServerPort | ||
if port == 0 { |
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.
can this be negative?
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.
no its an uint16
What does this PR do?
Adds command line arguments to
enroll
andinstall
so Fleet Server can be bootstrapped with TLS enabled. By default if no options are provided a self-signed certificate is generated and the Elastic Agent communicates to the local bootstrapped Fleet Server with a pinned CA.Why is it important?
Required so Fleet Server is bootstrapped securely in the default case and provide the ability for custom certificates to be used for bootstrapping Fleet Server in production.
Checklist
[ ] 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
.Related issues