## Summary
Fixes regression issue, probably created when `engines` were renamed to
`Search applications` in backend. The Create api key `POST` request was
requesting to incorrect url. Replaced with correct url in this PR.
## Summary
Increase the timeout for the `indexEndpointHosts` task that was timing
out on many Defend Workflows cypress tests.
### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
### Release note
Resolves https://github.com/elastic/kibana/issues/158172
Fixes an issue where alerting on Synthetics monitors could sometimes
become delayed.
## Summary
Adjust alerting timing to account for alerting framework delays.
Alert executors do not fire perfectly on the specified interval (in our
case, every 1 minute). They are typically delayed a few seconds, be can
especially delayed if the customer does not have their alerting settings
configured to scale and there is no CPU available to take on the
scheduled task.
This PR accounts for small delays in the alerting framework, by
subtracting an additional 1 minute from the `from` value for our current
status query.
## Summary
Until [this issue](https://github.com/elastic/kibana/issues/153720) is
resolved, this config flag allows us to access the task manager
background worker utilization API in serverless to support autoscaling
of background task deployments
## To Verify
Run es: `yarn es snapshot`
Run serverless on this branch: `yarn serverless-es`
Verify you see the following warning in the logs:
```
[2023-06-12T12:47:19.641-04:00][WARN ][plugins.taskManager] Disabling authentication for background task utilization API
```
and you can access `/api/task_manager/_background_task_utilization`
without logging in
## Summary
> **Note**
> To test this, the feature flag `agentTamperProtectionEnabled` should
be enabled.
The Uninstall Command Flyout now uses the real `GET /uninstall_tokens`
endpoint to fetch the uninstall token for the selected policy, and
generates the uninstall commands using the token.
Also, it adds policy ID to the Uninstall Command Flyout.

Linux/Mac:

Windows:

Loading state:

Error state:

<details>
<summary>Original screenshots without showing policy ID</summary>

Linux/Mac:

Windows:

Loading state:

Error state:

</details>
### Checklist
Delete any items that are not applicable to this PR.
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Use Workflow restriction in create new api key to support safe search endpoint
key.
~~**Pending:** Updating/ adding test case. Will add if this
implementation looks good.~~ **Done**
~~**TODO**: Create a tech debt to use client type when ready~~ Created a
Tech debt ticket
https://github.com/elastic/enterprise-search-team/issues/4779
### Screen Recording
8e6ff486-21c8-499e-a65a-02d4da192f0e
Closes https://github.com/elastic/kibana/issues/157481
## Summary
This PR adds the Reroute processor in Ingest Pipelines.
<img width="718" alt="Screenshot 2023-06-07 at 16 12 02"
src="f866863c-b7d5-4eb8-a56b-fd634df5665c">
**How to test**
1. Start elasticsearch with `yarn es snapshot` and kibana with `yarn
start`.
2. Navigate to Stack Management -> Ingest Pipelines and start creating a
new pipeline.
3. Start adding a new processor of type Reroute.
4. Verify that setting the Dataset or the Namespace fields disables the
Destination field. Also, clearing up the Dataset and the Namespace
fields should reenable the Destination Field.
5. Save the processor with the following parameters:
dataset: `nginx`
namespace: `default`
6. Click "Show request" and verify that the request is correct.
7. Click "Test pipeline" and add the following document:
```
[
{
"_index": "type-dataset-namespace",
"_id": "id",
"_source": {
"foo": "bar"
}
}
]
```
8. Verify the output:
```
{
"docs": [
{
"doc": {
"_index": "type-nginx-default",
"_id": "id",
"_version": "-3",
"_source": {
"data_stream": {
"namespace": "default",
"type": "type",
"dataset": "nginx"
},
"foo": "bar"
},
"_ingest": {
"timestamp": "2023-06-07T15:18:33.59474Z"
}
}
}
]
}
```
9. Edit the processor and, this time, clear up the Dataset and Namespace
fields and set the Destination field to `test-destination`.
10. Verify the request.
11. Test the pipeline:
```
[
{
"_index": "type-dataset-namespace",
"_id": "id",
"_source": {
"foo": "bar"
}
}
]
```
Should produce:
```
{
"docs": [
{
"doc": {
"_index": "test-destination",
"_id": "id",
"_version": "-3",
"_source": {
"foo": "bar"
},
"_ingest": {
"timestamp": "2023-06-07T15:24:34.233092Z"
}
}
}
]
}
```
### Checklist
Delete any items that are not applicable to this PR.
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Part of https://github.com/elastic/kibana/issues/154307
Add convert to lens logic for tag cloud visualization
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
- Removes the feedback links from the advanced settings
- Adds feedback button to the labs flyout
- Updates the description of
`observability:enableInfrastructureHostsView` as it's not in Beta.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
Fixes#159116
## Summary
- Add the new `category` field to cases.
- Update the types to take `category` into account.
- Update `transforms` to return a default value for `category`.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
fixes https://github.com/elastic/kibana/issues/159317
## Summary
This PR fixes a problem in the utilization of the `ControlGroupRenderer`
component in the Hosts View. The problem originated from the need to
manually compare changes in the `filterPanel` object, to prevent the
page from making duplicate requests
b38f5691-0519-4ae2-aab2-daaf0f72cd0d
After many changes that the code has been through, the comparison
mentioned above has become unnecessary.
### How to test
- Start a local Kibana instance
- Navigate to `Infrastructure > Hosts`
- Play with the filter controls (depending on how fast the user is, it
might hang for a little while, but this won't slow the whole page down)
## Summary
Fixes#158167
The issue occurred because we were using a number called "index" as the
React key prop. When we removed the first element, the second one took
its place, but React still showed the removed element.
To fix this problem, we found a solution by using the uuid field that
each action item has. We now generate it for each new action we create
in the action form and use that as key
I was told to add @pmuellr as you might know if we are missing something
🙇
### Test: why xpath selector?
I had to use the xpath selector to fix a problem we had. The problem was
between two actions we set up. They look the same, but the body content
is the only different (I've attached a screenshot for more details).
We use a third party component for these actions. This component doesn't
have any "value" attribute and doesn't add anything besides the HTML
text. I tried to find other useful details but couldn't find any.
The problem comes up when we try to delete one of the actions. To fix
it, we needed to check if that component was missing. We already have
tools that can look for missing components, but they don't work with the
xpath selector. So, I added a new function that can do this. Now, we can
use the xpath selector to look for missing components and fix the
problem
<details>
<summary>See Screenshot</summary>
<img
src="5447795d-0281-4847-aa85-76d0e5fdec3d"/>
</details>
```[tasklist]
- [x] Make sure that it's ok to generate the uuid
- [x] Test
- [x] Do we need to backport? Versions?
```
## Summary
Fix https://github.com/elastic/kibana/issues/150079
Add support for the `*` wildcard for by-type export, allowing to more
easily export all the exportable SO types
```
POST /api/saved_objects/_export
{
types: '*',
}
```
## Release Note
The savedObjects export API now supports exporting all types using the
`*` wildcard. Please refer to the documentation
for more details and examples.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Prevent Security Solution Cypress tests from parallelizing when run by
the flaky test runner
In pull request and other pipelines, the Cypress security solution
runner is expected to support parallel jobs runs. Several jobs are
spawned with the same command, but with different environment variables.
Each jobs runs a subset of the tests based on the environment variables.
These variables are BUILDKITE_PARALLEL_JOB_COUNT and
BUILDKITE_PARALLEL_JOB.
The Flaky Test Runner is an app that runs many instances of the same
config concurrently in order to determine if any of the tests in the
config are flaky. When the Flaky Test Runner runs our cypress tests,
each job should run all tests instead of a subset.
The flaky test runner sets the following environment variables to
prevent jobs from running a subset of tests:
```
// by setting chunks vars to value 1, which means all test will run in one job
CLI_NUMBER: 1,
CLI_COUNT: 1,
```
These environment variables aren't respected by the Security Solution
Cypress tests. This is also true for other Cypress tests that use the
same code:
* cypress/security_solution_investigations
* cypress/osquery_cypress
This PR introduces a new environment variable: RUN_ALL_TESTS, which
explicitly tells the runner to run all tests instead of a subset. This
causes the runner to ignore BUILDKITE_PARALLEL_JOB_COUNT and
BUILDKITE_PARALLEL_JOB
### Note about other cypress tests
This environment variable will be passed to other Cypress runners that
aren't used or maintained by Security. Specifically:
* cypress/fleet_cypress
* cypress/apm_cypress
Fleet does not appear to support parallelism, while APM does. In the APM
script, a IS_FLAKY_TEST_RUNNER environment variable is created by
reading CLI_COUNT:
09902b1055/.buildkite/scripts/steps/functional/apm_cypress.sh (L13)
```
IS_FLAKY_TEST_RUNNER=${CLI_COUNT:-0}
```
The CLI_COUNT variable isnt affected by this PR, so this should still
work, but it would be possible to use the same variable for both
scripts.
### Other Ways we could do this
We could also modify the our cypress runner to respect CLI_COUNT and
CLI_NUMBER instead of the buildkite parameters. We cannot override the
buildkite parameters via the step definition as that is not supported.
### Validation
When running our Cypress tests via the test runner, it may not be
immediately apparent that there is an issue.
This PR is equivalent to main except a change to a README:
https://github.com/elastic/kibana/pull/159301
Here is a flaky test runner build using that PR. It runs 25 jobs of the
Investigation cypress e2e tests:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2368
Each job should run the same tests (so we can check if they are flaky.)
However job 1 runs these:
* alert_table_action_column.cy.ts
* alerts_cell_actions.cy.ts
<img width="747" alt="image"
src="2090cf9b-0a88-4b28-b7fa-13ce77aa26a3">
And job 2 runs these:
* building_block_alerts.cy.ts
<img width="733" alt="image"
src="bc2f672f-ac48-4f8f-8b8b-0997c2aff874">
#### With the fix
Here is a flaky test runner build, also 25 jobs of the Investigation
cypress e2e tests, but using this PR:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2369
We have some failing tests, as our suite is currently flaky, however you
can see that each job runs all of the tests.
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/158232
Fixes the wrap problem in filter selection modal when the text
field/value is very long
<img width="956" alt="image"
src="beda8e16-6302-4d7e-aa84-0b6884891ccc">
## Summary
Related issue: https://github.com/elastic/kibana/issues/148665
This PR adds a link to the anomaly explorer for the job corresponding to
the anomalies layer in maps. The link is found under 'Source details'
once the anomalies layer is created.
<img width="1291" alt="image"
src="f109ce21-1aec-40c4-8cf1-fc3dedaef199">
## NOTE
This is dependent on the changes in maps
https://github.com/elastic/kibana/pull/159255
### Checklist
Delete any items that are not applicable to this PR.
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Consider taking the following steps:
1. Create a new dashboard and save it
2. Add a control and, without saving,
3. Reset the changes to the dashboard
### Before
Before this PR, we were not updating the control group input if the
`lastSavedControlGroupInput` was `undefined` (which only happens when a
dashboard has **never** been saved with any controls and/or edits to the
control group settings) - this caused a problem when trying to reset a
dashboard from having controls back to the state where
`lastSavedControlGroupInput` was `undefined` because the **dashboard's**
input would get updated as expected (i.e. the dashboard would think it
no longer has any controls), but the control group's input wouldn't get
updated (i.e. the control group would think it **still has** controls).
Because of this discrepancy, the control would stick around until you
refreshed the dashboard:
c9da58dc-3373-493d-9bba-5d2540c19560
### After
Now, after this PR, I fixed this by resetting back to the default
control group input if `lastSavedControlGroupInput` is `undefined` on
reset:
e41838e6-6dbe-47a1-bea7-28f20eddcf80
### Checklist
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
- Adds `const`'s for index patterns for files that are delivered to
hosts/agents
- modifies `createFilesClient.toHost()` (exposed in `Plugin.start()`) to
use these new index names
- Adds code to the package install flow to ensure new file delivery
indexes are created
- The files client factory now validates if the integration name is
allowed to use fleet files functionality.
FYI: PR that will add index mappings to ES:
https://github.com/elastic/elasticsearch/pull/96504
closes#158567.
## Summary
This PR introduces APIKey generation states.
### Changes
- Route `POST
/internal/observability_onboarding/custom_logs/install_shipper_setup`
was split into `GET
/internal/observability_onboarding/custom_logs/install_shipper_setup`
which is now in charge of determining current setup (kibana urls, es
url) and `POST /internal/observability_onboarding/custom_logs/save` is
now in charge of generating the apiKey and save the flow state.
- Dedicated component `ApiKeyBanner` to handle the different states of
the apiKey generation.
### Screenshots
- when ApiKey is being generated, notice the placeholder `$API_KEY` in
script and yaml config
<img width="1120" alt="Screenshot 2023-06-07 at 15 16 03"
src="dbfd4b34-6e2a-4424-91a9-01417451b006">
- when ApiKey has been successfully generated, notice the returned
apiKey in script and yaml config
<img width="1120" alt="Screenshot 2023-06-07 at 15 15 01"
src="def414d1-6938-44f6-b38c-748fb2084f41">
- when an error occurred while generating the ApiKey, notice the
placeholder `$API_KEY` in script and yaml config
<img width="1120" alt="Screenshot 2023-06-07 at 15 13 21"
src="a43e9379-2140-4679-8c37-d91cc7a7155f">
- when user doesn't have required permissions to generate the ApiKey,
notice the placeholder `$API_KEY` in script and yaml config
<img width="1120" alt="Screenshot 2023-06-07 at 15 11 12"
src="75b367c1-295a-41d6-afe1-4e94bd28aafc">
## Summary
In Cases, users can add lens visualizations in a case. The lens's
attributes persist inside the `cases-comments` saved object. If the lens
team adds a migration a migration will run for the `cases-comments` SOs
to migrate any lens visualization inside the case comment. In this PR we
defer the lens migrations to be done on read when it is fetched by
users. This way, the cases comments will not be migrated at Kibana
startup.
Blocker for https://github.com/elastic/kibana/pull/158468
### Checklist
Delete any items that are not applicable to this PR.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
### For maintainers
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
### NOTE: This is a draft PR to MVP the new rule combination
(Threshold). More PRs to follow up
It fixes https://github.com/elastic/kibana/issues/158260 by providing
the _new_ **Threshold rule**
It fixes https://github.com/elastic/kibana/issues/159326
<img width="586" alt="Screenshot 2023-05-30 at 17 55 32"
src="0e485266-d93f-442e-81f4-77aa673ed497">
## ✅ Done
- [x] Clone the Metric threshold and update the imports
- [x] The rule is listed in the rule creation flyout with its params and
preview charts
- [x] Working Rule registry
- [x] Working Rule executor
- [x] Working feature id in the rule registry
- [x] Working alerts table and alert summary
- [x] Use DataView instead of the Metrics indices under settings
- [x] Update the i18n keys
- [x] Fix/Update failing checks/tests. Green CI ✅
- [x] Hide it behind a feature flag
`xpack.observability.unsafe.thresholdRule.enabled`
## 🏗️ To be done (could be irrelevant, or create a separate issue for
it):
- [ ] <del> Remove the `metrics` word </del>
- [ ] <del> Update file and variable names to match the new rule
context.</del>
- [ ] <del> Rearrange files, constants, and exports </del>
## 🎯 DoD
Having the rule working like the Metric threshold one and seeing its
related alerts.
---------
## Summary
Fixes#143493
* Add the switch control in Layer Settings
* [x] Make sure it does not duplicate on Annotation Layer Settings
* [x] Data Layers
* [x] Reference line layers
* [x] Extended dataView picker to support multiple icons
* [x] Added unit tests
* [x] Functional tests
<img width="351" alt="Screenshot 2023-06-07 at 15 28 19"
src="00dc5523-0bec-4e9c-b1d0-4d36804b29f9">
<img width="340" alt="Screenshot 2023-06-07 at 15 31 31"
src="d36ca147-5d8c-4123-9be3-2932844cbd15">
<img width="331" alt="Screenshot 2023-06-07 at 15 28 25"
src="c7d4f166-b8ab-4439-a83c-debf82b913ad">
<img width="324" alt="Screenshot 2023-06-07 at 15 27 59"
src="3738a7e0-6e49-4e22-b857-965a953b4b84">
<img width="323" alt="Screenshot 2023-06-07 at 15 27 53"
src="5965bf1c-0e25-4c0e-b54f-fa315157fd44">
* Create `IgnoreGlobalFilter` shared component folder
* [x] Layer setting control component
* [x] Info badge component
* Extends `esaggs_fn` to support the flag
* [x] Avoid to pass the filter to the handler if set
* [x] Add unit tests
* Notification badges
* [x] Extends the badge component in Embeddable to support grouped
messages
* [x] Added unit tests
<img width="750" alt="Screenshot 2023-06-07 at 15 31 39"
src="01bf8203-9133-4429-9b79-17ec67613c7e">
<img width="828" alt="Screenshot 2023-06-07 at 15 30 57"
src="9acb78f2-d061-4225-a4af-b3a66e7454fc">
<img width="756" alt="Screenshot 2023-06-07 at 15 27 43"
src="b9f79aed-7c02-4060-9c0f-61f438dc031d">
* Add support for Open in Lens
* [x] Add unit tests for each converter
* [x] Functional tests
### Checklist
Delete any items that are not applicable to this PR.
- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>