Skip to content

Commit

Permalink
Update security deprecation message (#82128)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytebilly committed Jan 18, 2022
1 parent 8534ec5 commit 8ea3d15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,13 @@ static DeprecationIssue checkImplicitlyDisabledSecurityOnBasicAndTrial(
if (XPackSettings.SECURITY_ENABLED.exists(settings) == false
&& (licenseState.getOperationMode().equals(License.OperationMode.BASIC)
|| licenseState.getOperationMode().equals(License.OperationMode.TRIAL))) {
String details = "Security will no longer be disabled by default for Trial licenses in 8.0. The [xpack.security.enabled] "
+ "setting will always default to \"true\". See https://ela.st/es-deprecation-7-security-minimal-setup to secure your "
+ "cluster. To explicitly disable security, set [xpack.security.enabled] to \"false\" (not recommended).";
String details = "In Elasticsearch 8.0 the [xpack.security.enabled] setting will always default to true. "
+ "In your environment, the value is not set and you need to set it before upgrading, along with other required "
+ "security settings. See https://ela.st/es-deprecation-7-implicitly-disabled-security to secure your cluster. "
+ "To explicitly disable security, set [xpack.security.enabled] to \"false\" (not recommended).";
return new DeprecationIssue(
DeprecationIssue.Level.CRITICAL,
"Security is enabled by default for all licenses",
"Security features are enabled by default for all licenses in versions 8.0 and later",
"https://ela.st/es-deprecation-7-implicitly-disabled-security",
details,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,9 +1045,9 @@ public void testImplicitlyDisabledSecurityWarning() {
new XPackLicenseState(Settings.EMPTY, () -> 0)
);
assertThat(issue.getLevel(), equalTo(DeprecationIssue.Level.CRITICAL));
assertThat(issue.getMessage(), equalTo("Security is enabled by default for all licenses"));
assertThat(issue.getMessage(), equalTo("Security features are enabled by default for all licenses in versions 8.0 and later"));
assertNotNull(issue.getDetails());
assertThat(issue.getDetails(), containsString("Security will no longer be disabled by default"));
assertThat(issue.getDetails(), containsString("In Elasticsearch 8.0 the [xpack.security.enabled] setting will always "));
assertThat(issue.getUrl(), equalTo("https://ela.st/es-deprecation-7-implicitly-disabled-security"));
}

Expand Down

0 comments on commit 8ea3d15

Please sign in to comment.