Skip to content

Commit

Permalink
[SECURITY SOLUTION] Remove unneeded options from default policy, remo…
Browse files Browse the repository at this point in the history
…ve Notify user option from UI (elastic#70546)
  • Loading branch information
kevinlog authored Jul 2, 2020
1 parent a3e9f39 commit a921bbf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,8 @@ export const factory = (): PolicyConfig => {
mode: ProtectionModes.prevent,
},
logging: {
stdout: 'debug',
file: 'info',
},
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: {
connect: true,
process: true,
},
},
},
},
mac: {
events: {
Expand All @@ -49,25 +35,11 @@ export const factory = (): PolicyConfig => {
network: true,
},
malware: {
mode: ProtectionModes.detect,
mode: ProtectionModes.prevent,
},
logging: {
stdout: 'debug',
file: 'info',
},
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: {
connect: true,
process: true,
},
},
},
},
linux: {
events: {
Expand All @@ -76,22 +48,8 @@ export const factory = (): PolicyConfig => {
network: true,
},
logging: {
stdout: 'debug',
file: 'info',
},
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: {
connect: true,
process: true,
},
},
},
},
};
};
21 changes: 0 additions & 21 deletions x-pack/plugins/security_solution/common/endpoint/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,8 @@ export interface PolicyConfig {
};
malware: MalwareFields;
logging: {
stdout: string;
file: string;
};
advanced: PolicyConfigAdvancedOptions;
};
mac: {
events: {
Expand All @@ -626,10 +624,8 @@ export interface PolicyConfig {
};
malware: MalwareFields;
logging: {
stdout: string;
file: string;
};
advanced: PolicyConfigAdvancedOptions;
};
linux: {
events: {
Expand All @@ -638,10 +634,8 @@ export interface PolicyConfig {
network: boolean;
};
logging: {
stdout: string;
file: string;
};
advanced: PolicyConfigAdvancedOptions;
};
}

Expand All @@ -663,20 +657,6 @@ export interface UIPolicyConfig {
linux: Pick<PolicyConfig['linux'], 'events'>;
}

interface PolicyConfigAdvancedOptions {
elasticsearch: {
indices: {
control: string;
event: string;
logging: string;
};
kernel: {
connect: boolean;
process: boolean;
};
};
}

/** Policy: Malware protection fields */
export interface MalwareFields {
mode: ProtectionModes;
Expand All @@ -686,7 +666,6 @@ export interface MalwareFields {
export enum ProtectionModes {
detect = 'detect',
prevent = 'prevent',
preventNotify = 'preventNotify',
off = 'off',
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,6 @@ export const MalwareProtections = React.memo(() => {
}),
protection: 'malware',
},
{
id: ProtectionModes.preventNotify,
label: i18n.translate('xpack.securitySolution.endpoint.policy.details.preventAndNotify', {
defaultMessage: 'Prevent and notify user',
}),
protection: 'malware',
},
];
}, []);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,45 +118,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
},
policy: {
linux: {
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: { connect: true, process: true },
},
},
events: { file: false, network: true, process: true },
logging: { file: 'info', stdout: 'debug' },
logging: { file: 'info' },
},
mac: {
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: { connect: true, process: true },
},
},
events: { file: false, network: true, process: true },
logging: { file: 'info', stdout: 'debug' },
malware: { mode: 'detect' },
logging: { file: 'info' },
malware: { mode: 'prevent' },
},
windows: {
advanced: {
elasticsearch: {
indices: {
control: 'control-index',
event: 'event-index',
logging: 'logging-index',
},
kernel: { connect: true, process: true },
},
},
events: {
dll_and_driver_load: true,
dns: true,
Expand All @@ -166,7 +136,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
registry: true,
security: true,
},
logging: { file: 'info', stdout: 'debug' },
logging: { file: 'info' },
malware: { mode: 'prevent' },
},
},
Expand Down

0 comments on commit a921bbf

Please sign in to comment.