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

[SIEM][CASE] Change SIEM to Security #68365

Merged
merged 1 commit into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -70,7 +70,7 @@ export interface CaseProps extends Props {
export const CaseComponent = React.memo<CaseProps>(
({ caseId, caseData, fetchCase, updateCase, userCanCrud }) => {
const basePath = window.location.origin + useBasePath();
const caseLink = `${basePath}/app/siem#/case/${caseId}`;
const caseLink = `${basePath}/app/security#/case/${caseId}`;
const search = useGetUrlSearch(navTabs.case);
const [initLoadingData, setInitLoadingData] = useState(true);
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const CASE_REFRESH = i18n.translate('xpack.securitySolution.case.caseView
export const EMAIL_SUBJECT = (caseTitle: string) =>
i18n.translate('xpack.securitySolution.case.caseView.emailSubject', {
values: { caseTitle },
defaultMessage: 'SIEM Case - {caseTitle}',
defaultMessage: 'Security Case - {caseTitle}',
});

export const EMAIL_BODY = (caseUrl: string) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('FieldMappingRow', () => {
test('it pass the corrects props to mapping row', () => {
const rows = wrapper.find(FieldMappingRow);
rows.forEach((row, index) => {
expect(row.prop('siemField')).toEqual(mapping[index].source);
expect(row.prop('securitySolutionField')).toEqual(mapping[index].source);
expect(row.prop('selectedActionType')).toEqual(mapping[index].actionType);
expect(row.prop('selectedThirdParty')).toEqual(mapping[index].target);
});
Expand All @@ -68,7 +68,7 @@ describe('FieldMappingRow', () => {

const rows = newWrapper.find(FieldMappingRow);
rows.forEach((row, index) => {
expect(row.prop('siemField')).toEqual(defaultMapping[index].source);
expect(row.prop('securitySolutionField')).toEqual(defaultMapping[index].source);
expect(row.prop('selectedActionType')).toEqual(defaultMapping[index].actionType);
expect(row.prop('selectedThirdParty')).toEqual(defaultMapping[index].target);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const FieldMappingComponent: React.FC<FieldMappingProps> = ({
key={`${item.source}`}
id={`${item.source}`}
disabled={disabled}
siemField={item.source}
securitySolutionField={item.source}
thirdPartyOptions={getThirdPartyOptions(item.source, selectedConnector.fields)}
actionTypeOptions={actionTypeOptions}
onChangeActionType={onChangeActionType}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('FieldMappingRow', () => {
const props: RowProps = {
id: 'title',
disabled: false,
siemField: 'title',
securitySolutionField: 'title',
thirdPartyOptions,
actionTypeOptions,
onChangeActionType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { AllThirdPartyFields } from '../../../common/lib/connectors/types';
export interface RowProps {
id: string;
disabled: boolean;
siemField: CaseField;
securitySolutionField: CaseField;
thirdPartyOptions: Array<EuiSuperSelectOption<AllThirdPartyFields>>;
actionTypeOptions: Array<EuiSuperSelectOption<ActionType>>;
onChangeActionType: (caseField: CaseField, newActionType: ActionType) => void;
Expand All @@ -32,21 +32,23 @@ export interface RowProps {
const FieldMappingRowComponent: React.FC<RowProps> = ({
id,
disabled,
siemField,
securitySolutionField,
thirdPartyOptions,
actionTypeOptions,
onChangeActionType,
onChangeThirdParty,
selectedActionType,
selectedThirdParty,
}) => {
const siemFieldCapitalized = useMemo(() => capitalize(siemField), [siemField]);
const securitySolutionFieldCapitalized = useMemo(() => capitalize(securitySolutionField), [
securitySolutionField,
]);
return (
<EuiFlexGroup alignItems="center">
<EuiFlexItem>
<EuiFlexGroup component="span" justifyContent="spaceBetween">
<EuiFlexItem component="span" grow={false}>
{siemFieldCapitalized}
{securitySolutionFieldCapitalized}
</EuiFlexItem>
<EuiFlexItem component="span" grow={false}>
<EuiIcon type="sortRight" />
Expand All @@ -58,7 +60,7 @@ const FieldMappingRowComponent: React.FC<RowProps> = ({
disabled={disabled}
options={thirdPartyOptions}
valueOfSelected={selectedThirdParty}
onChange={onChangeThirdParty.bind(null, siemField)}
onChange={onChangeThirdParty.bind(null, securitySolutionField)}
data-test-subj={`case-configure-third-party-select-${id}`}
/>
</EuiFlexItem>
Expand All @@ -67,7 +69,7 @@ const FieldMappingRowComponent: React.FC<RowProps> = ({
disabled={disabled}
options={actionTypeOptions}
valueOfSelected={selectedActionType}
onChange={onChangeActionType.bind(null, siemField)}
onChange={onChangeActionType.bind(null, securitySolutionField)}
data-test-subj={`case-configure-action-type-select-${id}`}
/>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate(
'xpack.securitySolution.case.configureCases.incidentManagementSystemDesc',
{
defaultMessage:
'You may optionally connect SIEM cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.',
'You may optionally connect Security cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.',
}
);

Expand Down Expand Up @@ -53,7 +53,7 @@ export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate(
'xpack.securitySolution.case.configureCases.caseClosureOptionsDesc',
{
defaultMessage:
'Define how you wish SIEM cases to be closed. Automated case closures require an established connection to an external incident management system.',
'Define how you wish Security cases to be closed. Automated case closures require an established connection to an external incident management system.',
}
);

Expand All @@ -67,21 +67,22 @@ export const CASE_CLOSURE_OPTIONS_LABEL = i18n.translate(
export const CASE_CLOSURE_OPTIONS_MANUAL = i18n.translate(
'xpack.securitySolution.case.configureCases.caseClosureOptionsManual',
{
defaultMessage: 'Manually close SIEM cases',
defaultMessage: 'Manually close Security cases',
}
);

export const CASE_CLOSURE_OPTIONS_NEW_INCIDENT = i18n.translate(
'xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident',
{
defaultMessage: 'Automatically close SIEM cases when pushing new incident to external system',
defaultMessage:
'Automatically close Security cases when pushing new incident to external system',
}
);

export const CASE_CLOSURE_OPTIONS_CLOSED_INCIDENT = i18n.translate(
'xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident',
{
defaultMessage: 'Automatically close SIEM cases when incident is closed in external system',
defaultMessage: 'Automatically close Security cases when incident is closed in external system',
}
);

Expand All @@ -96,14 +97,14 @@ export const FIELD_MAPPING_DESC = i18n.translate(
'xpack.securitySolution.case.configureCases.fieldMappingDesc',
{
defaultMessage:
'Map SIEM case fields when pushing data to a third-party. Field mappings require an established connection to an external incident management system.',
'Map Security case fields when pushing data to a third-party. Field mappings require an established connection to an external incident management system.',
}
);

export const FIELD_MAPPING_FIRST_COL = i18n.translate(
'xpack.securitySolution.case.configureCases.fieldMappingFirstCol',
{
defaultMessage: 'SIEM case field',
defaultMessage: 'Security case field',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const onSaveContent = jest.fn();

const timelineId = '1e10f150-949b-11ea-b63c-2bc51864784c';
const defaultProps = {
content: `A link to a timeline [timeline](http://localhost:5601/app/siem#/timelines?timeline=(id:'${timelineId}',isOpen:!t))`,
content: `A link to a timeline [timeline](http://localhost:5601/app/security#/timelines?timeline=(id:'${timelineId}',isOpen:!t))`,
id: 'markdown-id',
isEditable: false,
onChangeEditable,
Expand Down