Commit graph

451 commits

Author SHA1 Message Date
Matthew Kime
65205ab0b7
[data views] Move fields_for_wildcard to internal route (#159637)
## Summary

`/api/index_patterns/_fields_for_wildcard` =>
`/internal/data_views/_fields_for_wildcard`

Part of https://github.com/elastic/kibana/issues/159158
2023-06-14 17:00:26 -05:00
Alejandro Fernández Haro
195216f0ec
[Serverless Telemetry] Add serverless label to inform of the project type (#159549)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 18:05:04 +02:00
Matthew Kime
26d4ba5c3e
[data views] Use versioned router for REST routes (#158608)
## Summary

Version alllll the data view routes.

Best viewed with whitespace hidden -
https://github.com/elastic/kibana/pull/158608/files?diff=unified&w=1

In this PR:
- All REST (public and internal) routes are versioned
- Internal routes are called with version specified
- Internal and public routes are now stored in directories labeled as
such
- All routes have a response schema
- All responses are typed with `response` types, separate from internal
api types. This is to help prevent unacknowledged changes to the api.
- Moves some functional tests from js => ts

For follow up PRs:
- Move to `internal` path for internal routes
- Proper typing and schema for `fields_for_wildcard` filter

Closes https://github.com/elastic/kibana/issues/157099
Closes https://github.com/elastic/kibana/issues/157100

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2023-06-12 22:01:03 -05:00
Pierre Gayvallet
b08c322524
Allow exporting all SO types (#159289)
## 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>
2023-06-12 00:03:54 -07:00
Lukas Olson
34ada8a9a6
[data.search] Use versioned router (#158520)
## Summary

Step 1 of https://github.com/elastic/kibana/issues/157095.

Uses the new versioned router capabilities for the search routes (`POST`
and `DELETE`).

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

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
2023-06-07 10:33:39 +02:00
Peter Pisljar
e3c3ba8aeb
bwca for unified search suggestions route (#158796)
## Summary

Makes unified search field suggestion route bwca

resolves https://github.com/elastic/kibana/issues/157085

- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-02 12:42:41 +03:00
Julia Rechkunova
8d399fe3aa
[UnifiedFieldList] Remove redundant server routes. Create new example plugin for unified field list components and migrate tests. (#158377)
- Closes https://github.com/elastic/kibana/issues/147885
- Closes https://github.com/elastic/kibana/issues/157109

## Summary

**Before:**

Unified Field List plugin has internal routes (wrappers for client code)
which exist only to run api functional tests against them:
 - `/api/unified_field_list/existing_fields/{dataViewId}`
 - `/api/unified_field_list/field_stats`

Client code does not call these routes directly. So there is no reason
in keeping and versioning them.

**After:**
- Internal routes are removed 
- A new "Unified Field List Examples" page was created
http://localhost:5601/app/unifiedFieldListExamples
- API functional tests (which used the routes) were converted to
functional tests against this new example page
- Created a new `unifiedFieldList` page object which is used now in
functional tests (methods are extracted from existing `discover` page
object).

**For testing:**

Steps:
1. Run Kibana with examples: `yarn start --run-examples` 
2. Install sample data
3. And navigate to Developer Examples > Unified Field List Examples
page.

![May-26-2023
13-24-03](5a2149f7-beb8-40a5-b7d5-9eeaabfd42ca)


### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-31 13:25:47 +02:00
Michael Dokolin
a65cd356aa
[Migrations] Add support of deferred migrations (#153117)
* Add deferred migrations parameter.
* Update outdated documents query to take into account deferred migrations.
* Update outdated documents query to take into account the core migration version.
* Update read operations in the saved objects repository to perform deferred migrations.
2023-05-22 11:17:41 +02:00
Julia Rechkunova
d6b29afa2b
[UnifiedFieldList] Move routes to internal (#157893)
Closes https://github.com/elastic/kibana/issues/157081

## Summary

Moving routes to `internal` namespace.
2023-05-21 09:58:40 +02:00
Xavier Mouligneau
e850ef1ad3
Fix issue with single value for fields params (#157930)
## Summary

The interface for fields allow array of string see below but the
validation with `@kbn/config-schema` only allow string. This will allow
to pass fields as array.

<img width="355" alt="image"
src="04c099c6-6a84-49ef-af45-587efa8e508b">


### 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-05-17 08:42:45 -04:00
Sander Philipse
e6fdc8ba45
[Enterprise Search] Add Jira, Confluence, Sharepoint connectors (#157167)
## Summary

This adds Jira, Confluence and Sharepoint connectors to Enterprise
Search.
2023-05-10 05:07:43 -07:00
Davis McPhee
ab2f967ba5
[Data Views] Support "namespaces" param in create data view API (#155815)
## Summary

This work was originally done by @jughosta in #150712, I just added a
couple of integration tests and opened another PR for it.

Fixes #140426.

#### Original PR summary:

This PR adds support for `namespaces` param in create data view API as
per docs
https://www.elastic.co/guide/en/kibana/current/data-views-api-create.html#data-views-api-properties

<img width="300" alt="Screenshot 2023-02-09 at 15 04 55"
src="https://user-images.githubusercontent.com/1415710/217835577-fa4286ff-89f4-4de2-97b0-62c04f756858.png">

Previous functionality is still in place:
* setting "default" space if "namespaces" param is not provided
<img width="300" alt="Screenshot 2023-02-09 at 15 06 55"
src="https://user-images.githubusercontent.com/1415710/217835951-d274c8ba-5bd9-4c36-9487-c2dbd5ce42de.png">

* setting the specified in URL space ID if "namespaces" param is not
provided
<img width="300" alt="Screenshot 2023-02-09 at 15 06 34"
src="https://user-images.githubusercontent.com/1415710/217836019-81f36a16-157f-4ce9-9d19-c5685d633acc.png">

### Checklist

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

### 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: Julia Rechkunova <julia.rechkunova@elastic.co>
2023-05-08 10:03:08 -03:00
Tiago Costa
8569d45a08
skip flaky suite (#156581) 2023-05-05 13:19:42 +01:00
Tiago Costa
fb9422e130
skip flaky suite (#156129) 2023-05-04 15:53:06 +01:00
Lukas Olson
f1360f2e4a
Fix issue with single value for metaFields advanced setting (#155811)
## Summary

Resolves https://github.com/elastic/kibana/issues/94356.

Fixes an issue with the _fields_for_wildcard API when the value for
`metaFields` advanced setting is set to a single value (e.g. `_source`).

### Checklist

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

### Release note

Fixes an issue where having a single value for the advanced setting
`metaFields` would prevent refreshing a data view.
2023-04-27 11:30:29 -07:00
Christiane (Tina) Heiligers
0858b388f4
[Saved Objects] Adds managed to import options (#155677)
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-27 11:17:42 -07:00
Yulia Čech
13fd4f0847
[Guided onboarding] Change the API prefix to /internal (#155643)
## Summary

Fixes https://github.com/elastic/kibana/issues/155611
This PR changes the API prefix to indicate that the endpoints are
intended for internal use only. The plugin has been setup incorrectly
initially with the prefix `/api` that is intended for a public API.
There should not be any changes to the UI or functionality of the
plugin.


### Release Note
Fixed the guided onboarding API prefix to indicate that it's intended
for internal use

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-25 11:21:20 -06:00
Kevin Logan
2fad86a6c5
[Security Solution] Remove index false from artifact saved objects mappings (#155204)
Updates the mappings for the artifact saved objects

This effort is part of
https://github.com/elastic/security-team/issues/6268 and
https://github.com/elastic/dev/issues/2189

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2023-04-25 09:31:57 -04:00
Gerard Soldevila
21351df953
Split the .kibana saved objects index into multiple indices (#154888)
## Description 

Fix https://github.com/elastic/kibana/issues/104081

This PR move some of the SO types from the `.kibana` index into the
following ones:
- `.kibana_alerting_cases`
- `.kibana_analytics`
- `.kibana_security_solution`
- `.kibana_ingest`

This split/reallocation will occur during the `8.8.0` Kibana upgrade
(*meaning: from any version older than `8.8.0` to any version greater or
equal to `8.8.0`*)

**This PR main changes are:**
- implement the changes required in the SO migration algorithm to
support this reallocation
- update the FTR tools (looking at you esArchiver) to support these new
indices
- update hardcoded references to `.kibana` and usage of the
`core.savedObjects.getKibanaIndex()` to use new APIs to target the
correct index/indices
- update FTR datasets, tests and utility accordingly 

## To reviewers

**Overall estimated risk of regressions: low**

But, still, please take the time to review changes in your code. The
parts of the production code that were the most impacted are the
telemetry collectors, as most of them were performing direct requests
against the `.kibana` index, so we had to adapt them. Most other
contributor-owned changes are in FTR tests and datasets.

If you think a type is misplaced (either we missed some types that
should be moved to a specific index, or some types were moved and
shouldn't have been) please tell us, and we'll fix the reallocation
either in this PR or in a follow-up.

## .Kibana split

The following new indices are introduced by this PR, with the following
SO types being moved to it. (any SO type not listed here will be staying
in its current index)

Note: The complete **_type => index_** breakdown is available in [this
spreadsheet](https://docs.google.com/spreadsheets/d/1b_MG_E_aBksZ4Vkd9cVayij1oBpdhvH4XC8NVlChiio/edit#gid=145920788).

#### `.kibana_alerting_cases`
- action
- action_task_params
- alert
- api_key_pending_invalidation
- cases
- cases-comments
- cases-configure
- cases-connector-mappings
- cases-telemetry
- cases-user-actions
- connector_token
- rules-settings
- maintenance-window

#### `.kibana_security_solution`
- csp-rule-template
- endpoint:user-artifact
- endpoint:user-artifact-manifest
- exception-list
- exception-list-agnostic
- osquery-manager-usage-metric
- osquery-pack
- osquery-pack-asset
- osquery-saved-query
- security-rule
- security-solution-signals-migration
- siem-detection-engine-rule-actions
- siem-ui-timeline
- siem-ui-timeline-note
- siem-ui-timeline-pinned-event

#### `.kibana_analytics`

- canvas-element
- canvas-workpad-template
- canvas-workpad
- dashboard
- graph-workspace
- index-pattern
- kql-telemetry
- lens
- lens-ui-telemetry
- map
- search
- search-session
- search-telemetry
- visualization

#### `.kibana_ingest`

- epm-packages
- epm-packages-assets
- fleet-fleet-server-host
- fleet-message-signing-keys
- fleet-preconfiguration-deletion-record
- fleet-proxy
- ingest_manager_settings
- ingest-agent-policies
- ingest-download-sources
- ingest-outputs
- ingest-package-policies

## Tasks / PRs

### Sub-PRs

**Implementation**
- 🟣 https://github.com/elastic/kibana/pull/154846
- 🟣 https://github.com/elastic/kibana/pull/154892
- 🟣 https://github.com/elastic/kibana/pull/154882
- 🟣 https://github.com/elastic/kibana/pull/154884
- 🟣 https://github.com/elastic/kibana/pull/155155

**Individual index split**
- 🟣 https://github.com/elastic/kibana/pull/154897
- 🟣 https://github.com/elastic/kibana/pull/155129
- 🟣 https://github.com/elastic/kibana/pull/155140
- 🟣 https://github.com/elastic/kibana/pull/155130

### Improvements / follow-ups 

- 👷🏼 Extract logic into
[runV2Migration](https://github.com/elastic/kibana/pull/154151#discussion_r1158470566)
@gsoldevila
- Make `getCurrentIndexTypesMap` resillient to intermittent failures
https://github.com/elastic/kibana/pull/154151#discussion_r1169289717
- 🚧 Build a more structured
[MigratorSynchronizer](https://github.com/elastic/kibana/pull/154151#discussion_r1158469918)
- 🟣 https://github.com/elastic/kibana/pull/155035
- 🟣 https://github.com/elastic/kibana/pull/155116
- 🟣 https://github.com/elastic/kibana/pull/155366
## Reallocation tweaks

Tweaks to the reallocation can be done after the initial merge, as long
as it's done before the public release of 8.8

- `url` should get back to `.kibana` (see
[comment](https://github.com/elastic/kibana/pull/154888#discussion_r1172317133))

## Release Note

For performance purposes, Kibana is now using more system indices to
store its internal data.

The following system indices will be created when upgrading to `8.8.0`:

- `.kibana_alerting_cases`
- `.kibana_analytics`
- `.kibana_security_solution`
- `.kibana_ingest`

---------

Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2023-04-25 09:43:42 +02:00
Yulia Čech
bc3471cf26
[Guided onboarding] Dynamic URLs for steps (#154572)
## Summary
Fixes https://github.com/elastic/kibana/issues/143322

This PR adds an option to store dynamic parameters when a step is
completed to be used later for dynamically built URLs.

### How to test
1. Add `xpack.cloud.id: 'testID'` to your `/config/kibana.dev.yml` file
2. Start ES with `yarn es snapshot`
3. Start Kibana with `yarn start --run-examples` 
4. Navigate to the guided onboarding example plugin
`http://localhost:5601/app/guidedOnboardingExample`
5. Start the test guide and when completing step 1 provide any value for
the paramter `indexName`
6. Continue the guide until step 4 and check that the correct value is
being used for the url of this step.

### 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-04-21 18:21:29 +02:00
Christiane (Tina) Heiligers
45449acc01
[Saved Objects] Add a root level managed property to all saved object documents (#154515)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-20 12:14:48 -07:00
Alejandro Fernández Haro
613619bee2
[Telemetry] Use soClient in FTRs (#155175) 2023-04-18 12:38:18 -07:00
Michael Dokolin
768fe1af31
[Migrations] Add migrationVersion property to the Saved Objects API output (#154364) 2023-04-13 12:05:58 +02:00
Jen Huang
4fbc83493a
[Fleet] Sync integration categories and update tutorials and custom integrations (#153216)
## Summary

Part of https://github.com/elastic/integrations/pull/5123. This PR:

1) Syncs hardcoded list of integration categories against the latest
list from [package
spec](24557251ec/categories/categories.yml)
2) Brings the categories used by the "home tutorial" cards and custom
integrations cards in line with the above PR

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-28 20:59:13 -07:00
Stratoula Kalafateli
e01f29e8a6
[Sample data][Flights] Use Lens by value panels where possible (#153634)
## Summary

This PR migrates the flights sample dataset to work with Lens by value
panels instead of legacy visualizations (TSVB, agg based)

Changes:
- Changed the legacy Lens metrics to the new metric
- Changed the tagcloud with a horizontal bar
- Removed the legacy SOs
- Removed the library visualizations and use by value panels instead

Note: The TSVB goal was not converted to Lens as it is not possible atm
to divide with the bucket interval

### How to test
Remove the flights dataset and reinstall it

<img width="1655" alt="image"
src="https://user-images.githubusercontent.com/17003240/227503741-2af87636-12bb-4a95-85ac-a82d8fa94e9d.png">

<img width="1657" alt="image"
src="https://user-images.githubusercontent.com/17003240/227511662-1d4604ba-a82c-478e-bda1-47aea6cc01ba.png">
2023-03-27 13:49:52 +03:00
Matthew Kime
29f038071e
[data views] Remove partial index pattern validation (#153350)
## Summary

https://github.com/elastic/kibana/pull/151788 established that data
views would no longer error when they failed to retrieve a field list.
This index pattern validation code exists since previously ALL index
pattern segments needed to match in order to avoid an error response
from field caps, rather than just one. Now we can remove the validation
code and simply pass the index pattern to field caps directly.


### 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: shahzad31 <shahzad31comp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-03-27 05:34:47 -05:00
Michael Dokolin
17876df41a
[Saved Objects] Update the migrationVersion property to hold a plain string value (#150075)
* Update document migrator to rely on `typeMigrationVersion` instead of `migrationVersion`.
* Refactor document migrator to extract migration pipeline logic.
* Add `core` migration type.
2023-03-24 13:45:30 +01:00
Christiane (Tina) Heiligers
527417590f
Removes FindQueryHTTP['fields'] option in Saved Objects Management (#152306)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-02-28 10:46:08 -07:00
Natali
fa0a29fc54
chore: remove usage for stats endpoint (#151082)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
2023-02-27 19:40:13 +01:00
Alejandro Fernández Haro
58c68c94d4
[Telemetry] Fix OptedOut banner (#151084)
Resolves #135107.
2023-02-14 13:53:55 +01:00
Michael Dokolin
caee8cbe8e
[Saved Objects] Update document migrator not to bump core version on every migration (#150443) 2023-02-10 17:45:49 +01:00
Sander Philipse
a496623003
[Enterprise Search] Add integration tiles for new connectors (#150369)
## Summary

This adds a bunch of integration tiles for our new connectors: Azure
Cloud, Google Cloud, Amazon S3, MS SQL, PostgreSQL and Oracle.
2023-02-07 04:59:48 -07:00
Dima Arnautov
148a49adb8
[Console] Replace global GET /_mapping request with GET <index>/_mapping (#147770)
## Summary

### Notes for reviewers 

- Currently, autocomplete suggestions for fields don't work with
wildcards and data streams due to the
[bug](https://github.com/elastic/kibana/issues/149496) in the `main`. It
should be addressed separately.

### How to test

In order to spot the loading behaviour, ideally you should create an
index with a heavy mappings definition.
Afterwards, write a query that requires a field from this index, e.g.:

```
GET <my-index>/_search
{
  "aggs": {
    "my_agg": {
      "terms": {
        "field": "",
        "size": 10
      }
    }
  }
}
```

Place a cursor next to the `field` property, it should trigger mappings
fetch. After that, the mappings definition for this index will be cached
and accessed synchronously.

You can also open the browser's dev tools and enable Network throttling.
It allows noticing loading behaviour for any index.

--------------------

Resolves https://github.com/elastic/kibana/issues/146855

Instead of fetching all mappings upfront, requests mapping definition on
demand per index according to the cursor position.

Considering there is a maximum response size limit of 10MB in the
`/autocomplete_entities` endpoint, field autocompletion wasn't working
at all if the overall mappings definition exceeded this size. Retrieving
mappings per index tackles this and improves the init time.

![Jan-25-2023
17-16-31](https://user-images.githubusercontent.com/5236598/214616790-4954d005-e56f-49f9-be6d-435c076270a8.gif)

### Checklist

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

---------

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2023-02-06 15:14:51 -05:00
Yulia Čech
8705a6a77b
[Guided onboarding] Registers 3 separate guide IDs for search (#149968)
## Summary
Fixes https://github.com/elastic/kibana/issues/149691 
Follow up to https://github.com/elastic/kibana/pull/149528 

This PR adds 3 separate guide ID values `appSearch`, `websiteSearch` and
`databaseSearch` instead of previously used `search`. With that change,
each card for Search on the landing page has its own independent guide
that can be completed.

Example plugin for guided onboarding is also updated so that all 3
search guides can be managed there. Otherwise there should not be any
UI/UX changes.

Currently, all 3 ids are registered with the same config and that can be
easily updated by the team in the future.

#### Screenshot
<img width="485" alt="Screenshot 2023-01-31 at 18 24 12"
src="https://user-images.githubusercontent.com/6585477/215840343-f9a65be3-0568-40ca-b458-5de92bfe8aaf.png">


### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-06 06:16:26 -07:00
Stratoula Kalafateli
bb207aadc3
[Lens] Remove the deprecated field list sampling strategy (#149482)
## Summary

This PR removes the deprecated field list sampling setting which was
marked as deprecated on 8.1. This
https://github.com/elastic/kibana/pull/139828 was the PR that added the
deprecation callout.
2023-01-26 09:38:21 +02:00
Yulia Čech
e7746b24d5
[Guided onboarding] Register test guide in the example plugin (#147703)
This PR moves the test guide used for testing and dev work to the guided
onboarding package. It is now being registered when the guided
onboarding example plugin is being setup. For that a server side is
added to the example plugin.
Registering the test guide from the example plugin demonstrates how the
"register guide" function can be used for production guides. The test
config needs to be in the `kbn-guided-onboarding` package because
example plugins have some problems importing files from other plugins.
That way the test config is available to the example plugin and to the
guided onboarding plugin for unit and functional tests.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-20 03:29:25 -07:00
Michael Dokolin
091b15e52d
[Saved Objects Management] Encapsulate saved objects deletion behind an API endpoint (#148602) 2023-01-19 15:05:07 +01:00
Alejandro Fernández Haro
30469a427a
[Telemetry] Set telemetry SO as hidden (#147631)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Resolves https://github.com/elastic/kibana/issues/145399
2022-12-20 09:13:36 -07:00
Matthew Kime
9a5df11ea0
[data views] allow fields param to be passed to field caps request (#147666)
## Summary

Adds new optional `fields` argument to the data view fields for wildcard
api that allows the consumer to request only specific fields as opposed
to always getting all fields.

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
2022-12-20 07:23:40 -06:00
Yulia Čech
d1e7f50426
[Guided onboarding] Update guide IDs (#147348)
## Summary

Fixes https://github.com/elastic/kibana/issues/144452

This PR updates the guide IDs used in guided onboarding from generic
values (`observability` and `security`) to more specific values
(`kubernetes` and `siem`) which will allow us to add more guides for
observability and security in the future.


### 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
2022-12-14 15:51:51 +01:00
Christiane (Tina) Heiligers
f7706252fd
Removes module core/server/types (#147223)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
fix https://github.com/elastic/kibana/issues/145065
2022-12-13 09:20:04 -07:00
Yulia Čech
525ad3d6e0
[Guided onboarding] Register config for guides (#146784)
## Summary
Fixes https://github.com/elastic/kibana/issues/145878
Fixes https://github.com/elastic/kibana/issues/145880 

This PR adds a new function to the guided onboarding server side plugin
that allows other plugins to register a guide config. The existing guide
configs are also moved to their corresponding solution plugins.

Note: we are currently using generic IDs `search`, `security`,
`observability` for guides but we will update them to a more specific
IDs in a follow up PR (see
https://github.com/elastic/kibana/issues/144452).

### Checklist

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-12 04:09:59 -07:00
Matthew Kime
bf103ef725
[data views] Support include_unmapped in field caps request (#146953)
## Summary

Allows data views API `getFieldsForWildcard` to support
`include_unmapped` param.

Closes https://github.com/elastic/kibana/issues/144772
2022-12-06 07:31:30 -06:00
Yulia Čech
e7da574c5d
[Guided onboarding] Add guide config route (#146149)
## Summary
Fixes https://github.com/elastic/kibana/issues/145871
Fixes https://github.com/elastic/kibana/issues/145875
This PR adds an internal API endpoint that returns all existing config
guides. The client side code (api service) is updated to use the
endpoint instead of a guide configs file.

Note: This PR deletes the docs link for the kube-state-metrics from the
"Add data" step in the Kubernetes guide. I opened
https://github.com/elastic/kibana/issues/146404 to follow up on this.

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 09:44:20 +01:00
Yulia Čech
879b101669
[Guided onboarding] Update header button logic (#144634)
## Summary
Fixes https://github.com/elastic/kibana/issues/141129
Fixes https://github.com/elastic/kibana/issues/144515

This PR introduces a new state to the guided onboarding plugin. The
state keeps track of the `creationDate` and of the overall `status` of
the plugin. The creation date allows us to detect an "active" period
during which the header button will be displayed more prominently in the
header. Currently, the active period is set to 30 days. During this
time, if the user has not started any guide, has quit a guide before
completion or skipped the guide on the landing page, the header button
will be displayed and when clicked, redirect the user to the landing
page to start/continue a guide.
Also this PR adds a check for Cloud deployments and prevents the code
from sending any API requests when not on Cloud, because guided
onboarding is disabled on prem.

#### Screenshot 
<img width="298" alt="Screenshot 2022-11-10 at 18 42 18"
src="https://user-images.githubusercontent.com/6585477/201168414-391a7cd4-0709-492b-9001-1432b5bed3c8.png">



### Checklist

- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-14 16:50:10 -07:00
Muhammad Ibragimov
0e0140181f
[Console] Fix autocomplete_entities API crash when response size is too big (#140569)
Fixes https://github.com/elastic/kibana/issues/144310

### Summary

This PR addresses the issue of the Kibana instance restarting when the
response size is too big for the `autocomplete_entities` API. This
happens when a cluster has a large number of mappings and we try to
retrieve them all on the server side with
`esClient.asInternalUser.indices.getMapping()`. esClient does not handle
large responses well and throws an error that causes the Kibana instance
to restart. As node's max [string
length](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#description)
is 2^28-1 (~512MB) if the response size is over 512MB, it will throw an
error with the message "Invalid string length".

The fix is to use the raw http request to retrieve the mappings instead
of esClient and check the response size before sending it to the client.
If the response size is too big, we will return an empty object and log
the error in the server logs.

#### Proposed changes

- Remove ES JS client requests and use native Node.js HTTP client
instead
- Limit the response size to 10MB for the `autocomplete_entities` API

#### How to test this PR locally
To test this out, you will need to connect Kibana to a remote cluster
with a large number of mappings. We created a patch file that you can
apply to your local Kibana instance to test this PR. Since the patch
file contains credentials, we can't share it publicly. Please reach out
to me if you would like to test this PR. I will share the patch file and
the instructions to apply it.

Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
2022-11-11 15:43:52 +05:00
Rudolf Meijering
e476028e68
Bump field limit for esArchiver indices using kibana package version template var (#144272) 2022-11-01 15:00:29 -06:00
Tim Rühsen
8b0145c3a1
Support brotli compression on the server side (#142334)
* Use brotli compression

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Add integration test for brotli support

* Use import instead of require()

* Suppress build error on importing brok

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* add brok as explicit package dep

* add `server.compression.brotli` config settings

* update documentation

* fix test utils

* fix more test configs

* add tests for endpoints too

* remove against endpoint for now

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
2022-10-24 15:33:21 +02:00
Shahzad
ea704af6d4
[Saved Objects] Added created_at field in saved objects (#143507) 2022-10-20 12:57:53 +02:00
Sébastien Loix
0e6fa006c1
[SavedObjectClient] Add support to exclude references when searching (#142479) 2022-10-04 04:19:22 -07:00