rename remediate to self_healing (#137774) (#138103)

(cherry picked from commit 025f6f3ccd)

Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2022-08-04 09:22:49 -04:00 committed by GitHub
parent 3f29c77a9f
commit a39486710b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -153,7 +153,7 @@ export const policyFactoryWithoutPaidFeatures = (
): PolicyConfig => {
const rollbackConfig = {
rollback: {
remediation: {
self_healing: {
enabled: false,
},
},

View file

@ -923,7 +923,7 @@ export interface PolicyConfig {
alerts?: {
[key: string]: unknown;
rollback: {
remediation: {
self_healing: {
enabled: boolean;
};
};

View file

@ -125,14 +125,14 @@ describe('policy_config and licenses', () => {
it('allows advanced rollback option when Platinum', () => {
const policy = policyFactory();
policy.windows.advanced = { alerts: { rollback: { remediation: { enabled: true } } } }; // make policy change
policy.windows.advanced = { alerts: { rollback: { self_healing: { enabled: true } } } }; // make policy change
const valid = isEndpointPolicyValidForLicense(policy, Platinum);
expect(valid).toBeTruthy();
});
it('blocks advanced rollback option when below Platinum', () => {
const policy = policyFactory();
policy.windows.advanced = { alerts: { rollback: { remediation: { enabled: true } } } }; // make policy change
policy.windows.advanced = { alerts: { rollback: { self_healing: { enabled: true } } } }; // make policy change
let valid = isEndpointPolicyValidForLicense(policy, Gold);
expect(valid).toBeFalsy();
@ -515,7 +515,7 @@ describe('policy_config and licenses', () => {
policy.windows.advanced = {
alerts: {
rollback: {
remediation: {
self_healing: {
enabled: true,
},
},

View file

@ -234,8 +234,8 @@ function isEndpointAdvancedPolicyValidForLicense(policy: PolicyConfig, license:
// only platinum or higher may use rollback
if (
policy.windows.advanced?.alerts?.rollback.remediation.enabled !==
defaults.windows.advanced?.alerts?.rollback.remediation.enabled
policy.windows.advanced?.alerts?.rollback.self_healing.enabled !==
defaults.windows.advanced?.alerts?.rollback.self_healing.enabled
) {
return false;
}

View file

@ -938,13 +938,13 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [
),
},
{
key: 'windows.advanced.alerts.rollback.remediation.enabled',
key: 'windows.advanced.alerts.rollback.self_healing.enabled',
first_supported_version: '8.4',
documentation: i18n.translate(
'xpack.securitySolution.endpoint.policy.advanced.windows.advanced.alerts.rollback.remediation.enabled',
'xpack.securitySolution.endpoint.policy.advanced.windows.advanced.alerts.rollback.self_healing.enabled',
{
defaultMessage:
'Remediate malware artifacts when prevention alerts are triggered. Warning: data loss can occur. Default: false',
'Self-healing erases attack artifacts when prevention alerts are triggered. Warning: data loss can occur. Default: false',
}
),
license: 'platinum',