Commit graph

841 commits

Author SHA1 Message Date
Davis McPhee
b53d3990a2
[Saved Queries] Rework saved query privileges (#202863)
## Summary

This PR reworks saved query privileges to rely solely on a single global
`savedQueryManagement` privilege, and eliminates app-specific overrides.
This change simplifies the security model for users, fixes bugginess in
the saved query management UI, and reduces code complexity associated
with maintaining two separate security mechanisms (app-specific
overrides and global saved query management privileges).

### Background

Saved queries allow users to store a combination of KQL or Lucene
queries, filters, and time filters to use across various applications in
Kibana. Access to saved query saved objects are currently granted by the
following feature privileges:
```json
[
  "feature_discover.all",
  "feature_dashboard.all",
  "feature_savedQueryManagement.all",
  "feature_maps.all",
  "feature_savedObjectsManagement.all",
  "feature_visualize.all"
]
```

There is also a saved query management UI within the Unified Search bar
shared by applications across Kibana:
<img
src="https://github.com/user-attachments/assets/e4a7539b-3dd4-4d47-9ff8-205281ef50e3"
width="500" />

The way access to this UI is managed in Kibana is currently confusing
and buggy:
- If a user has `feature_discover.all` and `feature_dashboard.all` they
will be able to load and save queries in Discover and Dashboard.
- If a user has `feature_discover.all` and `feature_dashboard.read` they
will be able to load queries in both Discover and Dashboard, but only
save queries in Discover (even though they have write access to the SO,
and API access). Instead they have to navigate to Discover to save a
query before navigating back to Dashboard to load it, making for a
confusing and frustrating UX.
- Access to the UI is even more confusing in apps not listed in the
above feature privileges (e.g. alerting, SLOs). Some of them chose to
check one of the above feature privileges, meaning users who otherwise
should have saved query access won't see the management UI if they don't
also have the exact feature privilege being checked. Other apps just
always show the management UI, leading to bugs and failures when users
without one of the above feature privileges attempt to save queries.

### Existing improvements

In v8.11.0, we introduced a new ["Saved Query
Management"](https://github.com/elastic/kibana/pull/166937) privilege,
allowing users to access saved queries across all of Kibana with a
single global privilege:
<img
src="https://github.com/user-attachments/assets/ccbe79a4-bd0b-4ed6-89c9-117cc1f99ee2"
width="600" />


When this privilege is added to a role, it solves the
`feature_discover.all` and `feature_dashboard.read` issue mentioned
above. However, it does not fix any of the mentioned issues for roles
without the new privilege. We have so far postponed further improvements
to avoid a breaking change.

### Approach

To fully resolve these issues and migrate to a single global privilege,
these changes have been made:
- Remove saved query SO access from all application feature privileges
and instead only allow access through the global saved query management
privilege.
- Stop relying on application feature privileges for toggling the saved
query management UI, and instead rely on the global privilege.

To implement this with minimal breaking changes, we've used the Kibana
privilege migration framework. This allows us to seamlessly migrate
existing roles containing feature privileges that currently provide
access to saved queries, ensuring they are assigned the global saved
query management privilege on upgrade.

As a result, we had to deprecate the following feature privileges,
replacing them with V2 privileges without saved query SO access:
```json
[
  "feature_discover.all",
  "feature_dashboard.all",
  "feature_maps.all",
  "feature_visualize.all"
]
```

Each area of code that currently relies on any of these feature
privileges had to be updated to instead access `feature_X_V2` instead
(as well as future code).

This PR still introduces a minor breaking change, since users who have
`feature_discover.all` and `feature_dashboard.read` are now able to save
queries in Dashboard after upgrade, but we believe this is a better UX
(and likely the expected one) and worth a small breaking change.

### Testing
- All existing privileges should continue to work as they do now,
including deprecated V1 feature privileges and customized serverless
privileges. There should be no changes for existing user roles apart
from the minor breaking change outlined above.
- Check that code changes in your area don't introduce breaking changes
to existing behaviour. Many of the changes are just updating client UI
capabilities code from `feature.privilege` to `feature_v2.privilege`,
which is backward compatible.
- The `savedQueryManagement` feature should now globally control access
to saved query management in Unified Search for all new user roles.
Regardless of privileges for Discover, Dashboard, Maps, or Visualize,
new user roles should follow this behaviour:
- If `savedQueryManagement` is `none`, the user cannot see or access the
saved query management UI or APIs.
- If `savedQueryManagement` is `read`, the user can load queries from
the UI and access read APIs, but cannot save queries from the UI or make
changes to queries through APIs.
- If `savedQueryManagement` is `all`, the user can both load and save
queries from the UI and through APIs.

### 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]
[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
- [ ] 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)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

This PR risks introducing unintended breaking changes to user privileges
related to saved queries if the deprecated features have not been
properly migrated, and users could gain or lose access to saved query
management on upgrade. This would be bad if it happened, but not overly
severe since it wouldn't grant them access to any ES data they couldn't
previously access (only query saved objects). We have automated testing
in place to help ensure features have been migrated correctly, but the
scope of these changes are broad and touch many places in the codebase.

Additionally, the UI capabilities types are not very strict, and are
referenced with string paths in many places, which makes changing them
riskier than changing strictly typed code. A combination of regex
searches and temporarily modifying the `Capabilities` type to cause type
errors for deprecated privileges was used to identify references in
code. Reviewers should consider if there are any other ways that UI
capabilities can be referenced which were not addressed in this PR.

Our automated tests already help mitigate the risk, but it's important
that code owners thoroughly review the changes in their area and
consider if they could have unintended consequences. The Platform
Security team should also review this PR thoroughly, especially since
some changes were made to platform code around privilege handling. The
Data Discovery team will also manually test the behaviour when upgrading
existing user roles with deprecated feature privileges as part of 9.0
upgrade testing.

---------

Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: “jeramysoucy” <jeramy.soucy@elastic.co>
2025-01-29 17:34:58 -04:00
Xavier Merlin
199e75e51f
Update Dev Tool limitation about high availability. (#172507)
Updating limitation of dev tool which is not sending request with round
robin

## Summary

We believe Console always tries to connect to the 1st host in
elasticsearch.hosts but if it's unavailable then it will try the next
one, the code for this can be found
[here](0d613e58cf/src/plugins/console/server/routes/api/console/proxy/create_handler.ts (L125)).
So in that case, as long as the node is still available, it will receive
all the requests from Console.


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

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2025-01-29 11:49:10 +00:00
Tim Sullivan
5f59395f18
Update Reporting documentation: ES configuration, avoiding Token expiration (#208257)
## Summary

Closes https://github.com/elastic/kibana/issues/201281
Closes https://github.com/elastic/kibana/issues/200653

---------

Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
2025-01-29 11:54:09 +01:00
Joseph AFARI
66c49cdd5c
Update elasticsearch-details.asciidoc (#184412)
## Summary

Adding a note that for logs, in case the name of the filebeat index was
changed, it's needed to adjust `monitoring.ui.logs.index` so that the
logs stats can be retrieved as well
2025-01-29 10:21:00 +00:00
Lisa Cawley
5624fc2106
[DOCS] Clarify alerting API key management (#208292) 2025-01-27 14:56:07 -08:00
Davis McPhee
665cfe06a6
[Discover] Clean up leftover "saved search" references (#208295)
## Summary

I noticed a few remaining user facing references to "saved search" after
the renaming in #202217. This PR cleans up all of them that I could
find.

### 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/src/platform/packages/shared/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
- [ ] [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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-01-27 14:01:22 -04:00
Jorge Sanz
052ec56d5c
[Maps][Vega] Update default basemaps to adapt to the Borealis theme refresh (#208114)
Fixes #201269

## Summary

* Extracts the usage of the EMS styles identifiers to always refer to
the constants at `ems_defaults.ts`
* Adds logic in the Vega and Maps plugins to resolve different styles
depending on the theme, bringing the new `road_map_desaturated_v9` and
`dar_kmap_v9` styles when Borealis theme is enabled.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
  - Screenshots will be updated as a larger effort afterwards. 
- [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
  - Changes were small enough for this to not require new tests. 
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

## Release note

Elastic Maps Service basemaps shown in the Custom Visualization
component (Vega) and in the Maps application and components alighn with
the new dark and light theme.

---------

Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
2025-01-27 17:44:00 +01:00
Brandon Morelli
4f3a1c94f8
Remove complex tables (#207911)
### Summary

For migration purposes, we need to remove complex tables in the docs. If
we ultimately decide that we need complex tables to support certain
documentation use-cases, we can add that functionality to docs-builder
later.

For
https://github.com/elastic/docs-builder/issues/112#issuecomment-2599284112.

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2025-01-27 16:09:05 +00:00
Lisa Cawley
9d4f54a7ce
[DOCS] Granular connector RBAC (#207136) 2025-01-20 12:51:21 -08:00
Tim Sullivan
a514c26d38
[Reporting Docs for inspecting the query used for CSV export (#207001)
Closes https://github.com/elastic/kibana/issues/191768

---------

Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
2025-01-17 09:48:15 +01:00
Kurt
8bc22a1297
Remove experimental tag from docs for FIPS (#206453)
## Summary

Remove the Tech Preview tag from the docs for 8.17+
<img width="882" alt="Screenshot 2025-01-13 at 9 47 39 AM"
src="https://github.com/user-attachments/assets/571718e2-5e80-4bc9-941e-25164d05a911"
/>
2025-01-13 15:13:47 +00:00
Liam Thompson
9078287e8b
[main] Max allowed file size while Uploading image via Kibana dashboard Image … (#205140) (#205324)
backport

Co-authored-by: akashsingh <55509676+aakash742@users.noreply.github.com>
2025-01-08 14:48:44 +00:00
wajihaparvez
5b8ffd6d98
[Docs] Update dashboard docs for hover actions (#204844)
## Summary

Updated instructions and visuals for the new hover actions feature. 
Also came across a mention of the Replace panel action and removed it
([#178596](https://github.com/elastic/kibana/pull/178596)).

Rel: [#182535](https://github.com/elastic/kibana/pull/182535) and
[#596](https://github.com/elastic/platform-docs-team/issues/596)
Closes: [#580](https://github.com/elastic/platform-docs-team/issues/580)
2024-12-20 00:50:43 +00:00
wajihaparvez
559917478e
[Docs] Fix typo on Lens page (#204847)
## Summary

Fixed typo.

Closes: [#586](https://github.com/elastic/platform-docs-team/issues/586)
2024-12-19 17:09:46 +00:00
Julia Rechkunova
40c90550f1
[Discover] Rename Saved Search to Discover Session (#202217)
- Closes https://github.com/elastic/kibana/issues/174144

## Summary

This PR renames Saved Search into Discover Session in UI.

- [x] Discover
- [x] Saved Objects page and modal
- [x] Docs
- [x] Other occurrences 

<img width="810" alt="Screenshot 2024-12-16 at 15 20 10"
src="https://github.com/user-attachments/assets/e39083da-f496-4ed5-bbdc-8e184897fc41"
/>
<img width="1220" alt="Screenshot 2024-12-11 at 14 40 15"
src="https://github.com/user-attachments/assets/a6dc3e29-e1a5-4304-8148-0108231cc9de"
/>
<img width="1476" alt="Screenshot 2024-12-16 at 14 57 39"
src="https://github.com/user-attachments/assets/4b34c70e-e21a-4d82-85f2-f5a3cb7a3826"
/>


### 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]
[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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](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: wajihaparvez <wajiha.parvez@elastic.co>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
2024-12-18 13:45:32 +01:00
Jiawei Wu
5a9129e22d
[Response Ops] Remove ephemeral tasks from task manager plugin (#201313)
## Summary

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

Removes all reference to ephemeral tasks from the task manager plugin.
As well as unit and E2E tests while maintaining backwards compatibility
for `xpack.task_manager.ephemeral_tasks` flag to no-op if set. This PR
has some dependencies from the PR to remove ephemeral task support from
the alerting and actions plugin
(https://github.com/elastic/kibana/pull/197421). So it should be merged
after the other PR.

Deprecates the following configuration settings:

- xpack.task_manager.ephemeral_tasks.enabled
- xpack.task_manager.ephemeral_tasks.request_capacity

The user doesn't have to change anything on their end if they don't wish
to. This deprecation is made so if the above settings are defined,
kibana will simply do nothing.

### 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
2024-12-13 14:31:31 -08:00
Steph Milovic
84a2d40953
[Security Assistant] Adds audit logging to knowledge base entry changes (#203349) 2024-12-11 11:55:08 -07:00
kosabogi
d754458aeb
Updates 'Create and manage rules' page (#202648)
### Overview

This PR updates the [Create and manage
rules](http://localhost:8000/guide/create-and-manage-rules.html) page:
- by adding a new screenshot showing how to navigate to the Rules page.
- updating the instructions based on this
[issue's](https://github.com/elastic/docs-content/issues/96
) suggestion.

### Related issue

https://github.com/elastic/docs-content/issues/96

(Based on my discussion with @tatianafinamor, this issue suggests
updating the [Kibana guide > Create and manage
rules](https://www.elastic.co/guide/en/kibana/master/create-and-manage-rules.html)
page, not the Serverless guide. Users need clearer guidance on how to
navigate to the **Rules** section.
2024-12-04 14:25:44 +01:00
florent-leborgne
95a7b0c044
[Docs] Update certain references to cloud and ESS due to serverless GA (#202184)
This PR updates a few references to hosted deployments on Elastic Cloud
to avoid ambiguity with serverless in anticipation of serverless GA.

Some more similar updates will be made on other repos to align.

Rel: https://github.com/elastic/platform-docs-team/issues/485
2024-11-28 16:53:56 +01:00
florent-leborgne
e42569dc04
[Docs] Reset release files for 9.0 (#199519)
This PR resets the release notes, upgrade notes, and what's new for 9.0.
It also cleans up a few references/files that were focusing on migration
to 8.0

Some more PRs will happen to prepare the rest of the docs for v9

Closes: https://github.com/elastic/platform-docs-team/issues/564
2024-11-22 10:24:10 +01:00
Eyo O. Eyo
3648a33adf
update docs on automatically generating a report (#191067)
## Summary

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


Updates steps in docs for automatically generating a report to match the
UI expectation especially that the share experience got an overhaul
since 8.14.

<!--
### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2024-11-20 19:49:37 +00:00
Nathan Reese
eb68fb2713
[canvas] disable canvas application when there are no workpads (#200203)
Closes https://github.com/elastic/kibana/issues/197370

### Test instructions
1) open new kibana installation
2) verify canvas is not available in menu or application search bar
3) use saved object import to import canvas workpad. Reload browser
4) verify canvas is available in menu and application search bar

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-20 10:51:07 -07:00
Kurt
8e7799ae7a
Removing experimental for the FIPS mode config (#200734)
## Summary

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

Remove the `experimental` from the fipsMode config path

## Release note

Kibana's FIPS mode is no longer considered experimental

## FIPS Pipeline for this branch

https://buildkite.com/elastic/kibana-fips/builds/281
2024-11-19 15:23:20 -05:00
Pierre Gayvallet
455c781c6d
[LLM tasks] Add product documentation retrieval task (#194379)
## Summary

Close https://github.com/elastic/kibana/issues/193473
Close https://github.com/elastic/kibana/issues/193474

This PR utilize the documentation packages that are build via the tool
introduced by https://github.com/elastic/kibana/pull/193847, allowing to
install them in Kibana and expose documentation retrieval as an LLM task
that AI assistants (or other consumers) can call.

Users can now decide to install the Elastic documentation from the
assistant's config screen, which will expose a new tool for the
assistant, `retrieve_documentation` (only implemented for the o11y
assistant in the current PR, shall be done for security as a follow up).

For more information, please refer to the self-review.

## General architecture

<img width="1118" alt="Screenshot 2024-10-17 at 09 22 32"
src="https://github.com/user-attachments/assets/3df8c30a-9ccc-49ab-92ce-c204b96d6fc4">

## What this PR does

Adds two plugin:
- `productDocBase`: contains all the logic related to product
documentation installation, status, and search. This is meant to be a
"low level" components only responsible for this specific part.
- `llmTasks`: an higher level plugin that will contain various LLM tasks
to be used by assistants and genAI consumers. The intent is not to have
a single place to put all llm tasks, but more to have a default place
where we can introduce new tasks from. (fwiw, the `nlToEsql` task will
probably be moved to that plugin).

- Add a `retrieve_documentation` tool registration for the o11y
assistant
- Add a component on the o11y assistant configuration page to install
the product doc

(wiring the feature to the o11y assistant was done for testing purposes
mostly, any addition / changes / enhancement should be done by the
owning team - either in this PR or as a follow-up)

## What is NOT included in this PR:

- Wire product base feature to the security assistant (should be done by
the owning team as a follow-up)
  - installation
  - utilization as tool

- FTR tests: this is somewhat blocked by the same things we need to
figure out for https://github.com/elastic/kibana-team/issues/1271

## Screenshots 

### Installation from o11y assistant configuration page

<img width="1476" alt="Screenshot 2024-10-17 at 09 41 24"
src="https://github.com/user-attachments/assets/31daa585-9fb2-400a-a2d1-5917a262367a">

### Example of output

#### Without product documentation installed 

<img width="739" alt="Screenshot 2024-10-10 at 09 59 41"
src="https://github.com/user-attachments/assets/993fb216-6c9a-433f-bf44-f6e383d20d9d">

#### With product documentation installed

<img width="718" alt="Screenshot 2024-10-10 at 09 55 38"
src="https://github.com/user-attachments/assets/805ea4ca-8bc9-4355-a434-0ba81f8228a9">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-19 08:28:26 -06:00
wajihaparvez
b781c4eec4
[Docs] Add section for assigning colors to terms (#199241)
## Summary

Added a section with instructions for assigning colors to terms in a
table. The technical preview warning will be removed in GA.

Rel: https://github.com/elastic/kibana/pull/189895
Closes: [#559](https://github.com/elastic/platform-docs-team/issues/559)

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-11-11 20:59:39 +00:00
florent-leborgne
3d763498b8
[Docs] Discover docs updates (#198423)
This PR updates the first few pages of the Discover docs:
- Splits most of the content of the parent page into a child page to
match with the structure of the Dashboards docs
- Refocuses some of the content so that it looks generally applicable to
users and their data rather than a sample data-based tutorial
- Adds missing content flagged in
https://github.com/elastic/kibana/issues/192149
- Adds some content updates specific to 8.16 flagged in
https://github.com/elastic/platform-docs-team/issues/500 (I still need
to figure out what's the best way to document ES|QL stuff)

Rel: https://github.com/elastic/platform-docs-team/issues/500
Closes: https://github.com/elastic/kibana/issues/192149 
Closes: https://github.com/elastic/kibana/issues/162265
Closes: https://github.com/elastic/kibana/issues/187417

Note: While there may be more missing features that we want to document,
let's first get these updates in.

Note2: If you're wondering where to preview the changes, find the
preview link in the Github actions comment and navigate to the "master"
version of the Kibana guide.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2024-11-08 12:12:05 +01:00
florent-leborgne
8e7fb7a77e
[Docs] Update nav instructions and sample data installation to accommodate for the solution views (#199163)
This PR:
- updates navigation instructions to accommodate for the navigation
changes related to solution views.
- updates instructions for adding sample data to rely on the
integrations page instead of the home page, that only exists with the
classic solution view
- updates references to the home page to avoid confusing users using one
of the new solution views

Closes: https://github.com/elastic/platform-docs-team/issues/529
Closes: https://github.com/elastic/platform-docs-team/issues/540
2024-11-08 11:10:32 +01:00
florent-leborgne
cd7447db36
[Docs] Update Kibana ESQL docs (#199371)
This PR updates ESQL docs currently in the Kibana guide. I'll do another
PR to the Elasticsearch docs to update the docs there as well.

Rel: https://github.com/elastic/platform-docs-team/issues/552
2024-11-08 10:35:25 +01:00
Catherine Liu
c1e430b868
[Canvas] Remove expression lifecycle docs (#199006)
## Summary

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

This removes outdated Canvas expression docs that describes capabilities
of the expression that are no longer true.


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-11-07 13:30:42 -08:00
florent-leborgne
d5e9939f6b
[Docs] 8.16 release highlights - what's new page (#198343)
This PR adds the release highlights for Kibana 8.16.0

Closes: https://github.com/elastic/platform-docs-team/issues/501

![Whats New Guide
(2)](https://github.com/user-attachments/assets/ce61261b-ca23-4fe6-89cd-6c5c6fb843b6)
<img width="445" alt="image"
src="https://github.com/user-attachments/assets/22b68b77-4e52-4395-8079-1c8d2602e8db">
<img width="439" alt="image"
src="https://github.com/user-attachments/assets/59bebfcb-aa19-442c-9209-b945c48c5aa2">
2024-11-05 16:41:56 +01:00
kosabogi
e945fc93c5
[ML] Updates references to apps and pages in ML-related guides (#198308)
### Overview

This PR updates all app and page references to align with the new style
guide guidelines.

### Related issue

https://github.com/elastic/search-docs-team/issues/205

### Preview

Machine learning
AIOps Labs

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-11-04 12:04:15 +01:00
wajihaparvez
be51fac02f
[Docs] Update dashboard docs for interactive managed dashboard popover (#198226)
## Summary

Added a Duplicate dashboards page for the general duplicating process
and then mentioned the new popover for duplicating managed dashboards.
Linked to this page from other relevant mentions.
2024-10-31 19:02:58 +00:00
Lisa Cawley
02fab7248d
[OpenAPI][DOCS] Add descriptions, examples, responses for role APIs (#195527)
Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2024-10-25 10:13:57 -07:00
wajihaparvez
7ceaf32fa4
[Docs] Update Dashboard docs for chart switch redesign in 8.16.0 (#197543)
## Summary

Updated visuals in Dashboard docs for chart switch redesign and related
changes.

Closes: [#538](https://github.com/elastic/platform-docs-team/issues/538)
Rel: #187475
2024-10-24 17:55:01 -04:00
florent-leborgne
762903e31c
[Docs] Update community plugins documentation (#197569)
This PR recreates [@aakash742's
PR](https://github.com/elastic/kibana/pull/196497) to add a note about
Elastic not providing support for community plugins

---------

Co-authored-by: akashsingh <55509676+aakash742@users.noreply.github.com>
2024-10-24 23:12:23 +02:00
Lisa Cawley
2656e5a4ff
[DOCS][OpenAPI] Add descriptions, examples, tags, responses for space APIs (#195333)
Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2024-10-18 14:03:06 -05:00
florent-leborgne
d87a38f6cc
[Docs] Resize image for dashboard usage (#195914)
This PR is a small fix to resize an image in the Dashboards docs to make
it look better and not blurry
2024-10-15 19:25:49 +02:00
James Gowdy
923c450c1b
[ML] Adds ML tasks to the kibana audit log (#195120)
Adds a new `MlAuditLogger` service for logging calls to elasticsearch in
kibana's audit log.
Not all calls are logged, only ones which make changes to ML jobs or
trained models, e.g. creating, deleting, starting, stopping etc.

Calls to the es client are wrapped in a logging function so successes
and failures can be caught and logged.

the audit log can be enabed by adding this to the kibana yml or dev.yml
file
`xpack.security.audit.enabled: true`

An example log entry (NDJSON formatted to make it readable):
```
{
  "event": {
    "action": "ml_start_ad_datafeed",
    "type": [
      "change"
    ],
    "category": [
      "database"
    ],
    "outcome": "success"
  },
  "labels": {
    "application": "elastic/ml"
  },
  "user": {
    "id": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
    "name": "elastic",
    "roles": [
      "superuser"
    ]
  },
  "kibana": {
    "space_id": "default",
    "session_id": "U6HQCDkk+fAEUCXs7i4qM2/MZITPxE02pp8o7h09P68="
  },
  "trace": {
    "id": "4f1b616b-8535-43e1-8516-32ea9fe76d19"
  },
  "client": {
    "ip": "127.0.0.1"
  },
  "http": {
    "request": {
      "headers": {
        "x-forwarded-for": "127.0.0.1"
      }
    }
  },
  "service": {
    "node": {
      "roles": [
        "background_tasks",
        "ui"
      ]
    }
  },
  "ecs": {
    "version": "8.11.0"
  },
  "@timestamp": "2024-10-11T09:07:47.933+01:00",
  "message": "Starting anomaly detection datafeed datafeed-11aaaa",
  "log": {
    "level": "INFO",
    "logger": "plugins.security.audit.ecs"
  },
  "process": {
    "pid": 58305,
    "uptime": 100.982390291
  },
  "transaction": {
    "id": "77c14aadc6901324"
  }
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-14 11:37:56 +01:00
Liam Thompson
8af920bc8b
[DOCS] Fix list format (#195349) 2024-10-08 17:38:48 +02:00
wajihaparvez
296a49cbc8
Update visuals on Manage & Share Dashboards and Tutorials + consistency edits (#195152)
## Summary

Updated visuals on the [Manage and Share
Dashboards](https://www.elastic.co/guide/en/kibana/master/_manage_dashboards.html)
pages and
[Tutorials](https://www.elastic.co/guide/en/kibana/master/_tutorials.html)
+ made some consistency edits to the text.

Rel:[#457](https://github.com/elastic/platform-docs-team/issues/457) and
[#466](https://github.com/elastic/platform-docs-team/issues/466)

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-10-07 11:36:07 -04:00
wajihaparvez
29db0bc3ec
[Docs] Add visuals to the Panels and Visualizations pages + consistency edits (#194765)
## Summary

Added visuals to the [Panels and
Visualizations](https://www.elastic.co/guide/en/kibana/master/_panels_and_visualizations.html)
pages + made some consistency edits to the text.

Rel:[#457](https://github.com/elastic/platform-docs-team/issues/457) and
[#466](https://github.com/elastic/platform-docs-team/issues/466)
2024-10-03 10:48:44 -04:00
Lisa Cawley
907c82da92
[DOCS][ResponseOps] Remove tech preview from ES query ES|QL rule type (#194233) 2024-09-27 12:45:09 -07:00
wajihaparvez
dab27867a6
[Docs] Add visuals to the Build dashboard pages (#194234)
## Summary

Added screenshots and gifs to the [Build
Dashboards](https://www.elastic.co/guide/en/kibana/master/create-dashboards.html)
pages as part of the ongoing project to add more visuals to the
Dashboards docs.

Rel:https://github.com/elastic/platform-docs-team/issues/457 and
https://github.com/elastic/platform-docs-team/issues/466
2024-09-27 18:23:24 +00:00
Liam Thompson
d9ca7c6667
[DOCS] Create Search landing page skeleton and stubs (#194293)
- Create Search landing page with links to all features available in the
Elastic Cloud hosted UI
- Create skeleton of a table to quickly provide links to all relevant
docs and release notes for each feature
- Currently commented out, to be filled in a follow-up PR by @kosabogi
- Create a stub page for connection details page (Docs equivalent to
[find your CloudID and create API
keys](https://www.elastic.co/search-labs/tutorials/install-elasticsearch/elastic-cloud#finding-your-cloud-id))
  - @kosabogi will update this page in follow-up
- Nest existing Playground docs under there
- Create a stub page for AI Assistant for Search docs
- Create a stub page for inference endpoints UI
2024-09-27 16:06:47 +02:00
Hannah Mudge
3a806b8f94
[Links Panel] [Docs] Remove "technical preview" label from links panel documentation (#194055)
Closes https://github.com/elastic/kibana/issues/193742

## Summary

The links panel was [GAed in
8.14](https://github.com/elastic/kibana/pull/178999), but the
[docs](https://www.elastic.co/guide/en/kibana/current/dashboard-links.html)
were not updated to reflect this. This PR removes the "technical
preview" label from the links panel docs to keep them up-to-date with
the current status of the links panel.

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/a110861a-a78b-49ce-81cd-ddb64b15749b)
|
![image](https://github.com/user-attachments/assets/e5ddcb39-db5c-4d5d-b107-8877a5e61d15)
|

### Checklist

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

### 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)
2024-09-26 08:06:21 -06:00
kosabogi
37af7304f0
Updates file format details for Data Visualizer documentation (#193819)
## Overview

This update adds details to the Data Visualizer documentation,
specifying supported file formats and their size limits.
**Related issue:**
[#189](https://github.com/elastic/search-docs-team/issues/189)

### Preview

[Machine Learning]()

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2024-09-24 16:37:43 +02:00
wajihaparvez
1cd0531a6a
[Docs] Add visuals to the Use and Filter Dashboards page (#193489)
## Summary

Added screenshots and gifs to the [Use and Filter
Dashboards](https://www.elastic.co/guide/en/kibana/master/_use_and_filter_dashboards.html)
page as part of the ongoing project to add more visuals to the
Dashboards docs.

Rel:[#457](https://github.com/elastic/platform-docs-team/issues/457) and
[#466](https://github.com/elastic/platform-docs-team/issues/466)
2024-09-23 15:54:27 +00:00
florent-leborgne
9e2ad98d06
[Docs] Update Sharing docs (#190318)
## Summary

This PR updates the docs regarding the **Share** menu in Kibana.

Note1: Please advise on the public URL/anonymous access feature. I'm not
sure whether it is still present nor under which form for the Link and
Embed sharing options.

Note2: @eokoneyo also has related updates in
https://github.com/elastic/kibana/pull/191067

![Reporting Getting
Started](https://github.com/user-attachments/assets/d2c123a2-b7db-4d5e-928f-79785409ff07)

Note: The step ordering for the last section in the screenshot has been
fixed in the source.

Closes: https://github.com/elastic/platform-docs-team/issues/355
2024-09-23 11:31:03 +02:00
Alexi Doak
850cdf0275
[ResponseOps][TaskManager] followups from resource based scheduling PR (#192124)
Towards https://github.com/elastic/kibana/issues/190095,
https://github.com/elastic/kibana/issues/192183,
https://github.com/elastic/kibana/issues/192185

## Summary

This PR updates the following:

- heap-to-capacity converter to take into account larger amounts of RAM,
updated this to be 16GB
- initial`maxAllowedCost` to be the default capacity of 10
- adds `xpack.alerting.maxScheduledPerMinute`,
`xpack.discovery.active_nodes_lookback`, `xpack.discovery.interval`
configs to docker
- updates the TM docs for `xpack.task_manager.capacity`

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-09-12 13:42:33 -05:00
florent-leborgne
f23c8997ca
[Docs] Refresh dashboards docs (re-do of #191129) (#192305)
## Summary

[redo of #191129 that got reverted] 
This PR updates the structure of the Dashboards docs and refreshes some
outdated parts of the content.
More updates will be made in future PRs to refresh screenshots and to
refresh the content more in depth.

This new structure and edits:
- distribute the pages in more user-oriented identified themes, for
better findability, scanning, and to ease possible integration of some
of these pages into in-app documentation.
- are more future proof to evolve along with upcoming features.

~I'll leave this PR as a draft until I resolve some link dependencies
coming from other docs sources and check some additional bits of
content.~

Preview available on demand on Slack.

Closes: https://github.com/elastic/platform-docs-team/issues/408 (I'll
create separate issues for remaining items)
Closes: https://github.com/elastic/platform-docs-team/issues/413
Closes: https://github.com/elastic/platform-docs-team/issues/418

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-09-10 10:57:53 +02:00