Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution][ML] Updates siem group name to security #73218

Merged
merged 4 commits into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const setupMlJob = async ({
configTemplate,
indexPatternName = 'auditbeat-*',
jobIdErrorFilter = [],
groups = ['siem'],
groups = ['security'],
prefix = '',
}: MlSetupArgs): Promise<SetupMlResponse> => {
const response = await KibanaServices.get().http.fetch<SetupMlResponse>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import { i18n } from '@kbn/i18n';
export const SIEM_JOB_FETCH_FAILURE = i18n.translate(
'xpack.securitySolution.components.mlPopup.hooks.errors.siemJobFetchFailureTitle',
{
defaultMessage: 'SIEM job fetch failure',
defaultMessage: 'Security job fetch failure',
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const getInstalledJobs = (
compatibleModuleIds: string[]
): SiemJob[] =>
jobSummaryData
.filter(({ groups }) => groups.includes('siem'))
.filter(({ groups }) => groups.includes('siem') || groups.includes('security'))
.map<SiemJob>((jobSummary) => ({
...jobSummary,
...getAugmentedFields(jobSummary.id, moduleJobs, compatibleModuleIds),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ interface GroupsFilterPopoverProps {

/**
* Popover for selecting which SiemJob groups to filter on. Component extracts unique groups and
* their counts from the provided SiemJobs. The 'siem' group is filtered out as all jobs will be
* siem jobs
* their counts from the provided SiemJobs. The 'siem' & 'security' groups are filtered out as all jobs will be
* siem/security jobs
*
* @param siemJobs jobs to fetch groups from to display for filtering
* @param onSelectedGroupsChanged change listener to be notified when group selection changes
Expand All @@ -41,7 +41,7 @@ export const GroupsFilterPopoverComponent = ({
const groups = siemJobs
.map((j) => j.groups)
.flat()
.filter((g) => g !== 'siem');
.filter((g) => g !== 'siem' && g !== 'security');
const uniqueGroups = Array.from(new Set(groups));

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
export const mlModules: string[] = [
'siem_auditbeat',
'siem_auditbeat_auth',
'siem_cloudtrail',
'siem_packetbeat',
'siem_winlogbeat',
'siem_winlogbeat_auth',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const HelpText: React.FC<{ href: string; showEnableWarning: boolean }> = ({
<>
<FormattedMessage
id="xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningJobIdHelpText"
defaultMessage="We've provided a few common jobs to get you started. To add your own custom jobs, assign a group of “siem” to those jobs in the {machineLearning} application to make them appear here."
defaultMessage="We've provided a few common jobs to get you started. To add your own custom jobs, assign a group of “security” to those jobs in the {machineLearning} application to make them appear here."
values={{
machineLearning: (
<EuiLink href={href} target="_blank">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export const getMlJobsUsage = async (ml: MlPluginSetup | undefined): Promise<MlJ
.modulesProvider(internalMlClient, fakeRequest, fakeSOClient)
.listModules();
const moduleJobs = modules.flatMap((module) => module.jobs);
const jobs = await ml.jobServiceProvider(internalMlClient, fakeRequest).jobsSummary(['siem']);
const jobs = await ml
.jobServiceProvider(internalMlClient, fakeRequest)
.jobsSummary(['siem', 'security']);

jobsUsage = jobs.reduce((usage, job) => {
const isElastic = moduleJobs.some((moduleJob) => moduleJob.id === job.id);
Expand Down