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] Rename siem plugin to security_solution #67902

Merged
merged 33 commits into from
Jun 4, 2020
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cbc5943
rename siem to security_solution
XavierM Jun 1, 2020
ead68f5
rename siem to security solution inside of code
XavierM Jun 2, 2020
68e4f1d
rename translation keys
XavierM Jun 2, 2020
d48736b
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
2ba9145
fix snapshot
XavierM Jun 3, 2020
f0ee47d
replace siem for security solution in tutorial
XavierM Jun 3, 2020
76762fa
missing translation to be renamed
XavierM Jun 3, 2020
5698af8
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
d3f6299
fix types for api test integration
XavierM Jun 3, 2020
b22fa31
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
df6e7c5
updates runner file to match the new path
MadameSheema Jun 3, 2020
b69a88d
Merge branch 'security-navigation' of https://github.com/XavierM/kiba…
MadameSheema Jun 3, 2020
42cec67
change category for kibana settings
XavierM Jun 3, 2020
3342d4e
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
21c89d0
miss renaming in advance settings
XavierM Jun 3, 2020
2fdb92b
Merge branch 'security-navigation' of github.com:XavierM/kibana into …
XavierM Jun 3, 2020
0639936
fixes cypress tests
MadameSheema Jun 3, 2020
d2f4d33
Merge branch 'security-navigation' of https://github.com/XavierM/kiba…
MadameSheema Jun 3, 2020
af134eb
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
4fa7fbf
Merge branch 'security-navigation' of github.com:XavierM/kibana into …
XavierM Jun 3, 2020
7a676cf
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
8d4203e
fix api integration test
XavierM Jun 3, 2020
774e2e6
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
2586899
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
c7d7ee4
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
77307f6
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
7121d65
fix new translation
XavierM Jun 3, 2020
955a9ce
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 3, 2020
f86c062
fix unit test
XavierM Jun 4, 2020
b332c7b
update translation i18n
XavierM Jun 4, 2020
a982675
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 4, 2020
3017b1e
update translation i18n II
XavierM Jun 4, 2020
813e216
Merge branch 'master' of github.com:elastic/kibana into security-navi…
XavierM Jun 4, 2020
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
Prev Previous commit
Next Next commit
rename siem to security solution inside of code
XavierM committed Jun 2, 2020
commit ead68f5e5fb0423d38c884c5a4d99b8732d39c59
2 changes: 1 addition & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
@@ -26,5 +26,5 @@ export const storybookAliases = {
drilldowns: 'x-pack/plugins/drilldowns/scripts/storybook.js',
embeddable: 'src/plugins/embeddable/scripts/storybook.js',
infra: 'x-pack/legacy/plugins/infra/scripts/storybook.js',
siem: 'x-pack/plugins/security_solution/scripts/storybook.js',
security_solution: 'x-pack/plugins/security_solution/scripts/storybook.js',
};
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@ const names: Record<string, string> = {
search: i18n.translate('advancedSettings.categoryNames.searchLabel', {
defaultMessage: 'Search',
}),
siem: i18n.translate('advancedSettings.categoryNames.siemLabel', {
defaultMessage: 'SIEM',
securitySolution: i18n.translate('advancedSettings.categoryNames.securitySolutionLabel', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain you will want to change the securitySolution category key here, since x-pack/plugins/security_solution/server/ui_settings.ts is still using siem as the category name when registering settings, and I believe that's how we find the right category here.

It might be safer to leave the key as siem since it isn't surfaced in the UI, and just keep the new defaultMessage. (Or change all of the uiSettings you register to use the new category)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will prefer to change it everywhere and avoid a mismatch of stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukeelmers Thank you so much for finding it!!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After talking with some good folks, We will need to create a follow up to migrate our siem settings to securitySolution

defaultMessage: 'Security solution',
}),
};

Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ const PARAM_TYPES = {

const TUTORIAL_CATEGORY = {
LOGGING: 'logging',
SIEM: 'siem',
SECURITY_SOLUTION: 'security solution',
METRICS: 'metrics',
OTHER: 'other',
};
24 changes: 12 additions & 12 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
@@ -4,24 +4,24 @@
* you may not use this file except in compliance with the Elastic License.
*/

export const APP_ID = 'siem';
export const APP_NAME = 'SIEM';
export const APP_ID = 'securitySolution';
export const APP_NAME = 'Security';
export const APP_ICON = 'securityAnalyticsApp';
export const APP_PATH = `/app/${APP_ID}`;
export const APP_PATH = `/app/security`;
export const DEFAULT_BYTES_FORMAT = 'format:bytes:defaultPattern';
export const DEFAULT_DATE_FORMAT = 'dateFormat';
export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz';
export const DEFAULT_DARK_MODE = 'theme:darkMode';
export const DEFAULT_INDEX_KEY = 'siem:defaultIndex';
export const DEFAULT_INDEX_KEY = 'securitySolution:defaultIndex';
export const DEFAULT_NUMBER_FORMAT = 'format:number:defaultPattern';
export const DEFAULT_TIME_RANGE = 'timepicker:timeDefaults';
export const DEFAULT_REFRESH_RATE_INTERVAL = 'timepicker:refreshIntervalDefaults';
export const DEFAULT_SIEM_TIME_RANGE = 'siem:timeDefaults';
export const DEFAULT_SIEM_REFRESH_INTERVAL = 'siem:refreshIntervalDefaults';
export const DEFAULT_APP_TIME_RANGE = 'securitySolution:timeDefaults';
export const DEFAULT_APP_REFRESH_INTERVAL = 'securitySolution:refreshIntervalDefaults';
export const DEFAULT_SIGNALS_INDEX = '.siem-signals';
export const DEFAULT_MAX_SIGNALS = 100;
export const DEFAULT_SEARCH_AFTER_PAGE_SIZE = 100;
export const DEFAULT_ANOMALY_SCORE = 'siem:defaultAnomalyScore';
export const DEFAULT_ANOMALY_SCORE = 'securitySolution:defaultAnomalyScore';
export const DEFAULT_MAX_TABLE_QUERY_SIZE = 10000;
export const DEFAULT_SCALE_DATE_FORMAT = 'dateFormat:scaled';
export const DEFAULT_FROM = 'now-24h';
@@ -42,16 +42,16 @@ export const DEFAULT_INDEX_PATTERN = [
];

/** This Kibana Advanced Setting enables the `Security news` feed widget */
export const ENABLE_NEWS_FEED_SETTING = 'siem:enableNewsFeed';
export const ENABLE_NEWS_FEED_SETTING = 'securitySolution:enableNewsFeed';

/** This Kibana Advanced Setting specifies the URL of the News feed widget */
export const NEWS_FEED_URL_SETTING = 'siem:newsFeedUrl';
export const NEWS_FEED_URL_SETTING = 'securitySolution:newsFeedUrl';

/** The default value for News feed widget */
export const NEWS_FEED_URL_SETTING_DEFAULT = 'https://feeds.elastic.co/security-solution';

/** This Kibana Advanced Setting specifies the URLs of `IP Reputation Links`*/
export const IP_REPUTATION_LINKS_SETTING = 'siem:ipReputationLinks';
export const IP_REPUTATION_LINKS_SETTING = 'securitySolution:ipReputationLinks';

/** The default value for `IP Reputation Links` */
export const IP_REPUTATION_LINKS_SETTING_DEFAULT = `[
@@ -62,12 +62,12 @@ export const IP_REPUTATION_LINKS_SETTING_DEFAULT = `[
/**
* Id for the signals alerting type
*/
export const SIGNALS_ID = `${APP_ID}.signals`;
export const SIGNALS_ID = `siem.signals`;

/**
* Id for the notifications alerting type
*/
export const NOTIFICATIONS_ID = `${APP_ID}.notifications`;
export const NOTIFICATIONS_ID = `siem.notifications`;

/**
* Special internal structure for tags for signals. This is used
4 changes: 2 additions & 2 deletions x-pack/plugins/security_solution/kibana.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "siem",
"id": "securitySolution",
"version": "8.0.0",
"kibanaVersion": "kibana",
"configPath": ["xpack", "siem"],
"configPath": ["xpack", "securitySolution"],
"requiredPlugins": [
"actions",
"alerting",
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ describe('useUserInfo', () => {
services: {
application: {
capabilities: {
siem: {
securitySolution: {
crud: true,
},
},
Original file line number Diff line number Diff line change
@@ -163,7 +163,9 @@ export const useUserInfo = (): State => {

const uiCapabilities = useKibana().services.application.capabilities;
const capabilitiesCanUserCRUD: boolean =
typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false;
typeof uiCapabilities.securitySolution.crud === 'boolean'
? uiCapabilities.securitySolution.crud
: false;

useEffect(() => {
if (loading !== privilegeLoading || indexNameLoading) {
Original file line number Diff line number Diff line change
@@ -959,7 +959,7 @@ describe('helpers', () => {
},
],
},
type: 'x-pack/siem/local/timeline/UPDATE_PROVIDERS',
type: 'x-pack/security_solution/local/timeline/UPDATE_PROVIDERS',
});
});

@@ -980,7 +980,7 @@ describe('helpers', () => {
payload: {
id: 'hosts-table-hostName-ENDPOINT-W-0-01',
},
type: 'x-pack/siem/local/drag_and_drop/NO_PROVIDER_FOUND',
type: 'x-pack/security_solution/local/drag_and_drop/NO_PROVIDER_FOUND',
});
});
});
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ describe('Navigation Breadcrumbs', () => {
expect(breadcrumbs).toEqual([
{
href: '#/link-to/overview',
text: 'SIEM',
text: 'Security',
},
{
href:
@@ -129,7 +129,7 @@ describe('Navigation Breadcrumbs', () => {
test('should return Network breadcrumbs when supplied network pathname', () => {
const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', undefined));
expect(breadcrumbs).toEqual([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{
text: 'Network',
href:
@@ -147,15 +147,15 @@ describe('Navigation Breadcrumbs', () => {
getMockObject('timelines', '/timelines', undefined)
);
expect(breadcrumbs).toEqual([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{ text: 'Timelines', href: '#/link-to/timelines' },
]);
});

test('should return Host Details breadcrumbs when supplied a pathname with hostName', () => {
const breadcrumbs = getBreadcrumbsForRoute(getMockObject('hosts', '/hosts', hostName));
expect(breadcrumbs).toEqual([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{
text: 'Hosts',
href:
@@ -173,7 +173,7 @@ describe('Navigation Breadcrumbs', () => {
test('should return IP Details breadcrumbs when supplied pathname with ipv4', () => {
const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', ipv4));
expect(breadcrumbs).toEqual([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{
text: 'Network',
href:
@@ -190,7 +190,7 @@ describe('Navigation Breadcrumbs', () => {
test('should return IP Details breadcrumbs when supplied pathname with ipv6', () => {
const breadcrumbs = getBreadcrumbsForRoute(getMockObject('network', '/network', ipv6Encoded));
expect(breadcrumbs).toEqual([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{
text: 'Network',
href:
@@ -209,7 +209,7 @@ describe('Navigation Breadcrumbs', () => {
test('should call chrome breadcrumb service with correct breadcrumbs', () => {
setBreadcrumbs(getMockObject('hosts', '/hosts', hostName), chromeMock);
expect(setBreadcrumbsMock).toBeCalledWith([
{ text: 'SIEM', href: '#/link-to/overview' },
{ text: 'Security', href: '#/link-to/overview' },
{
text: 'Hosts',
href:
Original file line number Diff line number Diff line change
@@ -111,9 +111,13 @@ export const useGetUserSavedObjectPermissions = () => {

useEffect(() => {
const capabilitiesCanUserCRUD: boolean =
typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false;
typeof uiCapabilities.securitySolution.crud === 'boolean'
? uiCapabilities.securitySolution.crud
: false;
const capabilitiesCanUserRead: boolean =
typeof uiCapabilities.siem.show === 'boolean' ? uiCapabilities.siem.show : false;
typeof uiCapabilities.securitySolution.show === 'boolean'
? uiCapabilities.securitySolution.show
: false;
setSavedObjectsPermissions({
crud: capabilitiesCanUserCRUD,
read: capabilitiesCanUserRead,
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ import React from 'react';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';

import {
DEFAULT_SIEM_TIME_RANGE,
DEFAULT_SIEM_REFRESH_INTERVAL,
DEFAULT_APP_TIME_RANGE,
DEFAULT_APP_REFRESH_INTERVAL,
DEFAULT_INDEX_KEY,
DEFAULT_DATE_FORMAT,
DEFAULT_DATE_FORMAT_TZ,
@@ -31,11 +31,11 @@ import { createKibanaCoreStartMock, createKibanaPluginsStartMock } from './kiban
export const mockUiSettings: Record<string, any> = {
[DEFAULT_TIME_RANGE]: { from: 'now-15m', to: 'now', mode: 'quick' },
[DEFAULT_REFRESH_RATE_INTERVAL]: { pause: false, value: 0 },
[DEFAULT_SIEM_TIME_RANGE]: {
[DEFAULT_APP_TIME_RANGE]: {
from: DEFAULT_FROM,
to: DEFAULT_TO,
},
[DEFAULT_SIEM_REFRESH_INTERVAL]: {
[DEFAULT_APP_REFRESH_INTERVAL]: {
pause: DEFAULT_INTERVAL_PAUSE,
value: DEFAULT_INTERVAL_VALUE,
},
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@ import {
} from './default_date_settings';
import {
DEFAULT_FROM,
DEFAULT_SIEM_TIME_RANGE,
DEFAULT_APP_TIME_RANGE,
DEFAULT_TO,
DEFAULT_SIEM_REFRESH_INTERVAL,
DEFAULT_APP_REFRESH_INTERVAL,
DEFAULT_INTERVAL_PAUSE,
DEFAULT_INTERVAL_VALUE,
DEFAULT_INTERVAL_TYPE,
@@ -36,8 +36,8 @@ jest.mock('../../../common/constants', () => ({
DEFAULT_INTERVAL_PAUSE: true,
DEFAULT_INTERVAL_TYPE: 'manual',
DEFAULT_INTERVAL_VALUE: 300000,
DEFAULT_SIEM_REFRESH_INTERVAL: 'siem:refreshIntervalDefaults',
DEFAULT_SIEM_TIME_RANGE: 'siem:timeDefaults',
DEFAULT_APP_REFRESH_INTERVAL: 'securitySolution:refreshIntervalDefaults',
DEFAULT_APP_TIME_RANGE: 'securitySolution:timeDefaults',
}));

jest.mock('../lib/kibana');
@@ -60,9 +60,9 @@ const mockTimeRange = (
uiSettings: {
get: (key: string) => {
switch (key) {
case DEFAULT_SIEM_TIME_RANGE:
case DEFAULT_APP_TIME_RANGE:
return timeRange;
case DEFAULT_SIEM_REFRESH_INTERVAL:
case DEFAULT_APP_REFRESH_INTERVAL:
return interval;
default:
throw new Error(`Unexpected config key: ${key}`);
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ import moment from 'moment';
import { isBoolean, isNumber, isString } from 'lodash/fp';

import {
DEFAULT_SIEM_TIME_RANGE,
DEFAULT_SIEM_REFRESH_INTERVAL,
DEFAULT_APP_TIME_RANGE,
DEFAULT_APP_REFRESH_INTERVAL,
DEFAULT_FROM,
DEFAULT_TO,
DEFAULT_INTERVAL_TYPE,
@@ -44,7 +44,7 @@ const DEFAULT_TO_MOMENT = moment();
*/
export const getTimeRangeSettings = (uiSettings = true) => {
const timeRange = uiSettings
? KibanaServices.get().uiSettings.get<DefaultTimeRangeSetting>(DEFAULT_SIEM_TIME_RANGE)
? KibanaServices.get().uiSettings.get<DefaultTimeRangeSetting>(DEFAULT_APP_TIME_RANGE)
: null;

const fromStr = (isString(timeRange?.from) && timeRange?.from) || DEFAULT_FROM;
@@ -62,7 +62,7 @@ export const getTimeRangeSettings = (uiSettings = true) => {
*/
export const getIntervalSettings = (uiSettings = true): Policy => {
const interval = uiSettings
? KibanaServices.get().uiSettings.get<DefaultIntervalSetting>(DEFAULT_SIEM_REFRESH_INTERVAL)
? KibanaServices.get().uiSettings.get<DefaultIntervalSetting>(DEFAULT_APP_REFRESH_INTERVAL)
: null;

const duration = (isNumber(interval?.value) && interval?.value) || DEFAULT_INTERVAL_VALUE;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ export const EmbeddedMapComponent = ({
useEffect(() => {
let isSubscribed = true;
async function setupEmbeddable() {
// Ensure at least one `siem:defaultIndex` kibana index pattern exists before creating embeddable
// Ensure at least one `securitySolution:defaultIndex` kibana index pattern exists before creating embeddable
const matchingIndexPatterns = findMatchingIndexPatterns({
kibanaIndexPatterns,
siemDefaultIndices,
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ export const IndexPatternsMissingPromptComponent = () => {
rel="noopener noreferrer"
target="_blank"
>
{'siem:defaultIndex'}
{'securitySolution:defaultIndex'}
</a>
),
beats: (
1 change: 1 addition & 0 deletions x-pack/plugins/security_solution/public/plugin.tsx
Original file line number Diff line number Diff line change
@@ -142,6 +142,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
order: 9000,
euiIconType: APP_ICON,
category: DEFAULT_APP_CATEGORIES.security,
appRoute: APP_PATH,
async mount(params: AppMountParameters) {
return mountSecurityApp(params);
},
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ describe('TimelinesPageComponent', () => {
services: {
application: {
capabilities: {
siem: {
securitySolution: {
crud: true,
},
},
@@ -66,7 +66,7 @@ describe('TimelinesPageComponent', () => {
services: {
application: {
capabilities: {
siem: {
securitySolution: {
crud: false,
},
},
Original file line number Diff line number Diff line change
@@ -35,7 +35,9 @@ export const TimelinesPageComponent: React.FC<OwnProps> = ({ apolloClient }) =>

const uiCapabilities = useKibana().services.application.capabilities;
const capabilitiesCanUserCRUD: boolean =
typeof uiCapabilities.siem.crud === 'boolean' ? uiCapabilities.siem.crud : false;
typeof uiCapabilities.securitySolution.crud === 'boolean'
? uiCapabilities.securitySolution.crud
: false;

return (
<>
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ const ENABLED = false;
// For converting, if you want to use these instead of rely on the defaults then
// comment these in and use them for the script. Otherwise this is commented out
// so we can utilize the defaults of input and output which are based on saved objects
// of siem:defaultIndex and your kibana.dev.yml setting of xpack.siem.signalsIndex. If
// of securitySolution:defaultIndex and your kibana.dev.yml setting of xpack.siem.signalsIndex. If
// the setting of xpack.siem.signalsIndex is not set it defaults to .siem-signals
// const INDEX = ['auditbeat-*', 'filebeat-*', 'packetbeat-*', 'winlogbeat-*'];
// const OUTPUT_INDEX = '.siem-signals-some-other-index';
Loading