Update security acknowledgement messages for basic (#41825)
When applying a license update, we provide "acknowledgement messages" that indicate which features will be affected by the change in license. This commit updates the messages that are provided when installing a basic license, so that they reflect the changes made to the security features that are included in that license type. Backport of: #41776
This commit is contained in:
parent
ff317d0d7f
commit
ee84038699
|
@ -95,13 +95,18 @@ public class XPackLicenseState {
|
||||||
switch (newMode) {
|
switch (newMode) {
|
||||||
case BASIC:
|
case BASIC:
|
||||||
switch (currentMode) {
|
switch (currentMode) {
|
||||||
case TRIAL:
|
|
||||||
case STANDARD:
|
case STANDARD:
|
||||||
|
return new String[] {
|
||||||
|
"Security will default to disabled (set " + XPackSettings.SECURITY_ENABLED.getKey() + " to enable security).",
|
||||||
|
};
|
||||||
|
case TRIAL:
|
||||||
case GOLD:
|
case GOLD:
|
||||||
case PLATINUM:
|
case PLATINUM:
|
||||||
return new String[] {
|
return new String[] {
|
||||||
"The following X-Pack security functionality will be disabled: authentication, authorization, " +
|
"Security will default to disabled (set " + XPackSettings.SECURITY_ENABLED.getKey() + " to enable security).",
|
||||||
"ip filtering, and auditing. Please restart your node after applying the license.",
|
"Authentication will be limited to the native and file realms.",
|
||||||
|
"Security tokens and API keys will not be supported.",
|
||||||
|
"IP filtering and auditing will be disabled.",
|
||||||
"Field and document level access control will be disabled.",
|
"Field and document level access control will be disabled.",
|
||||||
"Custom realms will be ignored.",
|
"Custom realms will be ignored.",
|
||||||
"A custom authorization engine will be ignored."
|
"A custom authorization engine will be ignored."
|
||||||
|
@ -125,7 +130,7 @@ public class XPackLicenseState {
|
||||||
case STANDARD:
|
case STANDARD:
|
||||||
switch (currentMode) {
|
switch (currentMode) {
|
||||||
case BASIC:
|
case BASIC:
|
||||||
// ^^ though technically it was already disabled, it's not bad to remind them
|
// ^^ though technically it doesn't change the feature set, it's not bad to remind them
|
||||||
case GOLD:
|
case GOLD:
|
||||||
case PLATINUM:
|
case PLATINUM:
|
||||||
case TRIAL:
|
case TRIAL:
|
||||||
|
|
|
@ -62,6 +62,10 @@ public class XPackLicenseStateTests extends ESTestCase {
|
||||||
return randomFrom(TRIAL, PLATINUM);
|
return randomFrom(TRIAL, PLATINUM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static OperationMode randomTrialGoldOrPlatinumMode() {
|
||||||
|
return randomFrom(TRIAL, GOLD, PLATINUM);
|
||||||
|
}
|
||||||
|
|
||||||
public static OperationMode randomTrialBasicStandardGoldOrPlatinumMode() {
|
public static OperationMode randomTrialBasicStandardGoldOrPlatinumMode() {
|
||||||
return randomFrom(TRIAL, BASIC, STANDARD, GOLD, PLATINUM);
|
return randomFrom(TRIAL, BASIC, STANDARD, GOLD, PLATINUM);
|
||||||
}
|
}
|
||||||
|
@ -263,8 +267,12 @@ public class XPackLicenseStateTests extends ESTestCase {
|
||||||
assertAckMesssages(XPackField.SECURITY, randomMode(), randomTrialOrPlatinumMode(), 0);
|
assertAckMesssages(XPackField.SECURITY, randomMode(), randomTrialOrPlatinumMode(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSecurityAckTrialStandardGoldOrPlatinumToBasic() {
|
public void testSecurityAckTrialGoldOrPlatinumToBasic() {
|
||||||
assertAckMesssages(XPackField.SECURITY, randomTrialStandardGoldOrPlatinumMode(), BASIC, 4);
|
assertAckMesssages(XPackField.SECURITY, randomTrialGoldOrPlatinumMode(), BASIC, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testSecurityAckStandardToBasic() {
|
||||||
|
assertAckMesssages(XPackField.SECURITY, STANDARD, BASIC, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSecurityAckAnyToStandard() {
|
public void testSecurityAckAnyToStandard() {
|
||||||
|
|
Loading…
Reference in New Issue