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

Enforce Transport TLS check on all licenses. #79602

Merged
merged 9 commits into from
Oct 25, 2021

Conversation

jkakavas
Copy link
Member

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.

resolves: #75292

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.
@jkakavas jkakavas added >enhancement :Security/License License functionality for commercial features v8.0.0 labels Oct 21, 2021
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Oct 21, 2021
@elasticmachine
Copy link
Collaborator

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)
Copy link
Member Author

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 ) .

@jkakavas jkakavas requested review from ywangd and tvernum October 25, 2021 04:17
Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ywangd ywangd left a 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())) {
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we should, thanks!

@jkakavas jkakavas merged commit 81f5632 into elastic:master Oct 25, 2021
lockewritesdocs pushed a commit to lockewritesdocs/elasticsearch that referenced this pull request Oct 28, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Security/License License functionality for commercial features Team:Security Meta label for security team v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require TLS for transport layer when security is enabled for Trial licenses
5 participants