Skip to content

Commit d3fe48b

Browse files
committed
address feedback
1 parent 164af53 commit d3fe48b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,9 @@ public void accept(DiscoveryNode node, ClusterState state) {
10621062
License license = LicenseService.getLicense(state.metaData());
10631063
if (license != null &&
10641064
FIPS140LicenseBootstrapCheck.ALLOWED_LICENSE_OPERATION_MODES.contains(license.operationMode()) == false) {
1065-
throw new IllegalStateException("License operation mode [" + license.operationMode() + "] is not valid for FIPS");
1065+
throw new IllegalStateException("FIPS mode cannot be used with a [" + license.operationMode() +
1066+
"] license. It is only allowed with a Platinum or Trial license.");
1067+
10661068
}
10671069
}
10681070
}

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public void testJoinValidatorForFIPSLicense() throws Exception {
308308
} else {
309309
IllegalStateException e = expectThrows(IllegalStateException.class,
310310
() -> new Security.ValidateLicenseForFIPS(true).accept(node, state));
311-
assertThat(e.getMessage(), containsString("is not valid for FIPS"));
311+
assertThat(e.getMessage(), containsString("FIPS mode cannot be used"));
312312
}
313313
}
314314

0 commit comments

Comments
 (0)