-
Notifications
You must be signed in to change notification settings - Fork 24.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
Enforce Transport TLS check on all licenses. #79602
Conversation
Historically, we haven't enabled the transport TLS bootstrap check for trial licenses because: - We wanted to make the experience of trial license users as easy as possible and configuring transport TLS was considered cumbersome. - Trial licenses have a limited lifetime so that minimizes the impact of this potentially insecure configuration. With security on by default project we are: - Enabling security by default for basic and trial licenses - We offer an easy, automated way for users to configure transport TLS - Enabling by default this bootstrap check for basic licenses. It doesn't make much sense for us to enforce the bootstrap check on basic licenses but not on trial and given that the concerns that were driving the original decision are not there or have been partly alleviated, this commit changes our behavior so that we enable the TLS bootstrap check regardless of the license level.
Pinging @elastic/es-security (Team:Security) |
@@ -243,15 +243,7 @@ public void registerLicense(final PutLicenseRequest request, final ActionListene | |||
// because the defaults there mean that security can be "off", even if the setting is "on" | |||
// BUT basic licenses are explicitly excluded earlier in this method, so we don't need to worry | |||
if (XPackSettings.SECURITY_ENABLED.get(settings)) { | |||
// TODO we should really validate that all nodes have xpack installed and are consistently configured but this | |||
// should happen on a different level and not in this code | |||
if (XPackLicenseState.isTransportTlsRequired(newLicense, settings) |
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.
We don't need to check TLS transport and security when installing a new license. If transport TLS is not enabled when security is enabled, then we'd have failed to start the node in the first place ( or we will fail when this moves to production mode - but it is not an effect of the license, as the check applies to all licenses now ) .
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
...k/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/TransportTLSBootstrapCheck.java
Show resolved
Hide resolved
Co-authored-by: Tim Vernum <[email protected]>
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
// should happen on a different level and not in this code | ||
if (XPackLicenseState.isTransportTlsRequired(newLicense, settings) | ||
&& XPackSettings.TRANSPORT_SSL_ENABLED.get(settings) == false | ||
&& isProductionMode(settings, clusterService.localNode())) { |
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.
Should we also remove isProductionMode
and isBoundToLoopback
from this class as well?
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.
yes we should, thanks!
Historically, we haven't enabled the transport TLS bootstrap check for trial licenses because: - We wanted to make the experience of trial license users as easy as possible and configuring transport TLS was considered cumbersome. - Trial licenses have a limited lifetime so that minimizes the impact of this potentially insecure configuration. With security on by default project we are: - Enabling security by default for basic and trial licenses - We offer an easy, automated way for users to configure transport TLS - Enabling by default this bootstrap check for basic licenses. It doesn't make much sense for us to enforce the bootstrap check on basic licenses but not on trial and given that the concerns that were driving the original decision are not there or have been partly alleviated, this commit changes our behavior so that we enable the TLS bootstrap check regardless of the license level.
Historically, we haven't enabled the transport TLS bootstrap
check for trial licenses because:
easy as possible and configuring transport TLS was considered
cumbersome.
impact of this potentially insecure configuration.
With security on by default project we are:
transport TLS
It doesn't make much sense for us to enforce the bootstrap check
on basic licenses but not on trial and given that the concerns
that were driving the original decision are not there or have been
partly alleviated, this commit changes our behavior so that we
enable the TLS bootstrap check regardless of the license level.
resolves: #75292