Commit graph

293 commits

Author SHA1 Message Date
Efe Gürkan YALAMAN
a172cb5691
[FTR][Synonyms UI] Add Synonyms overview FTRs (#208723)
## Summary

Adds FTR tests for synonyms

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [ ] [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)
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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-30 01:46:08 +01:00
Efe Gürkan YALAMAN
2cb7bea5f3
[Synonyms UI] Search synonyms rule flyout (#208564)
## Summary

Adds search synonym rule flyout.
Adds endpoints and hooks for synonym rule management.


https://github.com/user-attachments/assets/e43b4a40-6452-4cfd-921f-2bde1219f219



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [ ] [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
- [ ] 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-29 22:55:52 +01:00
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
Sergi Massaneda
93f67462d2
[Security Solution][Siem migrations] Swap experimental flag for ESS (#208541)
## Summary

This PR enables the SIEM migrations experimental flag by default in
ESS/on-prem.
We keep the experimental flag disabled in serverless (using
`config/serverless.security.yml`) since we don't want to release it yet.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-29 16:32:04 +01:00
Sergi Massaneda
9077414852
[Security Solution] Fix old siem feature override (#207333)
## Summary

Adds the feature override for the old `siem` feature as well, we changed
that to the new one here


https://github.com/elastic/kibana/pull/201780/files#diff-5aba630e58630c087c90368aa97296afb736f62579a23285cef901dc1c3921edR27

Related failure: https://github.com/elastic/kibana/issues/207285

The problem happened because MKI tests are using the outdated roles
definition with the old `feature_siem` which was lacking the feature
override in the serverless.security.yml

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-21 15:50:53 +01:00
Tomasz Kajtoch
8d2a43a0ce
Replace Borealis isServerless conditional with YML config (#206690)
Resolves https://github.com/elastic/eui-private/issues/171
Resolves https://github.com/elastic/eui-private/issues/177

## Summary

This PR addresses a prior PR review
[comment](https://github.com/elastic/kibana/pull/203840/files#diff-bb850523655bac7adb30995553acabae9705435fa51e5b8bf13c483152db694a)
by removing `isServerless` from the logic determining what theme should
be used at runtime with a simple YML configuration setting instead.

I added a non-public `uiSettings.experimental.defaultTheme` config
property that defaults to `borealis` and is set to `amsterdam` in
`serverless.yml`. Since the default theme is now (and should be) set to
Borealis, I also updated `DEFAULT_THEME_NAME` and `FALLBACK_THEME_NAME`
to reflect that. This doesn't have any impact on Serverless; it will
keep using Amsterdam.

Additionally, while making these changes, I wanted to simultaneously
improve types and address earlier PR
[comment](https://github.com/elastic/kibana/pull/199748#discussion_r1840402343).
Now `SUPPORTED_THEME_NAMES` array is declared as `const` making the
`ThemeName` type strict instead of resolving a generic `string` type.
Usages were updated to use `ThemeName` instead of `string`, too.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-20 16:38:50 +01:00
Jan Monschke
1b167d9dc2
[SecuritySolution] Breaking out timeline & note privileges (#201780)
## Summary

Epic: https://github.com/elastic/security-team/issues/7998

In this PR we're breaking out the `timeline` and `notes` features into
their own feature privilege definition. Previously, access to both
features was granted implicitly through the `siem` feature. However, we
found that this level of access control is not sufficient for all
clients who wanted a more fine-grained way to grant access to parts of
security solution.

In order to break out `timeline` and `notes` from `siem`, we had to
deprecate it feature privilege definition for. That is why you'll find
plenty of changes of `siem` to `siemV2` in this PR. We're making use of
the feature privilege's `replacedBy` functionality, allowing for a
seamless migration of deprecated roles.

This means that roles that previously granted `siem.all` are now granted
`siemV2.all`, `timeline.all` and `notes.all` (same for `*.read`).
Existing users are not impacted and should all still have the correct
access. We added tests to make sure this is working as expected.

Alongside the `ui` privileges, this PR also adds dedicated API tags.
Those tags haven been added to the new and previous version of the
privilege definitions to allow for a clean migration:

```mermaid
flowchart LR
    subgraph v1
    A(siem) --> Y(all)
    A --> X(read)
    Y -->|api| W(timeline_write / timeline_read / notes_read / notes_write)
    X -->|api| V(timeline_read /notes_read)
    end

    subgraph v2
    A-->|replacedBy| C[siemV2]
    A-->|replacedBy| E[timeline]
    A-->|replacedBy| G[notes]
    

    E --> L(all)
    E --> M(read)
    L -->|api| N(timeline_write / timeline_read)
    M -->|api| P(timeline_read)

    G --> Q(all)
    G --> I(read)

    Q -->|api| R(notes_write / notes_read)
    I -->|api| S(notes_read)
    end
```

### Visual changes

#### Hidden/disabled elements

Most of the changes are happening "under" the hood and are only
expressed in case a user has a role with `timeline.none` or
`notes.none`. This would hide and/or disable elements that would usually
allow them to interact with either timeline or the notes feature (within
timeline or the event flyout currently).

As an example, this is how the hover actions look for a user with and
without timeline access:

| With timeline access | Without timeline access |
| --- | --- |
| <img width="616" alt="Screenshot 2024-12-18 at 17 22 49"
src="https://github.com/user-attachments/assets/a767fbb5-49c8-422a-817e-23e7fe1f0042"
/> | <img width="724" alt="Screenshot 2024-12-18 at 17 23 29"
src="https://github.com/user-attachments/assets/3490306a-d1c3-41aa-af5b-05a1dd804b47"
/> |

#### Roles

Another visible change of this PR is the addition of `Timeline` and
`Notes` in the edit-role screen:

| Before | After |
| ------- | ------ |
| <img width="746" alt="Screenshot 2024-12-12 at 16 31 43"
src="https://github.com/user-attachments/assets/20a80dd4-c214-48a5-8c6e-3dc19c0cbc43"
/> | <img width="738" alt="Screenshot 2024-12-12 at 16 32 53"
src="https://github.com/user-attachments/assets/afb1eab4-1729-4c4e-9f51-fddabc32b1dd"
/> |

We made sure that for migrated roles that hard `security.all` selected,
this screen correctly shows `security.all`, `timeline.all` and
`notes.all` after the privilege migration.

#### Timeline toast

There are tons of places in security solution where `Investigate / Add
to timeline` are shown. We did our best to disable all of these actions
but there is no guarantee that this PR catches all the places where we
link to timeline (actions). One layer of extra protection is that the
API endpoints don't give access to timelines to users without the
correct privileges. Another one is a Redux middleware that makes sure
timelines cannot be shown in missed cases. The following toast will be
shown instead of the timeline:

<img width="354" alt="Screenshot 2024-12-19 at 10 34 23"
src="https://github.com/user-attachments/assets/1304005e-2753-4268-b6e7-bd7e22d8a1e3"
/>

### Changes to predefined security roles

All predefined security roles have been updated to grant the new
privileges (in ESS and serverless). In accordance with the migration,
all roles with `siem.all` have been assigned `siemV2.all`,
`timeline.all` and `notes.all` (and `*.read` respectively).

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] 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.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2025-01-20 14:09:16 +01:00
Joe McElroy
6ccc8523d0
[Onboarding] [Stack] Add Onboarding experience into Stack (#204351)
## Summary

**TODO**
- [x] FTR - solution navigation ftr - add test for index management
- [x] FTR - fix the index management index list page test to navigate
through the solution navigation to index management list page
- [x] code - playground create index action needs to check if part of es
solution navigation
- [x] Unit - add unit for index management with the change for solution
navigation
- [x] Unit - Fix any failures in index management tests
- [x] Fix FTR tests

These changes are only targeting 9.0.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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
- [ ] 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
- [ ] 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: Yan Savitski <yan.savitski@elastic.co>
2025-01-15 17:03:25 -07:00
Alejandro Fernández Haro
d04318f047
[docs] Update kibana.yml defaults (#206423) 2025-01-13 20:55:24 +01:00
Efe Gürkan YALAMAN
e542fd2370
[Synonyms UI] Synonyms UI base plugin (#203284)
## Summary

Creates a plugin for Synonyms UI implementation. It is hidden under the
UI flag and config option which is off by default.
```
POST kbn:/internal/kibana/settings/searchSynonyms:synonymsEnabled
{"value": true}
```

Serverless Search:
<img width="379" alt="Screenshot 2024-12-17 at 13 18 02"
src="https://github.com/user-attachments/assets/8c2cb6f0-ce2a-4be6-8605-4f994adeefd7"
/>

Stack Search
<img width="293" alt="Screenshot 2024-12-17 at 13 21 43"
src="https://github.com/user-attachments/assets/0d61de0e-2cd3-46a6-990f-1f1a70843324"
/>



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 19:15:19 +00:00
Ido Cohen
529a4e3b19
Deprecate Cloud Defend billing logic 2024-12-18 17:20:53 +02:00
Jatin Kathuria
2188013e1a
[Security Solution] Disable O11y features in Security Serverless project (#203990)
## Summary

Fixes 
- https://github.com/elastic/kibana/issues/202532


`Observability` feature `Inventory` should not appear in `Security`
serverless project


|Before|After|
|--|--|

|![image](9c659fa8-1e23-4696-b4ee-27d9c61ffafc)|
2024-12-12 06:53:21 -06:00
Rodney Norris
ebb4f503a5
[Search] Inference Endpoints - Align rendering to plugin (#203313)
## Summary

This PR removes rendering of the Inference Endpoints UI from
`enterprise_search` for stack and instead utilizes the
`search_inference_endpoints` plugin to render the UI for both serverless
and stack. This can be done by utilizing the `search_navigation` plugin
for rendering the classic navigation for stack.

To support this change the `xpack.searchInferenceEndpoints.ui.enabled`
was updated to default to `true` instead of only being set for
serverless search. To account for this change I have added
`xpack.searchInferenceEndpoints.enabled: false` to the serverless
configs for both security and observability to ensure the
`search_inference_endpoints` plugin is disabled in both of those
projects.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-09 12:36:16 -06:00
Rodney Norris
434eaa78ad
[Search] Search Playground - shared rendering (#201302) 2024-12-05 15:09:51 -06:00
Aleksandr Maus
bb8183a67d
config/serverless.{security,oblt}.yml - exclude deprecated integrations (#194644)
This adds exclusions for deprecated "rsa2elk" integration packages to Serverless projects.
The following packages should be excluded from Serverless.
 
- bluecoat
- cylance
- f5
- fortinet_forticlient
- juniper_junos
- juniper_netscreen
- netscout
- radware
- tomcat

---------

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
2024-12-04 13:10:34 -06:00
Tim Sullivan
871a81c68e
[Reporting] Use Kibana feature privileges only to control access to reporting (#200834)
## Summary

This PR discontinues Reporting from having dual models for determining
the privilege to generate a report, and uses Kibana feature privileges
as the single model that controls those privileges.

### Changes
1. Removes all logic that is based on following settings:
    * `xpack.reporting.roles.enabled`
    * `xpack.reporting.roles.allow`
The settings are still supported, but any features that use the settings
are removed.
2. Removes the detection of the settings from the Upgrade Assistant
integration

### Release note
The default system of granting users the privilege to generate reports
has changed. Rather than assigning users the `reporting_user` role,
administrators should create a custom role that grants report-creation
privileges using Kibana application privileges.

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

Correlates with https://elasticco.atlassian.net/browse/ES-9856: assign
the built-in `reporting_user` role the necessary Kibana application
privileges, and make the role not marked as deprecated.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-04 09:51:29 -07:00
Sander Philipse
0854996ba1
[ES3] Enable AI assistant knowledge base (#202210)
## Summary

This enables the knowledge base for the Serverless Search AI assistant.
It also renames a few options to align naming, including a rename for
the settings page in Observability's Serverless deployment to remove a
reference to Search.
2024-11-30 14:52:39 +01:00
Yuliia Naumenko
5342f327ee
[Data Usage] Enabled plugin for Serverless and added feature flag to manage availability (#201465)
This PR enables data_usage plugin for Serverless environment for all 3
solutions.
To manage feature availability added feature flag, which is turning Data
Usage off by default.
2024-11-23 07:06:23 -05:00
Samiul Monir
37a0861d28
[Search][ES3] Enable Inference Management UI in ES3 (#200109)
## Summary

This PR:
- Enables Inference Management in ES3
- Fixes small issues to make sure it works in ES3.
- Added FTR tests.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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 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.
- [X] [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_node:*` 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>
2024-11-22 14:10:45 -05:00
Nicolas Chaulet
1fd3f412e1
[Fleet] Use metering API in serverless (#200063) 2024-11-18 16:36:27 -05:00
Michael Wolf
994c89a6a0
Exclude cloud-defend integration in serverless (#192645)
The cloud-defend (Defend for Containers) integration is not supported with serverless. This excludes the integration package from the security serverless config, so it won't be available for users to install.
2024-11-18 15:14:00 -06:00
Julia Bardi
f1f6117f04
[Fleet] added eventIngestedEnabled flag (#199733)
## Summary

Closes https://github.com/elastic/integrations/issues/11491

Added a separate flag `xpack.fleet.eventIngestedEnabled` (false by
default) to keep the `event.ingested` mapping even when
`agentIdVerificationEnabled` is disabled (in serverless oblt projects)

Created a new pipeline `.fleet_event_ingested_pipeline-1` to use when
only `eventIngestedEnabled` is enabled, to skip the step of calculating
`agent_id_status`.
I couldn't change `.fleet_final_pipeline-1` because the pipeline steps
have to be different based on the flags.

## To verify:
Note: After changing the flags, the packages have to be reinstalled to
see the changes in the index templates, tested with `elastic_agent`
package.
Also, the data streams should be rolled over to see the changes in the
ingested data.
```
POST logs-elastic_agent-default/_rollover
POST logs-elastic_agent.metricbeat-default/_rollover
```

### Default behaviour unchanged (Agent id verification enabled,
event.ingested flag disabled)
- by default: no change in behaviour, both `event.ingested` and
`event.agent_id_status` should be mapped

<img width="1381" alt="image"
src="https://github.com/user-attachments/assets/33c6fafc-1365-4e6a-b8fe-45f58a6c479e">
<img width="856" alt="image"
src="https://github.com/user-attachments/assets/54fefa62-bbb5-4ce5-a3dd-f56123e5e042">

### Agent id verification disabled, event.ingested enabled
- set in `kibana.yml`
```
xpack.fleet.agentIdVerificationEnabled: false
xpack.fleet.eventIngestedEnabled: true
```
- verify that `event.ingested` is mapped, `event.agent_id_status` is not

<img width="923" alt="image"
src="https://github.com/user-attachments/assets/0c18b3f2-6071-4f5a-a377-abeb4b4890ef">
<img width="1425" alt="image"
src="https://github.com/user-attachments/assets/2c93feca-a719-4cdb-983f-8f1269c22c88">
<img width="531" alt="image"
src="https://github.com/user-attachments/assets/b214143a-04a9-42d0-8ccc-07059d836039">
<img width="2342" alt="image"
src="https://github.com/user-attachments/assets/9247b6eb-e426-4eed-8d7c-3cb89be9dbdd">
<img width="2545" alt="image"
src="https://github.com/user-attachments/assets/d1b209cf-503d-47a0-ac06-1fd75395bab2">

### Agent id verification disabled, event.ingested disabled
- set in `kibana.yml`
```
xpack.fleet.agentIdVerificationEnabled: false
xpack.fleet.eventIngestedEnabled: false # default
```
- verify that neither `event.ingested` and `event.agent_id_status` is
mapped

<img width="522" alt="image"
src="https://github.com/user-attachments/assets/2434e4df-5b5e-45a5-a438-7b305834db63">

### Agent id verification enabled, event.ingested enabled
- set in `kibana.yml`
```
xpack.fleet.agentIdVerificationEnabled: true # default
xpack.fleet.eventIngestedEnabled: true
```
- both `event.ingested` and `event.agent_id_status` should be mapped

<img width="1284" alt="image"
src="https://github.com/user-attachments/assets/226838fe-8a2a-455f-812d-049d31fe4600">
<img width="858" alt="image"
src="https://github.com/user-attachments/assets/4fd99149-47f3-462c-b1ec-a2d45684560f">


### 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-11-13 12:41:40 +01:00
Jen Huang
950ee166da
[UII] Replace kibanaVersionCheckEnabled default value instead of config setting (#198172)
## Summary

This PR removes
`xpack.fleet.internal.registry.kibanaVersionCheckEnabled: false` from
`kibana.yml` in favor of changing the default value that Fleet
populates, so that we do not apply the Kibana version constraint to EPR
requests for >= 9.0 deployments.

Prior to this change, this setting was not applied to ESS deployments as
`kibana.yml` is overridden there.

I updated the related task in
https://github.com/elastic/kibana/issues/192624 to reflect this change.
2024-10-30 14:22:52 -07:00
Mike Côté
c31f11e7d8
Set mget task claim strategy as the default (#197070)
Resolves https://github.com/elastic/kibana/issues/194625

In this PR, I'm setting `mget` as the default task claiming strategy
along the following changes:
- Given we no longer need the 8.16 specific PRs
(https://github.com/elastic/kibana/pull/196317 and
https://github.com/elastic/kibana/pull/196757), I've also reverted them.
- Given we now use `met` as the default, I've renamed
`task_manager_claimer_mget` to `task_manager_claimer_update_by_query`
and made tests in that folder test using the `update_by_query` claim
strategy.
- Stabilize flaky tests caused by mget + polling for tasks more
frequently

Flaky test runners:
-
[[59b71bc](59b71bcdbe)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7197
-
[[aea910e](aea910e36d)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7199
-
[[4723ced](4723ced751)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7206
-
[[d28c8c5](d28c8c56f6)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7209
-
[[dd7773a](dd7773aeba)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7224

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-25 08:57:46 -04:00
Sander Philipse
3bc5e2db73
[AI Assistant] Add assistant to Serverless Search (#196832)
## Summary

This adds the AI assistant to Serverless Elasticsearch. It also disables
the knowledge base, and disables a few config values we don't want users
to be able to set in that context.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2024-10-25 05:03:04 -05:00
Saarika Bhasi
c25599ee98
[Search] Enable semantic_text feature in es3 (#197140)
## Summary

Semantic text feature was disabled by default due to ML node unable to
scale down. With the relevant
[PR](https://github.com/elastic/elasticsearch/pull/114323) & subsequent
[fix](https://github.com/elastic/elasticsearch/pull/115189) merged, ML
node now auto scales when there is no activity. Therefore enabling
semantic_text feature in es3.

### Testing instructions
* start serverless instance
* visit index management index details page -> mappings
* Click Add field 
* Confirm `semantic_text` is shown in the field type form
2024-10-22 13:59:28 -04:00
Jeramy Soucy
c73bfd2480
Enable custom roles and spaces in serverless projects (#195584)
Closes #194933
Closes #192282

## Summary

This PR updates the serverless project yml files to

- enable custom roles for Elasticsearch and Security projects
- enable multiple spaces (max 100) for all serverless project types

### Tests
Additionally, this PR adjust the serverless test suites. Originally,
testing of roles and spaces endpoints was achieved from the feature flag
test config. Now that these features are enabled by default, the tests
have been migrated to the standard serverless test configs.

Affected tests:
-
x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts
-
x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts
-
x-pack/test_serverless/functional/test_suites/common/platform_security/navigation/management_nav_cards.ts
-
x-pack/test_serverless/functional/test_suites/common/platform_security/roles.ts
-
x-pack/test_serverless/functional/test_suites/common/spaces/spaces_management.ts
-
x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts
- Feature flag configs/indices
- Project specific configs/indices
- Base serverless config

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2024-10-21 11:25:35 -05:00
Julien Lind
45e43ca6fc
Update max supported package version (#196675)
Update the max supported package version to 3.3.0. 
Search projects were not updated with the previous PR -
https://github.com/elastic/kibana/pull/196551

Related to https://github.com/elastic/package-spec/pull/818
2024-10-17 08:27:06 -05:00
Paolo Chilà
d86996b461
Enable Fleet UI for serverless search projects (#195774)
## Summary

Enable Fleet UI for serverless search projects. This is needed to enable
upcoming agentless features.

### 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: Julien Lind <julien.lind@elastic.co>
2024-10-16 23:54:47 +02:00
Giorgos Bamparopoulos
2f76b60b0e
Update max supported package version (#196551)
Update the max supported package version to 3.3.0

Related to https://github.com/elastic/package-spec/pull/818
2024-10-16 19:40:00 +03:00
Yulia Čech
302ac0d336
Add support for GeoIP processor databases in Ingest Pipelines (#190830)
Fixes https://github.com/elastic/kibana/issues/190818

## Summary

Elasticsearch has added support for GeoIP, enabling the use of paid
GeoIP databases from MaxMind/IPInfo for more accurate and granular
geolocation data. As such we should add support to ingest pipelines UI
for making this available to the user.


* If the user doesn't have enough privileges, the "Manage Pipelines"
link and UI won't show.
* Users can add two types of databases through the UI: MaxMind and
IPinfo. Database names are predefined by ES, and the user cannot enter
their own.
* Certain types of databases (local and web) can be configured through
ES, and these will appear in the UI, but they cannot be deleted as they
are read-only.
* When configuring a `IP location` processor, the database field will
display a list of available and configured databases that the user can
select. It also allows for free-text input if the user wants to
configure a database that does not yet exist.
* The new IP location processor is essentially a clone of the GeoIP
processor, which we are moving away from due to copyright issues.
However, it was decided that GeoIP will remain as is for backward
compatibility, and all new work will only be added to IP location going
forward.
* I left a few mocks in the `server/routes/api/geoip_database/list.ts `
to try `local/web` types

## Release note
The Ingest Pipelines app now supports adding and managing databases for
the GeoIP processor. Additionally, the pipeline creation flow now
includes support for the IP Location processor.

<details>
<summary>Screenshots</summary>

![Screenshot 2024-10-07 at 09 36
31](https://github.com/user-attachments/assets/60d438cc-6658-4475-bd27-036c7d13d496)
![Screenshot 2024-10-07 at 09 38
58](https://github.com/user-attachments/assets/7c08e94f-b35c-4e78-a204-1fb456d88181)
![Screenshot 2024-10-07 at 09 47
08](https://github.com/user-attachments/assets/2baca0bd-811d-4dd5-9eb6-9b3f41579249)
![Screenshot 2024-10-07 at 09 47
20](https://github.com/user-attachments/assets/74d8664c-8c73-41f3-8cd5-e0670f3ada77)
![Screenshot 2024-10-07 at 09 48
19](https://github.com/user-attachments/assets/9fb4c186-6224-404c-a8d6-5c44c14da951)
![Screenshot 2024-10-07 at 09 48
25](https://github.com/user-attachments/assets/07e4909d-2613-45aa-918b-11a189e14f6f)


</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
Co-authored-by: Elena Stoeva <elenastoeva99@gmail.com>
Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
Co-authored-by: Matthew Kime <matt@mattki.me>
2024-10-15 17:58:43 +00:00
Mike Côté
1bc487c1bf
Set MGet as the claim strategy for serverless (#194694)
In this PR, I'm modifying the `config/serverless.yml` file to contain
`xpack.task_manager.claim_strategy: mget`. We've rolled out the mget
task claimer in phases using the kibana-controller, now that all
projects are using the mget task claiming strategy, we can move the
config here and cleanup all the places in the kibana-controller that set
this flag.

Once this commit rolls out to all serverless projects, I'll be able to
start cleaning up the kibana-controller.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-15 10:21:09 -05:00
Jared Burgett
ea582dc650
Flipped Security Entity Store flag to being a "disable" flag (#195818)
## Summary

The Security Solution Entity Store feature will now be available by
default. However, there will be a flag that can be switched on, if
desired, to **disable** that feature entirely.

Regardless of whether this flag is enabled or not, Security's Entity
Store is still only fully enabled through an enablement workflow. In
other words, a Security Solution customer must turn on the feature
through an onboarding workflow in order to enable its features.

Additionally, we are disabling this feature in Serverless at first, to
perform proper Serverless load/performance testing. (We do not expect it
to be significantly different than ESS/ECH, but are doing so out of an
abundance of caution).

---------

Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
2024-10-14 23:56:08 -05:00
Dima Arnautov
13897083dc
[ML] Update vCPUs ranges for start model deployment (#195617)
## Summary

#### Different vCPUs ranges and enabling support for static allocations
based on the serverless project type

- Each serverless config yml, e.g.
[search.es.yml](84b3b79a15/config/serverless.es.yml (L61))
now contains parameters required for start model deployment:

```yml
xpack.ml.nlp:
  enabled: true
  modelDeployment:
    allowStaticAllocations: true
    vCPURange:
      low:
        min: 0
        max: 2
        static: 2
      medium:
        min: 1
        max: 32
        static: 32
      high:
        min: 1
        max: 512
        static: 512
```

Note: _There will be no static allocations option for serverless O11y
and serverless Security._

#### The minimum values of vCPUs

- 0 for the Low usage level on both serverless and ESS.
- 1 for the Medium and High usage levels on both serverless and ESS.
   
#### The default vCPUs usage levels
- Low in serverless.
- Medium in ESS and on-prem

### 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-10-14 16:38:26 +02:00
Rodney Norris
8577d1357e
[Search][Onboarding] Enable search indices & gate with a feature flag (#195802)
## Summary

This PR enables the `search_indices` plugin in serverless search. But
then gates it with a UI settings feature flag until we are ready to ship
the new onboarding experience to all users.

### Testing
Locally you can add this to your `kibana.dev.yml` to enable the FF:
```
uiSettings.overrides.searchIndices:globalEmptyStateEnabled: true
```

Or you can enable the ui setting via Dev Tools and refresh the browser:

```
POST kbn:/internal/kibana/settings/searchIndices:globalEmptyStateEnabled
{"value": true}
```

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2024-10-11 12:21:47 -05:00
Ignacio Rivas
ac2a5d29ba
[Index management] Project level retention support (#193715) 2024-10-11 12:19:43 -05:00
Rodney Norris
a84b3f841c
[Search][Homepage] Remove usage (#194870)
## Summary

Removing search home usage from serverless search and enterprise search.
The search home page project is on hold while we re-assess requirements.
Until we know when we are starting that back up I'm removing the feature
flagged usage to simplify other work. When we spin this back up usage
will likely be different anyway with other projects like onboarding and
the updating navigation refactor in enterprise_search.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-04 13:30:37 -05:00
Jon
41aed83d2b
Update version to 9.0.0 (#192040)
Updates our base version to 9.0.0

For reviewers: there are test skips in this pull request. Please assess
whether these failures should block merging as part of your review. If
not, we will track them in
https://github.com/elastic/kibana/issues/192624.

---------

Co-authored-by: Sebastián Zaffarano <sebastian.zaffarano@elastic.co>
2024-09-12 16:10:49 -05:00
Jaime Soriano Pastor
3f39469e3b
[Fleet] Update Package Spec max version to 3.2 (#192493)
Kibana should already support packages with spec version 3.2, update the
max version in serverless.

Supersedes part of https://github.com/elastic/kibana/pull/184792.

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
2024-09-12 05:38:26 -05:00
Jen Huang
c4b7a82e31
[UII] Update package spec min version to 3.0 for serverless projects (#184792)
## Summary

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

As the title says :)

This also corrects `spec.max` to `3.1`, which it should have been all
along.

Integrations available for Observability projects after change:
[Click
here](b9592e60-0bda-4597-b7fc-0e7ee5a673da)

Integrations available for Security projects after change:
[Click
here](f74142ae-88d8-4445-96f7-413c12a1434b)
2024-09-11 13:03:57 -07:00
Joe McElroy
c5fe61851c
[Search] [Onboarding] Add metering stats API information to indices GET (#191631)
## Summary

Adds index size and doc count to indices management indices API. This
API is available only on ES3, relying on the _metering/stats API to
provide this information. The use of the API is scoped only for
serverless projects, via a config.

AppEx will roll out the UI changes for the other ES3 project solutions.

### 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
- [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
- [ ] [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>
2024-09-02 05:39:54 -05:00
Amir Ben Nun
096c52f096
Revert "Agentless API certificates path for security projects" (#191571)
Reverts elastic/kibana#191248

Reverting since this configuration will be set by kibana-controller
- Resolves: https://github.com/elastic/agentless-api/issues/278
2024-08-28 15:24:21 +03:00
Amir Ben Nun
7559e601b9
Agentless API certificates path for security projects (#191248) 2024-08-26 19:10:45 +03:00
Yulia Čech
124e433de5
[Console] Enable the monaco migration on serverless projects (#189748)
## Summary

This PR enables the Monaco migration for Dev Tools Console on
serverless.

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-08 10:55:49 -05:00
Sébastien Loix
03607ec7e0
[Stateful sidenav] Remove Launch Darkly feature flag (#189513) 2024-08-02 07:48:19 -05:00
Joe McElroy
1b84a24872
[Search] [Playground] Enable Gemini Connector on ES3 (#189267)
## Summary

Enable Gemini connector on ES3 search projects so playground can use.


### 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)
2024-07-26 07:14:49 -05:00
Sander Philipse
8e7d634e1c
[Search] Disable semantic text UI on Serverless Search (#188683)
## Summary

Disables semantic text UI on Serverless Search
2024-07-19 12:18:04 +02:00
Elena Stoeva
781db4507d
[Index Management] Disable data stream stats in serverless (#186420)
Closes https://github.com/elastic/kibana/issues/184671
Fixes https://github.com/elastic/kibana/issues/186245
Fixes https://github.com/elastic/kibana/issues/186243
Fixes https://github.com/elastic/kibana/issues/186242

## Summary

This PR disables the data stream stats API request in serverless and the
stats toggle in the Data stream list view. It adds a new config
`enableDataStreamStats` and removes the `enableDataStreamsStorageColumn`
one as it is now redundant (since the storage size property is part of
the data stream stats).

### How to test:

**In serverless:**
1. Start serverless Es and Kibana
2. Go to Stack Management -> Index Management and open the Data Streams
tab.
3. Verify that the stats toggle is not displayed and the data stream
detail panels don't include any of the stats (`storageSizeBytes` and
`maxTimeStamp`).

**In stateful:**
1. Start stateful Es and Kibana
2. Go to Stack Management -> Index Management and open the Data Streams
tab.
3. Verify that the stats toggle is displayed and switching it adds the
stats columns to the table.
4. Verify that the data stream detail panels include the stats.


<!--
### 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)
-->
2024-06-21 13:45:23 -07:00
Yulia Čech
5e346b2561
[Console] Enable monaco by default (#184862)
## Summary

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

This PR enables the migration from Ace to Monaco in Dev Tools Console by
default in the main branch. All serverless projects will still have the
migration disabled by default. After 8.15 is branched, the migration
will be disabled there as well. The intended release version for this
migration is 8.16.

### Functional tests 
This PR creates a copy of functional tests for Monaco Console and keeps
the tests for Ace in a separate folder. When the migration is released,
we can remove the code for Ace together with tests.
The Monaco tests are not the exact copy of the Ace tests, since some
functionality and autocomplete behaviour is slightly different in the
migrated Console. For example, the auto-closing of brackets works in
Monaco when typing something, but is not kicking in in the tests.

Flaky test runner 

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-19 17:37:04 +02:00
Rodney Norris
74c4d3a85e
[Search] Homepage Plugin setup (#186224)
## Summary

Introducing the `search_homepage` plugin along with integration into
`enterprise_search` and `serverless_search` behind a feature flag. This
will allow implementing the feature gated behind the feature flag.

To test these changes you can enable the feature flag with the Kibana
Dev Console using the following command:
```
POST kbn:/internal/kibana/settings/searchHomepage:homepageEnabled
{"value": true}
```

You can then disable the feature flag with the following command:
```
DELETE kbn:/internal/kibana/settings/searchHomepage:homepageEnabled
```

### 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>
2024-06-19 12:47:18 +02:00