Commit graph

66130 commits

Author SHA1 Message Date
Alex Szabo
d0231b995a
Disable serverless alerting tests that cause errors in main (#164027)
## Summary


https://elastic.slack.com/archives/C5UDAFZQU/p1692168189310379
2023-08-16 11:56:45 +02:00
Achyut Jhunjhunwala
431e50554d
[APM] Fix styling and port issue with new onboarding (#163922)
## Summary

Closes https://github.com/elastic/kibana/issues/163441

Fixes:
- Node JS tab padding issue (Serverless)
- Make fields for OTel Copyable (Both Serverless and Stateful)
- Add port to all the Managed Service URL links for all Agents
(Serverless)

### Before

![Before
Issues](83b27057-aee9-46f4-beb5-ecdc9bf71418)

### After

![After
FIx](5a5d43cf-2597-4904-a570-dd5943c86a6f)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-16 10:50:47 +02:00
Jordan
a90a14b4af
[Cloud Security] Add AWS Org instructions (#163952) 2023-08-16 11:44:16 +03:00
Yara Tercero
a72520f9b2
updating tags to reflect status in serverless (#164006)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2023-08-16 10:40:47 +02:00
Søren Louv-Jansen
5459cbf490
[APM] Diagnostics: Add support for cloudId and apiKey (#160959)
Adds support for cloud id and api key:

```
node ./x-pack/plugins/apm/scripts/create_diagnostics_bundle.js \
  --cloudId mydeployment:ZXVyb3BlLXdlc3QyLmdjcC5lbGFzdGljLWNsb3VkLmNvbTo0NDMkYWJjZGVmZyRoaWprbG1u \
  --apiKey foobarbaz
```

It is still possible to use username, password and host urls
```
node ./x-pack/plugins/apm/scripts/create_diagnostics_bundle.js \
  --kbHost https://mydeployment.kb.europe-west2.gcp.elastic-cloud.com:9243 \
  --esHost https://mydeployment.es.europe-west2.gcp.elastic-cloud.com:9243 \
  --username elastic \
  --password very_secret
```
2023-08-16 10:18:51 +02:00
Maxim Kholod
b66123aba6
[Cloud Security] do not filter vulnerabilities without resource.name (#163930)
## Summary

as a part of an effort to remove the vulnerability documents filter in
https://github.com/elastic/security-team/issues/7146 this PR removes the
filter for missing `resource.name` field. While doing so we need to
handle the missing resource.name in the CNVM UX in multiple places:

 Vulnerabilities data grid without grouping. 
We used to have `Resource` column which under the hood was
`resource.name` column. Added `Resource ID` and renamed `Resource` into
`Resource Name` to be explicit
<img width="1728" alt="Screenshot 2023-08-15 at 14 50 34"
src="21218b9d-1fd0-4e7a-9e95-5d0328909515">

 Vulnerability Fly Out
Added `Resource ID` and renamed `Resource` into `Resource Name` to be
explicit
<img width="1728" alt="Screenshot 2023-08-15 at 14 50 48"
src="cd85f100-df64-49c0-bd49-cec22aa0059c">

 Resource vulnerabilities data gird
removed `Resource` column from the grid as it brings the duplicated data
which is already present in the header. As an alternative we can add
`Resource ID` and `Resource Name` to be consistent with other data grids
but the data in these columns will be the same for every document
<img width="1728" alt="Screenshot 2023-08-15 at 14 51 10"
src="f05f3313-4bde-48fa-abe4-bdcaffabe0a5">

 Vulnerabilities grouped by resource
no changes as we already had `Resource ID` and `Resource Name` there
<img width="1728" alt="Screenshot 2023-08-15 at 14 50 59"
src="f1b0ea42-c62f-447f-abcd-a482d4dcd7c2">

 CNVM dashboard
no changes as we already had `Resource ID` and `Resource Name` there
<img width="720" alt="Screenshot 2023-08-15 at 16 56 07"
src="9e950656-cb63-484e-9fe8-1bbe6d68aaac">


fixes:
- https://github.com/elastic/security-team/issues/7343

### 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
2023-08-16 10:13:27 +02:00
Carlos Crespo
ad5c9d805a
[Infra UI] Refactor host view and asset details dashboards configuraton (#163918)
closes [#163797](https://github.com/elastic/kibana/issues/163797)

## Summary

This PR extracts the dashboard configuration from the components that
renders them to common. This aims to make discoverability and
maintainability easier.

It doesn't change any functional behaviour


### How to test

- Start a local kibana instance
- Navigate to `Infrastructure` > `hosts`
- Verify if the charts still work as expected
2023-08-16 09:01:48 +02:00
Pablo Machado
a41efea31c
[Security Solutions] Fix Serverless page title (#163911)
## Summary

Refactor useUpdateBrowserTitle to use pathname instead of SpyRoute



### 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
2023-08-16 08:18:11 +02:00
Kibana Machine
f7fdfd1bcb
[api-docs] 2023-08-16 Daily api_docs build (#164005)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/431
2023-08-16 00:51:45 -04:00
Tiago Costa
ead10e134b
skip failing es promotion (#163998) 2023-08-16 01:02:36 +01:00
Nick Clark
694c1f89e0
Add detail in docs for histogram indicator type (#163905) 2023-08-15 19:31:57 -04:00
Alexi Doak
bf3dc72ad1
[ResponseOps][Alerting] Add test coverage for Alerting in serverless (#163753)
Resolves https://github.com/elastic/response-ops-team/issues/124

## Summary

Adds alerting serverless tests! I copied over from this test file
`x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/alerts.ts`

Ran in the QA environment to verify tests are passing
2023-08-15 13:42:37 -07:00
Tiago Costa
aef652f550
skip failing es promotion suites (#163971) 2023-08-15 20:48:19 +01:00
Rachel Shen
54d11a964c
[Reporting] Allow custom roles to use image reporting in dashboard (#163873)
## Summary

This PR fixes a bug mentioned in
https://github.com/elastic/sdh-kibana/issues/4016 from
https://github.com/elastic/kibana/pull/153429 where users with custom
roles should allow them the ability to generate reports (with
`xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't
arise for users with all privileges.

- set xpack.reporting.roles.enabled false in the kibana.yml 
- load sample data 
- create a custom role where the index (whatever sample data index you
want) has the read and view_index_metadata privilege.
- Add the Kibana privilege for all spaces Analytics > Dashboard >
Generate PDF or PNG Reports and Download Csv reports from Saved Search
panels. Create the global privilege and then the role.
- Apply that role to a new user and log in using that user. 


## Before 

You can see in the console that usesUiCapabilitie in
register_pdf_png_reporting.tsx is true

<img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM"
src="f6b567fa-3fbd-4039-aa64-fd28bb4534fb">


## After
<img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM"
src="1e4ade9e-332c-4431-954a-38e8a16d4131">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 12:42:06 -07:00
Jonathan Budzenski
ec999e8e46 skip suite failing es promotion (#163970) 2023-08-15 14:41:02 -05:00
Nathan Reese
ccc86610bc
[controls] mock getFactory in control unit tests (#163752)
ControlGroupEmbeddable.addOptionsListControl results in
Container.onPanelAdded adding embeddable. If Containter.getFactory does
not return an embeddable, the added embeddable is an `ErrorEmbeddable`.

```
private async onPanelAdded(panel: PanelState) {
    this.updateOutput({
      embeddableLoaded: {
        ...this.output.embeddableLoaded,
        [panel.explicitInput.id]: false,
      },
    } as Partial<TContainerOutput>);
    let embeddable: IEmbeddable | ErrorEmbeddable | undefined;
    const inputForChild = this.getInputForChild(panel.explicitInput.id);
    try {
      const factory = this.getFactory(panel.type);
      if (!factory) {
        throw new EmbeddableFactoryNotFoundError(panel.type);
      }

      // TODO: lets get rid of this distinction with factories, I don't think it will be needed after this change.
      embeddable = isSavedObjectEmbeddableInput(inputForChild)
        ? await factory.createFromSavedObject(inputForChild.savedObjectId, inputForChild, this)
        : await factory.create(inputForChild, this);
    } catch (e) {
      embeddable = new ErrorEmbeddable(e, { id: panel.explicitInput.id }, this);
    }
```


This PR updates all control embeddable tests to ensure returned
embeddable is of expected type that tests are not running against an
`ErrorEmbeddable`.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 13:20:18 -06:00
Abdul Wahab Zahid
95d607bab0
Unskip useQueryBar unit test. (#163963)
Resolves #112677 

## Summary

Unskip test.
2023-08-15 21:13:57 +02:00
Jonathan Budzenski
9aaf16840d skip suite failing es promotion (#156245) 2023-08-15 13:53:43 -05:00
Kibana Machine
95d989f26c skip failing test suite (#163950) 2023-08-15 14:47:12 -04:00
Kibana Machine
7bdb53bada skip failing test suite (#159194) 2023-08-15 14:46:53 -04:00
Brandon Morelli
df8a738d1b
Update advanced-options.asciidoc (#163850)
Docs for https://github.com/elastic/kibana/pull/163823.
2023-08-15 11:10:26 -07:00
Gloria Hornero
f9c9722c6f
[Security Solution][Serverless] Reusing Cypress tests for Serverless infrastructure (#162698)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2023-08-15 19:50:54 +02:00
Kevin Logan
e09de7dda4
[Security Solution] Relax Endpoint metadata not found logging level (#163209)
## Summary

This PR cleans up an error that we threw every time we called the
Endpoint metadata service and did not find the relevant Endpoint ID.
This happens when we look at Alerts and look up the Endpoint ID to see
if it is a deployed Endpoint. It is a valid result that that we do not
find the Endpoint and therefore disable actions such as Response Actions
and Endpoint Exceptions.

Before we were throwing errors in Kibana logs which was confusing users.
With this change, we move the log to `debug` and respond with a "Not
Found".

Log in debug with this PR:
<img width="1728" alt="image"
src="f781fc34-0807-4d9d-b931-a2ce1acaf9eb">

More information in this ticket:
https://github.com/elastic/security-team/issues/6931

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 13:31:10 -04:00
Bena Kansara
c180112b09
Add KQL filtering in APM rules (#163825)
Resolves https://github.com/elastic/apm-dev/issues/929

Adds KQL filtering to the following APM rules:
- Latency threshold rule
- Failed transaction rate rule
- Error count threshold rule

### KQL Filter ON
<img width="598" alt="Screenshot 2023-07-31 at 16 45 13"
src="277ac4c1-a542-4efe-bd0c-c2bccfac1a6c">

### KQL Filter OFF
<img width="602" alt="Screenshot 2023-07-31 at 16 47 23"
src="f790ed56-d83d-4732-aa3e-4d7778926fbb">

### Note
Opening a new PR as https://github.com/elastic/kibana/pull/163307 pinged
many teams after merging to main. Removing teams from reviewers list
doesn't unsubscribe them from notifications.
2023-08-15 10:21:55 -07:00
Brandon Kobel
a13b6787b0
Adding serverless circuit breakers for alerting rules and actions (#163835)
## Summary

Setting circuit breakers for alerting rules and actions as previously
agreed upon in: [2023-07 Serverless Alerting Circuit
Breakers](https://docs.google.com/document/d/1Ux5IMgay5G0fAmYpVPr6WTFtE9yhutFYf_dPAfEPa5s/edit)
2023-08-15 13:14:48 -04:00
Dima Arnautov
fb6ac2e445
[ML] AIOps: Add/edit change point charts embeddable from the Dashboard app (#163694) 2023-08-15 19:10:07 +02:00
Dima Arnautov
39f2a2567a
[ML] Hide paging controls in swim lane if only one page is available (#163931) 2023-08-15 19:09:19 +02:00
christineweng
005234df87
[Security Solution][Alert Details] Expandable flyout - host and user overview ui updates (#163896)
## Summary

This PR updates properties of host and user over to be displayed in
expandable flyout -> right section -> Insights.

User section
- Replaced IP with user domain
- Added fall back (last seen date) if risk score is not available
(without proper license)
- Removed tech preview icon

Host section
- Replaced IP with host os family
- Added fall bask (last seen date) if risk score is not available
(without proper license)
- Removed tech preview icon


![image](06f2c0fd-ed9d-49e1-b9c2-144da23fed95)

**How to Test**
- add `xpack.securitySolution.enableExperimental:
['securityFlyoutEnabled']` to the `kibana.dev.json` file
- go to the Alerts page, and click on the expand detail button on any
row of the table
- click on `Overview`, `Insights`, `Entities`

### 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
2023-08-15 10:07:44 -07:00
Jiawei Wu
0ee8b1a0b0
[RAM] Unskip Bulk Edit E2E Test and Fix Small Bug (#163888)
## Summary
Resolves: https://github.com/elastic/kibana/issues/138050
Unskips the bulk edit e2e test, also fixes a small bug where we were not
mapping the `mapped_params` in the rule transforms.

### 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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 10:00:56 -07:00
Sander Philipse
d5a3ed1dee
[Serverless] Add deployment URL (#163925)
## Summary

This adds a link to the concrete project in Serverless ES3. We can't
link to performance directly because that has been descoped for now.
2023-08-15 18:31:22 +02:00
Tim Sullivan
9da44e3571
[Reporting/Docs] Tighten the language around CSV settings (#163505)
## Summary

Docs request to tighten the language around csv.maxSizeBytes on this
[page](https://www.elastic.co/guide/en/kibana/8.8/reporting-settings-kb.html#reporting-csv-settings).

- [x] test the links

Closes: https://github.com/elastic/kibana/issues/159112
Replaces: https://github.com/elastic/kibana/pull/161189

---------

Co-authored-by: Amy Jonsson <amy.jonsson@elastic.co>
Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
2023-08-15 09:18:49 -07:00
Karl Godard
0651662159
[Cloud Security] Aws credentials cleanup (#163528)
## Summary

The various unused credential methods supported by both the KSPM->EKS
and CSPM->AWS methods are not cleared out when a package is saved. As
there are currently two components on the frontend which allow the user
to specify their aws credential method, I've added hooks for both the
'packagePolicyCreate' and 'packagePolicyUpdate' methods in fleet to the
CSP serverside plugin. Both these hooks will pass the policy to a
cleanCredentials function which checks the 'aws.credentials.type' var to
determine which fields should be cleared out.

### 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
2023-08-15 08:00:22 -07:00
Maxim Kholod
eb3002eb65
[Cloud Security] Findings Onboarding "not-installed" FTR tests (#163722)
## Summary

This PR adds FTR tests for "not-installed" states of Findings page

Contributes to:
- https://github.com/elastic/kibana/issues/155657

## How to test
run in separate terminals
```
yarn test:ftr:server --config x-pack/test/cloud_security_posture_functional/config.ts
```
and 
```
yarn test:ftr:runner --include-tag=cloud_security_posture_findings_onboarding --config x-pack/test/cloud_security_posture_functional/config.ts
```
2023-08-15 16:59:19 +02:00
Alex Szabo
819d304210
[Ops] Change dev-cli's config merging logic (#163928)
## Summary
Change config merging behaviour, so that arrays are not
merged/concatenated but replaced.

Closes: #162842 

Related to: https://github.com/elastic/kibana/pull/161884

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 16:58:51 +02:00
Francesco Gualazzi
53d2275c9e
Profiling: amend Add Data page instructions with stack release versions (#163884)
## Summary

* amend the "Add Data" page to use artifacts download URLs from the
official channels
* fetch and propagate stack version of Kibana in the instructions, to
bind stack version on the agent
* minor correction to the package titles to display nicer names in Fleet
agent page

### 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] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### 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)

---------

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Co-authored-by: Cauê Hironimuz Marcondes <caue.marcondes@elastic.co>
2023-08-15 07:47:52 -07:00
Shahzad
4c1428377a
[Uptime] Use stack version to determine appending synthetics-* (#163800)
Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
2023-08-15 16:31:24 +02:00
Khristinin Nikita
cd65fbbacb
## Risk score from new Risk Engine showing in UI (#163237)
## Risk score from new Risk Engine showing in UI

What happened in this pr:

1. We create the latest transform and index on the `init` call when we
install resources for Risk Engine. The original plan was to just get
some API layer around our datastream with historical data. But it's not
possible in one all to achieve pagination/sorting/filtering of risk
scores, so we decided to create transforms.

Latest transform: `risk_score_latest_transform_${spaceId}`
Latest Index: `risk-score.risk-score-latest-${spaceId}`

2. To get the risk score to UI we use the existing search strategy from
the old risk score module, and just pass the new index to the search

3. UI are the same except for the single host/user risk score page, when
we change the explanation parts and instead of the old UI, we will show
alerts table with grouping etc.

<img width="1365" alt="Screenshot 2023-08-09 at 16 19 20"
src="0a850b2e-d3d5-4b06-948d-c129dbf754f0">


4. Temporarily pass experimentalFeutres to rule wrapper and bulk create
as we need to know, which index to use for alert enrichment on ingest
time. It will be removed after we decide to release a new Risk Engine

5. Limiting to have only 2 risk scores per kibana
<img width="972" alt="Screenshot 2023-08-10 at 16 00 42"
src="9cc3c545-2ace-42d9-a2f3-ff771c7e5abd">
Because of limited timeframe before FF, majority of UI tests will be
added after FF

## How to test

`xpack.securitySolution.enableExperimental: ['riskScoringRoutesEnabled']
`

- Go to Settings -> Entity 

Risk Score
- Enable risk score module
- Generate some alerts with host.name or user.name
- Call from Kibana console calculation API
```
POST kbn:/api/risk_scores/calculation
{
      "data_view_id": ".alerts-security.alerts-default",
      "identifier_type": "user",
      "range": { "start": "now-30d", "end": "now" }
  }
  POST kbn:/api/risk_scores/calculation
{
      "data_view_id": ".alerts-security.alerts-default",
      "identifier_type": "host",
      "range": { "start": "now-30d", "end": "now" }
  }
```
- Go to Security / Explore / Hosts / Hosts Risk and see risk scores
- - If host page not available because it's required integrations, easy
fix to create filebeat index
```
PUT filebeat-8.10
{
  "mappings": {
    "properties": {
      "@timestamp": {
        "type":"date"
      },
      "host": {
        "type": "object", 
         "properties": {
           "name": {
             "type": "keyword"
           }
         }
      }
    }
  }
}
```
- Click on any and go to the single host/user risk page and go to
Host/User risk tab
- Observe the alerts table for top risk core contributors

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2023-08-15 16:25:22 +02:00
Rachel Shen
897e5cbf83
[Reporting] Serverless readme additions (#163308)
## Summary

Closes #163222 


### Checklist
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2023-08-15 08:24:36 -06:00
Janki Salvi
1774c0c942
add e2e for persist draft check with existing comment (#163811)
## Summary

fixes https://github.com/elastic/kibana/issues/156741

Scenario | Old Test | Functional test where it is covered
-- | -- | --
'checks draft comment persist behaviour with another markdown user
action update' | 'it should persist the draft of new comment while
existing old comment is updated' | 'should persist the draft of new
comment while old comment is updated'

<br class="Apple-interchange-newline">

### Flaky test runner: 
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2869


### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 16:24:06 +02:00
Ido Cohen
c2c1e076a4
[Cloud Security][usage collector] enhance cloud security metering (#163828) 2023-08-15 17:22:30 +03:00
Nikita Indik
07312bf087
[Security Solution] Prebuilt rule installation / upgrade flyout (#163304)
**Addresses:** https://github.com/elastic/kibana/issues/162334

## Summary

This PR adds a flyout for viewing a prebuilt rule before installing or
updating it. The flyout can be opened by clicking on a rule title within
"Add Elastic Rules" page and within "Rule Updates" tab of the Rule
Managament table.

I plan to add tests and do minor visual tweaks after the FF.

<img width="1269" alt="Screenshot 2023-08-14 at 03 59 30"
src="c8200ff8-fbe2-445a-a03e-3545ea77f750">

An additional goal of these changes was to create lightweight reusable
components for rule details sections ("About", "Definition", "Schedule")
and for rule properties, so that these can later be reused in other
flyouts within the Security Solution, on MITRE ATT&CK™ overview page and
potentially on the Rule Details page.
These reusable section components are basically copy-pasted components
from the Rule Details page that were refactored to remove the dependence
from the form schema,

### 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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)
2023-08-15 16:05:01 +02:00
Adam Demjen
8706702aea
[Enterprise Search] Add update index mappings step to ML pipeline config workflow (#163723)
## Summary

This PR adds a new step to the ML inference pipeline creation workflow:
a note to update mappings.

This new step doesn't make any changes in the background. Instead it
lets the user know that the index mappings need to be updated manually
to accommodate the inference output fields before the pipeline can be
used (for example a `dense_vector` field).

For ELSER pipelines the mappings are updated automatically, so the
callout is an FYI panel instead of a required step.

The logic for controlling the state of steps is also improved, making
the UX look more like walking through the steps.


Creating non-ELSER pipeline

![updat_mappings_non_elser](3b03fdeb-8bb9-4275-9f91-1ee49f2c5a10)

Creating ELSER pipeline

![update_mappings_elser](ced48dbf-a0bf-4330-acdb-6b8b26c35a65)

Attaching pipeline

![update_mappings_attach](79c47457-ec9d-4c54-a575-e2052f06a337)

### 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)
- [ ]
[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] 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))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 07:03:20 -07:00
Pierre HILBERT
396d04a962
Telemetry: collect components status (#163912)
## Summary

Querying agent components status to add to telemetry.
Depends on https://github.com/elastic/elasticsearch/pull/98471

### 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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 06:36:53 -07:00
amyjtechwriter
f4381ac0d0
[OAS] Create runtime field API (#163776)
This PR drafts openAPI specifications for:

- [Create runtime field
API](https://www.elastic.co/guide/en/kibana/master/data-views-runtime-field-api-create.html).
- [Upsert runtime field
API](https://www.elastic.co/guide/en/kibana/master/data-views-runtime-field-api-upsert.html)

Relates to https://github.com/elastic/kibana/issues/137240
2023-08-15 14:31:05 +01:00
Jedrzej Blaszyk
82531f8f9d
Crawler custom scheduling UI (#163425)
## Summary

Closes: https://github.com/elastic/enterprise-search-team/issues/5182 

Adding custom crawler scheduling UI.


1750e40a-12ca-48c3-a7c9-9f23dfa4b910

## Release note

UI for crawler that enables to register multiple schedules with
different crawl configurations.
2023-08-15 06:16:09 -07:00
Tiago Costa
df03df0d0a
skip flaky suite (#159696) 2023-08-15 14:08:58 +01:00
Tiago Costa
54acc2ba2d
skip flaky suite (#159695) 2023-08-15 14:08:25 +01:00
Sander Philipse
2081139af6
[Search] Enable content app without Enterprise Search present (#163738)
## Summary

This enables the content plugin within Search when Enterprise Search is
not up. Crawler indices are made inaccessible as disentangling their
logic is too complicated to make sense.



300236c8-06b6-4052-8ed0-adb6f2a64564



88faba9a-cb49-412c-84e3-394e04bb04c4


62dc5d5d-a6c5-4d18-969a-2da971adb794

feature
2023-08-15 05:53:28 -07:00
Nicolas Chaulet
1c0d656ae1
[Fleet] Fix Fleet server host default conflict creation (#163826) 2023-08-15 08:35:44 -04:00
Yulia Čech
3efc0a7c45
[Index Management] Add an index details page behind a dev feature flag (#163521)
## Summary
This PR adds a dev feature flag
`xpack.index_management.dev.enableIndexDetailsPage` that will allow us
to build out the new index details page in small iterations. Without the
flag, the UI of Index Management is not changed. A skeleton component is
created for the details page (see screenshot below).

### How to test
1. Test the Index Management UI (Indices tab) without the flag and check
that no changes were introduced
1. Add `xpack.index_management.dev.enableIndexDetailsPage: true` to the
file `/config/kibana.dev.yml`
2. Navigate to the Indices tab in Index Management, toggle "hidden
indices" if no indices exist and click any index name
3. Check that the new index details page is displayed
4. Check that the tabs on the page are working

### Screenshots 
<img width="1209" alt="Screenshot 2023-08-09 at 19 17 46"
src="e654ef36-ccf3-40a4-8c7b-750b83defef5">

### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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>
2023-08-15 04:11:54 -07:00