Skip to content

Commit b9d76c1

Browse files
Merge branch 'master' into remove-EuiOverlayMask
2 parents e00a677 + 2903844 commit b9d76c1

65 files changed

Lines changed: 1883 additions & 675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/settings/alert-action-settings.asciidoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ You can configure the following settings in the `kibana.yml` file.
4040

4141
[cols="2*<"]
4242
|===
43+
| `xpack.actions.enabled`
44+
| Feature toggle that enables Actions in {kib}. Defaults to `true`.
4345

4446
| `xpack.actions.allowedHosts` {ess-icon}
4547
| A list of hostnames that {kib} is allowed to connect to when built-in actions are triggered. It defaults to `[*]`, allowing any host, but keep in mind the potential for SSRF attacks when hosts are not explicitly added to the allowed hosts. An empty list `[]` can be used to block built-in actions from making any external connections. +
@@ -51,6 +53,24 @@ You can configure the following settings in the `kibana.yml` file.
5153
+
5254
Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function.
5355

56+
| `xpack.actions.preconfigured`
57+
| Specifies preconfigured action IDs and configs. Defaults to {}.
58+
59+
| `xpack.actions.proxyUrl` {ess-icon}
60+
| Specifies the proxy URL to use, if using a proxy for actions. By default, no proxy is used.
61+
62+
| `xpack.actions.proxyHeaders` {ess-icon}
63+
| Specifies HTTP headers for the proxy, if using a proxy for actions. Defaults to {}.
64+
65+
a|`xpack.actions.`
66+
`proxyRejectUnauthorizedCertificates` {ess-icon}
67+
| Set to `false` to bypass certificate validation for the proxy, if using a proxy for actions. Defaults to `true`.
68+
69+
| `xpack.actions.rejectUnauthorized` {ess-icon}
70+
| Set to `false` to bypass certificate validation for actions. Defaults to `true`. +
71+
+
72+
As an alternative to setting both `xpack.actions.proxyRejectUnauthorizedCertificates` and `xpack.actions.rejectUnauthorized`, you can point the OS level environment variable `NODE_EXTRA_CA_CERTS` to a file that contains the root CAs needed to trust certificates.
73+
5474
|===
5575

5676
[float]

docs/user/alerting/action-types/pre-configured-connectors.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ This example shows a preconfigured action type with one out-of-the box connector
9595
name: 'Server log #xyz'
9696
```
9797

98-
<1> `enabledActionTypes` excludes the preconfigured action type to prevent creating and deleting connectors.
98+
<1> `enabledActionTypes` prevents the preconfigured action type from creating and deleting connectors. For more details, check <<action-settings, Action settings>>.
9999
<2> `preconfigured` is the setting for defining the list of available connectors for the preconfigured action type.
100100

101101
[[managing-pre-configured-action-types]]

docs/user/alerting/alerting-getting-started.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Pre-packaged *alert types* simplify setup, hide the details complex domain-speci
157157

158158
If you are using an *on-premises* Elastic Stack deployment:
159159

160-
* In the kibana.yml configuration file, add the <<alert-action-settings-kb,`xpack.encryptedSavedObjects.encryptionKey`>> setting.
160+
* In the kibana.yml configuration file, add the <<general-alert-action-settings,`xpack.encryptedSavedObjects.encryptionKey`>> setting.
161161
* For emails to have a footer with a link back to {kib}, set the <<server-publicBaseUrl, `server.publicBaseUrl`>> configuration setting.
162162

163163
If you are using an *on-premises* Elastic Stack deployment with <<using-kibana-with-security, *security*>>:

docs/user/alerting/alerting-production-considerations.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
[[alerting-production-considerations]]
33
== Production considerations
44

5-
{kib} alerting run both alert checks and actions as persistent background tasks managed by the Kibana Task Manager. This has two major benefits:
5+
{kib} alerting runs both alert checks and actions as persistent background tasks managed by the Kibana Task Manager. This has two major benefits:
66

7-
* *Persistence*: all task state and scheduling is stored in {es}, so if {kib} is restarted, alerts and actions will pick up where they left off. Task definitions for alerts and actions are stored in the index specified by `xpack.task_manager.index` (defaults to `.kibana_task_manager`). It is important to have at least 1 replica of this index for production deployments, since if you lose this index all scheduled alerts and actions are also lost.
7+
* *Persistence*: all task state and scheduling is stored in {es}, so if you restart {kib}, alerts and actions will pick up where they left off. Task definitions for alerts and actions are stored in the index specified by <<task-manager-settings, `xpack.task_manager.index`>>. The default is `.kibana_task_manager`. You must have at least one replica of this index for production deployments. If you lose this index, all scheduled alerts and actions are lost.
88
* *Scaling*: multiple {kib} instances can read from and update the same task queue in {es}, allowing the alerting and action load to be distributed across instances. In cases where a {kib} instance no longer has capacity to run alert checks or actions, capacity can be increased by adding additional {kib} instances.
99

1010
[float]
1111
=== Running background alert checks and actions
1212

1313
{kib} background tasks are managed by:
1414

15-
* Polling an {es} task index for overdue tasks at 3 second intervals. This interval can be changed using the `xpack.task_manager.poll_interval` setting.
15+
* Polling an {es} task index for overdue tasks at 3 second intervals. You can change this interval using the <<task-manager-settings, `xpack.task_manager.poll_interval`>> setting.
1616
* Tasks are then claiming them by updating them in the {es} index, using optimistic concurrency control to prevent conflicts. Each {kib} instance can run a maximum of 10 concurrent tasks, so a maximum of 10 tasks are claimed each interval.
1717
* Tasks are run on the {kib} server.
1818
* In the case of alerts which are recurring background checks, upon completion the task is scheduled again according to the <<defining-alerts-general-details, check interval>>.
@@ -32,4 +32,4 @@ For details on the settings that can influence the performance and throughput of
3232
[float]
3333
=== Deployment considerations
3434

35-
{es} and {kib} instances use the system clock to determine the current time. To ensure schedules are triggered when expected, you should synchronize the clocks of all nodes in the cluster using a time service such as http://www.ntp.org/[Network Time Protocol].
35+
{es} and {kib} instances use the system clock to determine the current time. To ensure schedules are triggered when expected, you should synchronize the clocks of all nodes in the cluster using a time service such as http://www.ntp.org/[Network Time Protocol].

docs/user/alerting/defining-alerts.asciidoc

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,29 +101,9 @@ image::images/alert-flyout-add-action.png[You can add multiple actions on an ale
101101

102102
[NOTE]
103103
==============================================
104-
Actions are not required on alerts. In some cases you may want to run an alert without actions first to understand its behavior, and configure actions later.
104+
Actions are not required on alerts. You can run an alert without actions to understand its behavior, and then <<action-settings, configure actions>> later.
105105
==============================================
106106

107-
[float]
108-
[[actions-configuration]]
109-
=== Global actions configuration
110-
Some actions configuration options apply to all actions.
111-
If you are using an *on-prem* Elastic Stack deployment, you can set these in the kibana.yml file.
112-
If you are using a cloud deployment, you can set these via the console.
113-
114-
Here's a list of the available global configuration options and an explanation of what each one does:
115-
116-
* `xpack.actions.enabled`: Feature toggle that enables Actions in {kib}. Default: `true`
117-
* `xpack.actions.allowedHosts`: Specifies an array of host names which actions such as email, Slack, PagerDuty, and webhook can connect to. An element of * indicates any host can be connected to. An empty array indicates no hosts can be connected to. Default: [ {asterisk} ]
118-
* `xpack.actions.enabledActionTypes`: Specifies an array of action types that are enabled. An {asterisk} indicates all action types registered are enabled. The action types that {kib} provides are `.email`, `.index`, `.jira`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, `.servicenow-sir`, `.slack`, `.teams`, and `.webhook`. Default: [ {asterisk} ]
119-
* `xpack.actions.preconfigured`: Specifies preconfigured action IDs and configs. Default: {}
120-
* `xpack.actions.proxyUrl`: Specifies the proxy URL to use, if using a proxy for actions.
121-
* `xpack.actions.proxyHeader`: Specifies HTTP headers for proxy, if using a proxy for actions.
122-
* `xpack.actions.proxyRejectUnauthorizedCertificates`: Set to `false` to bypass certificate validation for proxy, if using a proxy for actions.
123-
* `xpack.actions.rejectUnauthorized`: Set to `false` to bypass certificate validation for actions.
124-
125-
*NOTE:* As an alternative to both `xpack.actions.proxyRejectUnauthorizedCertificates` and `xpack.actions.rejectUnauthorized`, the OS level environment variable `NODE_EXTRA_CA_CERTS` can be set to point to a file that contains the root CA(s) needed for certificates to be trusted.
126-
127107
[float]
128108
=== Managing alerts
129109

x-pack/plugins/apm/public/components/app/ErrorGroupDetails/index.tsx

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,45 @@ function getShortGroupId(errorGroupId?: string) {
6060
return errorGroupId.slice(0, 5);
6161
}
6262

63+
function ErrorGroupHeader({
64+
groupId,
65+
isUnhandled,
66+
}: {
67+
groupId: string;
68+
isUnhandled?: boolean;
69+
}) {
70+
return (
71+
<>
72+
<ApmHeader>
73+
<EuiFlexGroup alignItems="center">
74+
<EuiFlexItem grow={false}>
75+
<EuiTitle>
76+
<h1>
77+
{i18n.translate('xpack.apm.errorGroupDetails.errorGroupTitle', {
78+
defaultMessage: 'Error group {errorGroupId}',
79+
values: {
80+
errorGroupId: getShortGroupId(groupId),
81+
},
82+
})}
83+
</h1>
84+
</EuiTitle>
85+
</EuiFlexItem>
86+
{isUnhandled && (
87+
<EuiFlexItem grow={false}>
88+
<EuiBadge color="warning">
89+
{i18n.translate('xpack.apm.errorGroupDetails.unhandledLabel', {
90+
defaultMessage: 'Unhandled',
91+
})}
92+
</EuiBadge>
93+
</EuiFlexItem>
94+
)}
95+
</EuiFlexGroup>
96+
</ApmHeader>
97+
<SearchBar />
98+
</>
99+
);
100+
}
101+
63102
type ErrorGroupDetailsProps = RouteComponentProps<{
64103
groupId: string;
65104
serviceName: string;
@@ -101,7 +140,7 @@ export function ErrorGroupDetails({ location, match }: ErrorGroupDetailsProps) {
101140
useTrackPageview({ app: 'apm', path: 'error_group_details', delay: 15000 });
102141

103142
if (!errorGroupData || !errorDistributionData) {
104-
return null;
143+
return <ErrorGroupHeader groupId={groupId} />;
105144
}
106145

107146
// If there are 0 occurrences, show only distribution chart w. empty message
@@ -114,32 +153,7 @@ export function ErrorGroupDetails({ location, match }: ErrorGroupDetailsProps) {
114153

115154
return (
116155
<>
117-
<ApmHeader>
118-
<EuiFlexGroup alignItems="center">
119-
<EuiFlexItem grow={false}>
120-
<EuiTitle>
121-
<h1>
122-
{i18n.translate('xpack.apm.errorGroupDetails.errorGroupTitle', {
123-
defaultMessage: 'Error group {errorGroupId}',
124-
values: {
125-
errorGroupId: getShortGroupId(groupId),
126-
},
127-
})}
128-
</h1>
129-
</EuiTitle>
130-
</EuiFlexItem>
131-
{isUnhandled && (
132-
<EuiFlexItem grow={false}>
133-
<EuiBadge color="warning">
134-
{i18n.translate('xpack.apm.errorGroupDetails.unhandledLabel', {
135-
defaultMessage: 'Unhandled',
136-
})}
137-
</EuiBadge>
138-
</EuiFlexItem>
139-
)}
140-
</EuiFlexGroup>
141-
</ApmHeader>
142-
<SearchBar />
156+
<ErrorGroupHeader groupId={groupId} isUnhandled={isUnhandled} />
143157
<EuiPage>
144158
<EuiPageBody>
145159
<EuiPanel>

x-pack/plugins/apm/public/components/app/error_group_overview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function ErrorGroupOverview({ serviceName }: ErrorGroupOverviewProps) {
6868
useTrackPageview({ app: 'apm', path: 'error_group_overview', delay: 15000 });
6969

7070
if (!errorDistributionData || !errorGroupListData) {
71-
return null;
71+
return <SearchBar />;
7272
}
7373

7474
return (

x-pack/plugins/security_solution/common/search_strategy/timeline/events/details/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface TimelineEventsDetailsItem {
1616
values?: Maybe<string[]>;
1717
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1818
originalValue?: Maybe<any>;
19+
isObjectArray: boolean;
1920
}
2021

2122
export interface TimelineEventsDetailsStrategyResponse extends IEsSearchResponse {

x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ export const CaseComponent = React.memo<CaseProps>(
447447
caseFields={caseData.connector.fields}
448448
connectors={connectors}
449449
disabled={!userCanCrud}
450+
hideConnectorServiceNowSir={
451+
subCaseId != null || caseData.type === CaseType.collection
452+
}
450453
isLoading={isLoadingConnectors || (isLoading && updateKey === 'connector')}
451454
onSubmit={onSubmitConnector}
452455
selectedConnector={caseData.connector.id}

x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.test.tsx

Lines changed: 137 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,122 @@ describe('ConnectorsDropdown', () => {
3434
test('it formats the connectors correctly', () => {
3535
const selectProps = wrapper.find(EuiSuperSelect).props();
3636

37-
expect(selectProps.options).toEqual(
38-
expect.arrayContaining([
39-
expect.objectContaining({
40-
value: 'none',
41-
'data-test-subj': 'dropdown-connector-no-connector',
42-
}),
43-
expect.objectContaining({
44-
value: 'servicenow-1',
45-
'data-test-subj': 'dropdown-connector-servicenow-1',
46-
}),
47-
expect.objectContaining({
48-
value: 'resilient-2',
49-
'data-test-subj': 'dropdown-connector-resilient-2',
50-
}),
51-
])
52-
);
37+
expect(selectProps.options).toMatchInlineSnapshot(`
38+
Array [
39+
Object {
40+
"data-test-subj": "dropdown-connector-no-connector",
41+
"inputDisplay": <EuiFlexGroup
42+
alignItems="center"
43+
gutterSize="none"
44+
>
45+
<EuiFlexItem
46+
grow={false}
47+
>
48+
<Styled(EuiIcon)
49+
size="m"
50+
type="minusInCircle"
51+
/>
52+
</EuiFlexItem>
53+
<EuiFlexItem>
54+
<span
55+
data-test-subj="dropdown-connector-no-connector"
56+
>
57+
No connector selected
58+
</span>
59+
</EuiFlexItem>
60+
</EuiFlexGroup>,
61+
"value": "none",
62+
},
63+
Object {
64+
"data-test-subj": "dropdown-connector-servicenow-1",
65+
"inputDisplay": <EuiFlexGroup
66+
alignItems="center"
67+
gutterSize="none"
68+
>
69+
<EuiFlexItem
70+
grow={false}
71+
>
72+
<Styled(EuiIcon)
73+
size="m"
74+
type="test-file-stub"
75+
/>
76+
</EuiFlexItem>
77+
<EuiFlexItem>
78+
<span>
79+
My Connector
80+
</span>
81+
</EuiFlexItem>
82+
</EuiFlexGroup>,
83+
"value": "servicenow-1",
84+
},
85+
Object {
86+
"data-test-subj": "dropdown-connector-resilient-2",
87+
"inputDisplay": <EuiFlexGroup
88+
alignItems="center"
89+
gutterSize="none"
90+
>
91+
<EuiFlexItem
92+
grow={false}
93+
>
94+
<Styled(EuiIcon)
95+
size="m"
96+
type="test-file-stub"
97+
/>
98+
</EuiFlexItem>
99+
<EuiFlexItem>
100+
<span>
101+
My Connector 2
102+
</span>
103+
</EuiFlexItem>
104+
</EuiFlexGroup>,
105+
"value": "resilient-2",
106+
},
107+
Object {
108+
"data-test-subj": "dropdown-connector-jira-1",
109+
"inputDisplay": <EuiFlexGroup
110+
alignItems="center"
111+
gutterSize="none"
112+
>
113+
<EuiFlexItem
114+
grow={false}
115+
>
116+
<Styled(EuiIcon)
117+
size="m"
118+
type="test-file-stub"
119+
/>
120+
</EuiFlexItem>
121+
<EuiFlexItem>
122+
<span>
123+
Jira
124+
</span>
125+
</EuiFlexItem>
126+
</EuiFlexGroup>,
127+
"value": "jira-1",
128+
},
129+
Object {
130+
"data-test-subj": "dropdown-connector-servicenow-sir",
131+
"inputDisplay": <EuiFlexGroup
132+
alignItems="center"
133+
gutterSize="none"
134+
>
135+
<EuiFlexItem
136+
grow={false}
137+
>
138+
<Styled(EuiIcon)
139+
size="m"
140+
type="test-file-stub"
141+
/>
142+
</EuiFlexItem>
143+
<EuiFlexItem>
144+
<span>
145+
My Connector SIR
146+
</span>
147+
</EuiFlexItem>
148+
</EuiFlexGroup>,
149+
"value": "servicenow-sir",
150+
},
151+
]
152+
`);
53153
});
54154

55155
test('it disables the dropdown', () => {
@@ -79,4 +179,25 @@ describe('ConnectorsDropdown', () => {
79179

80180
expect(newWrapper.find('button span:not([data-euiicon-type])').text()).toEqual('My Connector');
81181
});
182+
183+
test('if the props hideConnectorServiceNowSir is true, the connector should not be part of the list of options ', () => {
184+
const newWrapper = mount(
185+
<ConnectorsDropdown
186+
{...props}
187+
selectedConnector={'servicenow-1'}
188+
hideConnectorServiceNowSir={true}
189+
/>,
190+
{
191+
wrappingComponent: TestProviders,
192+
}
193+
);
194+
const selectProps = newWrapper.find(EuiSuperSelect).props();
195+
const options = selectProps.options as Array<{ 'data-test-subj': string }>;
196+
expect(
197+
options.some((o) => o['data-test-subj'] === 'dropdown-connector-servicenow-1')
198+
).toBeTruthy();
199+
expect(
200+
options.some((o) => o['data-test-subj'] === 'dropdown-connector-servicenow-sir')
201+
).toBeFalsy();
202+
});
82203
});

0 commit comments

Comments
 (0)