mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit 025f6f3ccd
)
Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>
This commit is contained in:
parent
3f29c77a9f
commit
a39486710b
5 changed files with 10 additions and 10 deletions
|
@ -153,7 +153,7 @@ export const policyFactoryWithoutPaidFeatures = (
|
|||
): PolicyConfig => {
|
||||
const rollbackConfig = {
|
||||
rollback: {
|
||||
remediation: {
|
||||
self_healing: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -923,7 +923,7 @@ export interface PolicyConfig {
|
|||
alerts?: {
|
||||
[key: string]: unknown;
|
||||
rollback: {
|
||||
remediation: {
|
||||
self_healing: {
|
||||
enabled: boolean;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue