Commit graph

1605 commits

Author SHA1 Message Date
Charis Kalpakis
c75f67970e
[ska][x-pack] Move canvas, watcher and dev_tools functional tests 2025-06-27 17:20:22 +03:00
Julia Rechkunova
d0da9f94c6
[Discover Tabs] Restore sidebar width and collapsible state when switching tabs (#225327)
Follow up for 
- https://github.com/elastic/kibana/pull/224299

## Summary

- [x] sidebar width
- [x] is sidebar collapsed
- [x] add functional tests 


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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_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>
2025-06-27 09:19:50 +02:00
Tiago Costa
3640c42884
chore(NA): update pipeline resource definitions after bump 9.2.0 (#225525)
This PR updates the pipeline resource definitions to support the new 9.1
branch.
2025-06-27 03:12:29 +01:00
Dzmitry Lemechko
868a4657ee
[ska] relocate api_integration_basic & defend_workflows_cypress tests (#225374)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

Before:

```
x-pack/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

After: 
```
x-pack/solutions/security/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
2025-06-26 17:43:58 +01:00
Dzmitry Lemechko
2e2576fbf5
[ska][x-pack] relocate reporting tests (#225333)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test/

Before:

```
x-pack/test/
     | - reporting_api_integration/
     | - reporting_functional/

```

After: 
```
x-pack/platform/test/
     | - reporting_api_integration/
     | - reporting_functional/
```

Few page objects, required by functional tests, were relocated as well

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-26 08:35:10 -05:00
Nick Partridge
17c2556fc6
[Lens] Add internal CRUD api routes (#223296)
## Summary

This adds basic Lens CRUD api routes using the Content Management
system.

| Operation | URI |
|--------|--------|
| Create | `POST api/lens/visualizations` |
| Get | `GET api/lens/visualizations/{id}` |
| Search | `GET api/lens/visualizations?query=test` |
| Update | `PUT api/lens/visualizations/{id}` |
| Delete | `DELETE api/lens/visualizations/{id}` |

### Changes to Lens Content Management

The custom `update` method uses `soClient.create` under the hood for
reasons (i.e. #160116). However, doing this acts as an update or create
method with the provided `id`. I changed this behavior so now any update
where the id is not found will return a `404` error.

Closes #221941
Closes #221942 - OpenAPI docs auto generate from route schema

### Testing

You can testing this locally in kibana dev console like so...

```
GET kbn:/api/lens/visualizations/<id>?apiVersion=1
```

> The `apiVersion` query param is needed to test `internal` api routes.

## 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/src/platform/packages/shared/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: Marco Vettorello <marco.vettorello@elastic.co>
2025-06-25 20:01:35 +01:00
Dzmitry Lemechko
bb7cce6d7b
[ska] relocate x-pack/test/cases_api_integration (#225056)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from
x-pack/test/cases_api_integration and updating related imports

Before:

```
x-pack/test/
     | - cases_api_integration/
```

After: 
```
x-pack/platform/test/
     | - cases_api_integration/
 
x-pack/solutions/security/test/
     | - cases_api_integration/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-25 18:04:29 +01:00
Brad White
385a9df4da
Renovate helper pipeline (#224152)
## Summary
- Part of #213293
- Adds infrastructure for a new pipeline: `kibana / renovate helper` 
- The pipeline and scripts are currently a no-op and will be finalized
and tested in a follow up PR against the provisioned pipeline.

## Plan
The goal is to automatically run a script when Renovate opens a PR to
dedupe and perform any other actions, then trigger the Kibana PR
pipeline. This can also be performed by commenting `buildkite run
renovate helper` in the instances where the PR has been rebased by
Renovate.

Additionally, this pipeline will trigger the Kibana PR pipeline
automatically for Renovate PRs when the commit author is not Renovate
bot. Currently a developer has to comment every time they want CI to run
on Renovate PRs. This will improve DX when merging upstream, debugging
the dep upgrade and auto-commits by `kibanamachine`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-25 10:35:37 -06:00
Dzmitry Lemechko
58b8c7aec0
[ska] [xpack] relocate platform tests (#225223)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving platform tests from x-pack/test/

Before:

```
x-pack/test/
     | - ftr_apis/
     | - load/
     | - plugin_api_perf/
     | - fleet_packages/
     | - fleet_tasks/
     | - scalability/
     | - task_manager_claimer_update_by_query/
```

After: 
```
x-pack/platform/test/
     | - ftr_apis/
     | - load/
     | - plugin_api_perf/
     | - fleet_packages/
     | - fleet_tasks/
     | - scalability/
     | - task_manager_claimer_update_by_query/

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-25 17:01:04 +02:00
Jon
57804aec8a
[ci] Only validate next docs on pull requests targeting main (#225185)
Dev docs are only released off the main branch. We don't need to
validate these changes on backports.
2025-06-25 09:21:12 -05:00
Dzmitry Lemechko
fbddd79f24
[ska] relocate x-pack/test/osquery_cypress (#225104)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving osquery cypress dir with
security-solution imports

```
x-pack/test/osquery_cypress
```

After: 
```
x-pack/solutions/security/test/osquery_cypress
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-25 10:12:35 +02:00
Maxim Palenov
87c8b882c2
[Security Solution] Implement prebuilt rules import test plan (#223421)
**Addresses:** https://github.com/elastic/kibana/issues/202079

## Summary

This PR implement prebuilt rules import [test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_import.md).

Prior existing tests were superseded by the new ones.

## Discovered issues

It turned out that the current implementation behaves slightly differently than described the test plan. Failed test scenarios are skipped and the following tickets have been created for tracking

- https://github.com/elastic/kibana/issues/223099https://github.com/elastic/kibana/issues/223099
- https://github.com/elastic/kibana/issues/223280
- https://github.com/elastic/kibana/issues/223253

## Extra changes

Some diff like in `alert_threat_enrichments.cy.ts` has been caused by disabling errors swallowing upon rule creation. It's important to have tests properly preparing the testing environment to reduce chances of test dependencies and flakiness. In particular some prebuilt rules import test scenarios require custom rules to be created. Swallowing rule creation errors reduces tests coverage. 

## Flaky test runner

-   [`detection_engine_security` package related prebuilt rules import integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8365) (100 iterations)
-  [prebuilt rules import ECH integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8366) (100 iterations)
-  [prebuilt rules import Serverless integration tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8367) (100 iterations)
2025-06-24 13:24:10 +01:00
Sergi Romeu
c1563c2f45
[ObsUX] Remove entities v2 code and Inventory (#224696)
Co-authored-by: Milton Hultgren <milton.hultgren@elastic.co>
Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-24 08:12:28 -04:00
Steph Milovic
63134aa8eb
[Security solution] Add github label for evals for prompt changes (#224488) 2025-06-23 17:25:05 -06:00
Gergő Ábrahám
3b6a0dcd1e
[Security][9.1] Security roles siemV3 migration for Global Artifact Management (#219566)
> [!TIP]
> looks huge, but
> - 5,402 lines snapshot tests
> - 714 lines yaml files

## Summary

This PR adds a new feature version `siemV3` with the required role
migrations, in order to enable the new privilege
`global_artifact_management_all` for users where needed.

### What's in the PR?
- Required changes around security role migration from `siemV2` to
`siemV3`

- Improvements by parameterizing `siemV3` in lots of places, to ease
future role migrations by decreasing the occurrences that have to be
changed.
- A new function called `baseFeatureConfigModifier()` in
`ProductFeaturesConfig`: now product features have the ability to modify
the base Kibana feature. de05a3b167
- Product feature `endpointArtifactManagement` is split to
ESS/Serverless counterparts, and adds role migrations to the base Kibana
config using `baseFeatureConfigModifier()`
(1c31f56b43). This solves 2 problems:
  - Different migrations are needed for ESS and Serverless.
- The product feature `endpointArtifactManagement`, and hence the
privilege `global_artifact_management_all` is not available on all
serverless tiers (see [these
fails](https://buildkite.com/elastic/kibana-pull-request/builds/310534/summary/annotations?jid=019788c8-d03e-44e7-867f-ff1557f9e894#019788c8-d03e-44e7-867f-ff1557f9e894/256-4872)),
therefore the migration needed to be separated from the base Kibana
feature config.
- (note: these changes were safeguarded by the role migration tests and
snapshot tests)
- Security / **Global Artifact Management** [space awareness]:
- moves the sub-privilege out of feature flag, in order to be able to
target it for role migrations
  - adds a 'Coming soon' test to the privilege
    - `endpointManagementSpaceAwarenessEnabled:false` 
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/fdfd5fc7-7f7d-4210-96c9-09e2357530c0"
/>
    - `endpointManagementSpaceAwarenessEnabled:true`
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/f8361a4c-da6e-416c-b728-5788eb1a053e"
/>
- role migration is added: in short, any artifact ALL privilege causes
the new Global Artifact Management ALL privilege to be added
(https://github.com/elastic/security-team/issues/11717)
  - predefined roles are updated locally
(note: in elasticsearch-controller, it'll be updated after this PR is
merged and deployed,
https://github.com/elastic/elasticsearch-controller/pull/1010)
- tests!
- testing the migration itself: b8d90d085f
and 309abb30a8
- snapshot test with deprecated features:
https://github.com/elastic/kibana/pull/219566/files#diff-ed11536475a7a6f0a835cbc950c3b7405093058ad42bab30cf06f41ed21561a3
- some functional tests enabled for deprecated features:
4b4f49ea3d

## Global Artifact Management role migrations

```mermaid
flowchart LR

    subgraph siemV2[siem/siemV2]
        none1[none]
    end

    subgraph siemV3
        none2[none]
    end

    none1 --> none2
```

```mermaid
flowchart LR

    subgraph siemV2[siem/siemV2]
        read1[read]
    end

    subgraph siemV3
        read2[read]
    end

    read1 --> read2
```

```mermaid
flowchart LR
    classDef serverless stroke:blue,stroke-dasharray: 5 5

    subgraph siemV2[siem/siemV2]
        subgraph minread1[minimal_read]
            minread1_subs["`trusted_applications_read
                event_filters_read
                blocklist_read
                host_isolation_exceptions_read`"]

            minall1_subs["`trusted_applications_all
                event_filters_all
                blocklist_all
                host_isolation_exceptions_all`"]

            eer1["`endpoint_exceptions_read
                (only serverless)`"]:::serverless
            eea1["`endpoint_exceptions_all
                (only serverless)`"]:::serverless
        end
    end

    subgraph siemV3
        subgraph minread2[minimal_read]
            minread2_subs["`trusted_applications_read
                event_filters_read
                blocklist_read
                host_isolation_exceptions_read`"]

            minall2_subs["`trusted_applications_all
                event_filters_all
                blocklist_all
                host_isolation_exceptions_all`"]

            eer2["`endpoint_exceptions_read
                (only serverless)`"]:::serverless
            eea2["`endpoint_exceptions_all
                (only serverless)`"]:::serverless
            g2[global_artifact_management_all]

        end
    end


    minread1 --> minread2
    minread1_subs -->|each to his own| minread2_subs
    minall1_subs -->|global for any of these| g2
    minall1_subs -->|each to his own| minall2_subs

    eer1 -->|only serverless| eer2
    eea1 -->|only serverless| eea2
    eea1 -->|only serverless| g2
    linkStyle 4,5,6 stroke:#00f,color:blue
```
notes for above:
- `global_artifact_management_all` have to be added for **any** artifact
write privilege (trusted apps, event filters, blocklists, host isolation
exceptions)
- on serverless, there is a separate endpoint exceptions privilege, it
counts as an artifact

```mermaid
flowchart LR

    subgraph siemV2[siem/siemV2]
        all1[all]
    end

    subgraph siemV3
        subgraph minall2[minimal_all]
            g1[global_artifact_management_all]
        end
    end

    all1 -->|keep access to the included Endpoint Exceptions ALL| g1
    all1 -->|enable sub-feature toggle| minall2
```

notes for above:
both on serverless and ESS, Endpoint Exceptions are included in ALL,
hence the migration

> [!note]
> `siem` sub-privileges are not included in READ/ALL parent privileges.
The user needs to enable them one-by-one after enabling the sub-feature
privileges toggle. So Endpoint Exception here is an exception. In any
sense of the word.

```mermaid
flowchart LR
    classDef serverless stroke:blue,stroke-dasharray: 5 5

    subgraph siemV2[siem/siemV2]
        subgraph minall1[minimal_all]
            minread1_subs["`trusted_applications_read
                event_filters_read
                blocklist_read
                host_isolation_exceptions_read`"]

            minall1_subs["`trusted_applications_all
                event_filters_all
                blocklist_all
                host_isolation_exceptions_all`"]

            eer1["`endpoint_exceptions_read
                (only serverless)`"]:::serverless
            eea1["`endpoint_exceptions_all
                (only serverless)`"]:::serverless
        end
    end

    subgraph siemV3
        subgraph minall2[minimal_all]
            minread2_subs["`trusted_applications_read
                event_filters_read
                blocklist_read
                host_isolation_exceptions_read`"]

            minall2_subs["`trusted_applications_all
                event_filters_all
                blocklist_all
                host_isolation_exceptions_all`"]

            g2[global_artifact_management_all]

            eer2["`endpoint_exceptions_read
                (only serverless)`"]:::serverless
            eea2["`endpoint_exceptions_all
                (only serverless)`"]:::serverless

        end
    end

    minall1 -->|only on ESS to keep access to the included Endpoint Exceptions ALL| g2

    minall1 --> minall2
    minread1_subs -->|each to his own| minread2_subs
    minall1_subs -->|global for any of these| g2
    minall1_subs -->|each to his own| minall2_subs

    eer1 -->|only serverless| eer2
    eea1 -->|only serverless| eea2
    eea1 -->|only serverless| g2
    linkStyle 5,6,7 stroke:#00f,color:#00f


    linkStyle 0 stroke:#0a0,color:#0a0


```

notes for above:
when sub-feature privileges are enabled,
- on ESS endpoint exceptions are still automatically included, that's
why we need to add global access
- on serverless, endpoint exceptions are controlled by the sub-feature
privilege (just like all other artifact privileges, see the note above)

## Background

- Previous role migration PR:
https://github.com/elastic/kibana/pull/201780
- Role migration description:
https://github.com/elastic/kibana/pull/186800

### 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)
- [ ]
[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
- [ ] 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-06-23 16:14:13 +02:00
Yara Tercero
f2d4278086
[Detections Response] Remove unused test (#224108)
## Summary

Addresses https://github.com/elastic/kibana/issues/151636 .

This test was leftover from migration. Does not appear to be used.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-20 12:39:25 -07:00
Charis Kalpakis
ce0d605fb4
Move apps/security and apps/spaces tests under platform 2025-06-20 17:17:48 +03:00
Julian Gernun
411ab215a5
[Response Ops][Connectors] New xpack.actions.email.services.enabled Kibana setting (#223363)
## Summary

Closes #220288

## Release note
New kibana setting `xpack.actions.email.services.enabled` to
enable/disable email services for email connector.
2025-06-20 16:10:43 +02:00
Rodney Norris
575e80bccc
[Search][Playground] View Saved Playground (#223062)
## Summary

This PR implements the frontend for opening a Saved Playground. As a
part of that there are several refactors to the current playground that
warrant regression testing.

### Testing

To test the saved playground view the search mode feature flag should be
enabled, either with a config override or via console:
```
POST kbn:/internal/kibana/settings/searchPlayground:searchModeEnabled
{"value": true} 
```

Then you will need to manually save a playground:

```
curl -X "PUT" "http://localhost:5601/internal/search_playground/playgrounds" \
     -H 'elastic-api-version: 1' \
     -H 'kbn-xsrf: dev' \
     -H 'x-elastic-internal-origin: Kibana' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -u 'elastic_serverless:<PASSWORD>' \
     -d $'{
  "elasticsearchQueryJSON": "{\\"retriever\\":{\\"standard\\":{\\"query\\":{\\"semantic\\":{\\"field\\":\\"text\\",\\"query\\":\\"{query}\\"}}}},\\"highlight\\":{\\"fields\\":{\\"text\\":{\\"type\\":\\"semantic\\",\\"number_of_fragments\\":2,\\"order\\":\\"score\\"}}}}",
  "indices": [
    "search-test"
  ],
  "name": "Test playground",
  "queryFields": {
    "search-test": [
      "text"
    ]
  }
}'
```

*Note this creates a saved playground in the Default space, and
playgrounds are space aware so it will only be available in the default
space. If you want to create a playground in another space you will need
to update this URL to include the space.

This assumes you have a `search-test` index created using the
semantic_text onboarding workflow mapping.

Then you can open the saved playground page at:
`/app/search_playground/p/<ID_RETURNED_FROM_CURL>`

## Screenshots
Chat

![image](https://github.com/user-attachments/assets/700958ed-e0e4-4276-b670-4bd4b70b3df9)

Chat - Query

![image](https://github.com/user-attachments/assets/4f2cb9f1-f1fe-47bd-b53d-4e59a4713689)

Search - Query

![image](https://github.com/user-attachments/assets/be96dcd9-2395-4117-a7d9-1080a0e1895b)

### 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/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [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>
2025-06-18 21:58:57 +02:00
Krzysztof Kowalczyk
5c441a49cb
[Share] Add unused url cleanup task (#220138)
## Summary
This PR adds a background task to `share` plugin which periodically
deletes saved objects of type `url` which have been older than a value
controlled by `share.url_expiration.duration` config - the default is 1
year.
The task can be run manually by calling `POST
/internal/unused_urls_task/run` with `superuser` privileges.

Config options (with their default values):

```yaml
share.url_expiration.enabled: false # controls whether the task is enabled
share.url_expiration.duration: '1y' # controls the expiration threshold
share.url_expiration.check_interval: '7d' # controls how often the task runs 
share.url_expiration.url_limit: 10000 # controls how many urls should be fetched at once
```

Closes: #179146

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-18 16:29:29 +02:00
Dzmitry Lemechko
995153f45f
[ska] relocate guided_onboarding tests that import search solution src code (#224390)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR relocates few test files from `/src/platform/test` dir that
imports from `@kbn/enterprise-search-plugin`, which is Search solution
plugin.

Before:

```
/src/platform/test/api_integration/guided_onboarding
     | - get_guides.ts
     | - put_state.ts
```

After: 
```
/x-pack/solutions/search/test/api_integration/guided_onboarding
     | - get_guides.ts
     | - put_state.ts
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-18 16:01:56 +02:00
Jon
53f5c7377c
Upgrade Node.js to 22.16.0 (#205983)
https://nodejs.org/en/blog/announcements/v22-release-announce
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Eyo Okon Eyo <eyo.eyo@elastic.co>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2025-06-18 08:55:18 -05:00
Julia Bardi
cc4b6609d7
[Fleet] Added FTR test to verify sync integrations to a remote cluster (#222573)
## Summary

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

Added test that starts 2 clusters, sets up remote ES output with sync
feature, sets up CCR between the clusters, and verifies the sync
installs the packages.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-06-17 12:56:58 +02:00
Julian Gernun
25b4f507e2
[Response Ops][Connectors] New xpack.actions.webhook.ssl.pfx.enabled config (#222507)
## Summary

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

## Release note
New `xpack.actions.webhook.ssl.pfx.enabled` Kibana setting to disable
Webhook connector PFX file support for SSL client authentication

---------

Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
2025-06-17 09:31:17 +02:00
Alexi Doak
fff8ae9bcc
[Response Ops][Alerting] Cannot read properties of undefined (reading 'getActiveCount') (#221799)
Resolves https://github.com/elastic/kibana/issues/208740

## Summary

This error message comes from the code where we drop the oldest
recovered alerts from being tracked in the task state when there are
more than 1000 (or alert limit) recovered alerts. The flapping refactor
fixed this specific error, but I noticed that the alert documents
weren't being updated before the alerts were dropped. This PR just moves
this logic to the function that gets all the alerts to serialize in the
task state, which happens after the alert documents are updated.


### Checklist

Check the PR satisfies following conditions. 

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

### To verify
1. Set `xpack.alerting.rules.run.alerts.max: 3` in kibana.yml
2. Start kibana and create a rule that will generate 3 alerts
3. Stop kibana and set the max alert limit to 2 in kibana.yml
4. Start kibana and update the conditions to recover the alerts. Because
there are 3 alerts recovering and we can only track 2, one alert will be
dropped from the task state.
5. Verify that all the alerts are marked as recovered. Let the rule run
to verify that one of the alert's alert document is no longer updated.
2025-06-16 21:13:36 -07:00
Kris Gross
e5c907a267
AI4DSOC security serverless periodic pipeline (#221127)
## Summary

Add the AI4DSOC API and Cypress test references that will be executed as
part of the security serverless periodic pipelines. This PR is paired
with this PR:
https://github.com/elastic/security-serverless-quality-gate/pull/47

Executions will occur here:

https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: dkirchan <diamantis.kirchantzoglou@elastic.co>
2025-06-16 17:00:07 -04:00
Charis Kalpakis
8b9c27e80b
[ska][x-pack] copy configs and ftr_content_provider under x-pack/platform/test/functional 2025-06-16 17:47:02 +03:00
Dominique Clarke
f15d325e3c
[Observability] [Serverless] Introduce custom roles (#219861)
## Summary

Closes https://github.com/elastic/observability-dev/issues/4539
Fixes https://github.com/elastic/kibana/issues/221035

Enables custom roles for Observability projects in serverless.

The following is a summary of the changes:

## Feature renaming

1. Renamed `Uptime and Synthetics` to `Synthetics`
2. Renamed `APM and User Experience` to `Applications`
3. Renamed `Metrics` to `Infrastructure`

## Category reassignment

1. Changed `Dashboard` category from `Analytics` to `Observability` 
2. Changed `Discover` category from `Analytics` to `Observability`
3. Changed `ML` category from `Analytics` to `Observability`

## Feature hiding

1. Hides the `Stack Alerts` feature.
2. Provides backwards compatibility for alerts created via Stack Alerts.
This enables our users to import rules created within Stack Alerts and
expect to see them in the Observability rules table.

## Navigation updates

1. Adds a `Custom Roles` link under the `Access` section in the
management navigation
2. Adds a `Manage Organization Members` link under the `Access` section
in the management navigation
3. Removes the `Users and Roles` link from the navigation footer (in
favor of the `Manage Organization Members link)

## Bug fixes

1. Fixes a bug where the `Alerts` link was not shown for Synthetics only
user (in stateful and serverless)
2. Fixes a bug where the `Alerts` link was not shown for Logs only user
(in stateful and serverless)

## Alert Override Removal

In the alerting framework, each rule is assigned a `consumer` value.
This `consumer` value changes depending on where the rule is created in
Kibana. However, in serverless we introduced an override that caused the
`consumer` value to be `Observability` in nearly every case. This logic
branched from stateful causing complexity and a large mental burden for
our engineers. Ultimately, this override became the source of bugs,
uncertainty, and unintended user experiences. Because of this, we've
removed this overrides.

If we kept this override, it would have the unfortunate side effect of
making all rules created in serverless visible from all custom roles (an
APM only user would have been can see Synthetics rules, and vice
versus). To make things more unpredictable, when users import their
rules from stateful the behavior would be different (access would be
properly mapped to the specific feature).

To address these specific user experience issues, and remove the source
of complexity, branching logic, and bugs, we removed this override logic
and restored the rule access behavior to match with stateful.

We did this while introducing backwards compatibility logic, ensuring
rules created in earlier versions of an oblt stateful cluster continue
to work and are accessible by a user with the right role access.

# Testing

1. Run local ES
```
yarn es serverless --projectType=oblt -E xpack.security.authc.native_roles.enabled=true    
```

2. Run local Kibana
```
yarn start --serverless=oblt --xpack.security.roleManagementEnabled=true --xpack.cloud.users_and_roles_url="https://test_users_and_roles_url"
```
3. Login to Kibana with the admin role. Navigate to the Custom Roles
page via the management navigation.
4. Create a custom role 
5. Log out of Kibana
6. Log back in with your custom role. You can do so by typing the custom
role name into the mock saml auth
<img width="460" alt="Screenshot 2025-05-22 at 9 23 13 PM"
src="https://github.com/user-attachments/assets/8e7f659b-5fe9-4e74-8c57-b420467d309e"
/>

---------

Co-authored-by: Jason Rhodes <jason.rhodes@elastic.co>
Co-authored-by: Faisal Kanout <faisal.kanout@elastic.co>
Co-authored-by: “jeramysoucy” <jeramy.soucy@elastic.co>
2025-06-13 22:03:49 -04:00
Robert Oskamp
61cc2fc20a
[Obs Logs Essentials] Initial FTR test setup (#223612)
## Summary

This PR adds the initial FTR test setup for the serverless Observability
Logs Essentials tier.

> [!IMPORTANT]
This PR is focused on providing the base structure and make sure the
tests can run in CI. The included tests are serving as usage examples
only and will have to be extended by Logs Essentials owners to achieve
proper test coverage.

### Changes

> [!NOTE]
The selection of tests for the logs essentials tier happens through
inclusion in specific test index files which are loaded by logs
essentials specific test config files. No tagging or other modification
of existing tests needed - the keep running for the complete tier. Test
files / directories can be included in complete tier test index files or
logs essentials tier test index files or both, giving us full control
over which tests are running where.

#### `x-pack/test_serverless` 

- Add api_integration and functional config files and index files,
including common tests and load some example tests each - this way,
existing complete tier tests can be selected and included fro logs
essentials test runs.
- Add api_integration and functional `logs_essentials_only` directories
and include them in the logs essentials test index file - this way, new
test can be created that do not run on the complete tier and are
specific to the logs essentials tier.
- Add one example test each (assert the SLO settings API is not
available / assert the SLO menu entry is not displayed). These serve as
placeholders and are mainly there to demonstrate usage of this area -
going forward, they should be replaced, extended and/or modified as
needed.

#### `x-pack/test/api_integration/deployment_agnostic`

- Extend serverless base config parameters with an optional `tier` so
actual configs calling `createServerlessTestConfig` can provide a
`tier`.
- Add logs essentials specific config and index file and include core
tests as an example.
- There are no `logs_essentials_only` tests in this area, because logs
essentials is a serverless only option and as such tests specific to
that option should go into the `test_serverless` directory.
2025-06-13 15:10:33 +02:00
Dzmitry Lemechko
6aafb4f7f4
[SKA] relocate alerting_api_integration tests (#222603)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from
x-pack/test/alerting_api_integration

Before:

```
x-pack/test/alerting_api_integration
     | - basic/
     | - common/
     | - observability/
     | - packages/
     | - security_and_spaces/
     | - spaces_only/
     | - spaces_only_legacy/
```

After: 
```
x-pack/platform/test/alerting_api_integration
     | - basic/
     | - common/
     | - packages/
     | - security_and_spaces/
     | - spaces_only/
     | - spaces_only_legacy/

x-pack/solutions/observability/test/alerting_api_integration
     | - observability/
          
x-pack/solutions/security/test/alerting_api_integration
     | - security_and_spaces/group1/
     | - security_and_spaces/group2/
```

Details:
- few tests in original `backfill` dir use helper function relying on
import from `@kbn/security-solution-plugin`, both tests and helpers were
relocated to `x-pack/solutions/security/test` dir.
- `observability` dir and its tests were relocated directly to
`x-pack/solutions/observability/test` dir.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-13 12:28:51 +02:00
Julian Gernun
f5b6aa241f
[Response Ops][Connectors][Email] xpack.actions.email.services.ses.host/port kibana config (#221389)
## Summary

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

## Release note

New AWS SES Email configuration options
`xpack.actions.email.services.ses.host` and
`xpack.actions.email.services.ses.port`.

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2025-06-12 08:38:08 -07:00
Dzmitry Lemechko
666f7ea237
[ska] update paths, kibana.jsons for test plugins (#223004)
## Summary

This pull request introduces changes to map test directories and plugins
according new SKA

### Test Directory Organization:

*
[`.buildkite/pull_requests.json`](diffhunk://#diff-f6a29d74dea38fb756d38e158cbd1c306158a61f66da3d0633bb64af3000e5cfR44-R45):
Added regex patterns to include directories under `x-pack/platform/test`
and `x-pack/solutions/(search|observability|security)/test` for build
reuse.
[[1]](diffhunk://#diff-f6a29d74dea38fb756d38e158cbd1c306158a61f66da3d0633bb64af3000e5cfR44-R45)
[[2]](diffhunk://#diff-f6a29d74dea38fb756d38e158cbd1c306158a61f66da3d0633bb64af3000e5cfR72-R73)
[[3]](diffhunk://#diff-f6a29d74dea38fb756d38e158cbd1c306158a61f66da3d0633bb64af3000e5cfR99-R100)
*
[`src/platform/packages/shared/kbn-test/src/functional_test_runner/cli/code_owners.ts`](diffhunk://#diff-be6c88de4eca4b556f8b3d63174abc86830a2fc76502ccc318de3753fcf69e42L16-R25):
Expanded `TEST_DIRECTORIES` to include new test paths for `platform` and
`solutions` groups.

### Module Grouping Logic:

*
[`packages/kbn-repo-source-classifier/src/group.ts`](diffhunk://#diff-ca1d6e73c75bc70f1f99a19fdc6cca66ca79dc290de32f222595aa7d0b5099b9R49-R52):
Updated `MODULE_GROUPING_BY_PATH` to include `x-pack/platform/test` and
`x-pack/solutions/*/test` directories under their respective groups with
appropriate visibility settings.
[[1]](diffhunk://#diff-ca1d6e73c75bc70f1f99a19fdc6cca66ca79dc290de32f222595aa7d0b5099b9R49-R52)
[[2]](diffhunk://#diff-ca1d6e73c75bc70f1f99a19fdc6cca66ca79dc290de32f222595aa7d0b5099b9R61-R64)

### Plugin Metadata Updates:

* Various plugin `kibana.jsonc` files under `x-pack/platform/test`:
Added `group` and `visibility` fields to ensure plugins are categorized
under the `platform` group with `private` visibility.
[[1]](diffhunk://#diff-9a5f9434970ecdc05e4e011ea6a677d5df9daff80173d30e871bee57f291dc61R5-R6)
[[2]](diffhunk://#diff-4c6f1ed3260dd9413db2e7ac107bec1c68db883fed9fe5adb4416494bf2ad770R5-R6)
[[3]](diffhunk://#diff-54d92cdb9f449d9787cc79650f65fca02d3c28698d16bcb3a2195e638a0ef3b0R5-R6)
[[4]](diffhunk://#diff-821b5bb2cb432c7817e3bc2be254be13f9ae721f9b6ec48d604df1f5f35a065dR5-R6)
[[5]](diffhunk://#diff-32ee7ae7e104765e023fbb7cc98f770056c51f61e9c33f1530367b04cabe0e68R5-R6)
[[6]](diffhunk://#diff-8f976d082851d9e761a5bb0d8b044aeae7069ab013312e7fed2616932c3fd013R5-R6)

These changes collectively improve the organization and maintainability
of test-related files and plugins within the repository.
2025-06-10 22:00:02 +02:00
Jon
eeee1bf1e8
[ci/chrome-forward-testing] Report test failures to GitHub (#223108) 2025-06-10 09:45:43 -05:00
Jon
96f48648a9
Upgrade Node.js to 20.19.2 (#221177)
https://github.com/nodejs/node/releases/tag/v20.19.2

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2025-06-09 12:17:42 -05:00
Walter Rafelsberger
5af2dc6b05
Update @elastic/charts to v70, remove legacy time axis support (#210579)
## Summary

Part of #193683. Replaces renovate bot PR #216102 for Elastic Charts v70
(see that PR for fully embedded release notes).

- Upgrade Elastic Charts from v69 to v70
- Remove `MULTILAYER_TIME_AXIS_STYLE` constants and imports
- Remove `timeAxisLayerCount` parameters from Axis components
- Add explanatory comments to all `xScaleType={ScaleType.Time}` usages
- Fix a regression in data visualizer column charts by disabling grid
lines

close https://github.com/elastic/kibana/issues/221509

### Release Notes

Updates time based charts to use the multi-layer time axis by default,
providing a better time window context and improved label positioning.

Before:


![image](https://github.com/user-attachments/assets/ac038f77-ecbd-4cd3-9ac4-9deccecf6f70)

After:


![image](https://github.com/user-attachments/assets/7a151ee4-381a-4708-9e7c-452b4e804745)

### Remove Legacy Time Axis Support

- This PR leaves the advanced setting `visualization:useLegacyTimeAxis`
in place but the setting will no longer be picked up in the UI and
charts with time axis will be rendered using the multi layer time axis.
[The removal of the advanced setting will be done in a follow
up](https://github.com/elastic/kibana/issues/213780)
- Removes the `MULTILAYER_TIME_AXIS_STYLE` constant and related styling,
this is now covered by Elastic Charts itself.

Code that was previously using custom styles and settings to use the
multilayer time axis, now updated to use the multi layer time axis by
default now:

- vis_types/xy
- vis_types/timeseries
- chart_expressions/expression_xy
- lens/xy
- ML: Data visualizer components
- ML: AIOps document count histogram

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

Risk of layout regressions because of removal of the legacy time axis.
This PR needs manual testing of the affected components.

### For Reviewers

If you are pinged, is probably do to the changes we are doing at the
timeseries chart level. These are visual changes that, without our
direct ping on code, can probably go unnoticed. So we kindle ask you to
pull the PR locally and verify if the timeseries charts within your
solutions/apps looks ok. Thanks

---------

Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-06 12:34:33 +02:00
Rickyanto Ang
d55bf7d67a
[Cloud Security] Cypress for Asset Inventory Datagrid (#222462)
## Summary

Added Cypress test for Asset Inventory Datagrid
it covers:
- Basic Table rendering
- Basic Flyout rendering (for all types)
2025-06-05 08:25:54 -07:00
Shahzad
257849f498
[Synthetics] Combine condition to run all synthetics based tests !! (#222790)
## Summary

 Combine condition to run all synthetics based tests  !!
2025-06-05 09:22:15 -05:00
Dzmitry Lemechko
9cc9e20c95
[ska][x-pack] relocate security solution tests [5] (#220465)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test to
x-pack/solutions/security/test

Before:

```
x-pack/test/
     | - api_integration/apis/cloud_security_posture/
     | - cloud_security_posture_api/
     | - cloud_security_posture_functional/
```

After: 
```
x-pack/solutions/security/test/
     | - api_integration/apis/cloud_security_posture/
     | - cloud_security_posture_api/
     | - cloud_security_posture_functional/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-04 16:52:19 +02:00
Dzmitry Lemechko
966f73481d
[FTR] add feature flags configs for deployment-agnostic tests (#222371)
Relocating tests added in #221139 into separate feature flag configs,
that are not run on MKI but only Kibana CI.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-04 15:57:03 +02:00
Dzmitry Lemechko
7401d234c3
[ska][x-pack] relocate platform & solutions tests [6] (#220612)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test to platform and
solutions dirs

Before:

```
x-pack/test/api_integration
     | - apis/metrics_ui/
     | - apis/ml/
     | - apis/entity_manager/
     | - apis/search_playground/
```

After: 
```
x-pack/platform/test/
     | - apis/entity_manager/
     | - apis/ml/
x-pack/solutions/observability/test/
     | - apis/metrics_ui/
x-pack/solutions/search/test/
     | - apis/search_playground/
```

New test package was created under `x-pack/solutions/search/test` for
Search solution tests.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-03 21:01:47 +03:00
Dzmitry Lemechko
f93e3b0178
[ska][x-pack] relocate platform tests [7] (#220803)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test to
x-pack/platform/test

Before:

```
x-pack/test/
     | - encrypted_saved_objects_api_integration/
     | - plugin_api_integration/
```

After: 
```
x-pack/platform/test/
     | - encrypted_saved_objects_api_integration/
     | - plugin_api_integration/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-03 14:57:31 +02:00
Antonio
7cad18fc68
[ResponseOps][MW] Fix MW oas docs capture. (#221727)
Closes #210326

## Summary

The public Maintenance Window API specification was missing from
`oas_docs/output/kibana.yaml`.

The `capture_oas_snapshot.sh` script had an outdated path.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2025-06-03 13:05:18 +02:00
Brad White
3a879d46fb
[Scout] Run if Streams changes match (#222126)
## Summary

Streams Scout tests were not running when they should be. See
https://elastic.slack.com/archives/C5UDAFZQU/p1748638204357009
2025-06-03 03:41:10 +03:00
Maxim Palenov
d853886250
[Security Solution] Fix MKI tests for prebuilt rules (#222170)
**Relates to:** https://github.com/elastic/kibana/pull/219831

## Summary

This PR fixes MKI tests configuration for prebuilt rules after performing refactoring in https://github.com/elastic/kibana/pull/219831. Since shorthand script in `x-pack/test/security_solution_api_integration/package.json` are used only for running MKI tests and local development it didn't cause PR pipeline failures and became prominent after running MKI tests. 

## Pipelines

[Kibana / Serverless / Security Solution Quality Gate / Rule Management](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-rule-management) pipeline was manually ran against this PR.

-   [Periodic pipeline](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-rule-management/builds/2786)
-   [Quality gate pipeline](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-rule-management/builds/2786)
2025-06-02 17:16:42 +03:00
Maxim Palenov
3ea69afa83
[Security Solution] Refactor prebuilt rules integration tests (#219831)
**Related Epic:** https://github.com/elastic/kibana/issues/179907

## Summary

This PR refactors prebuilt rules integration tests structure to streamline the implementation of test plans targeted [Prebuilt Rules Customization Milestone 4](https://github.com/elastic/kibana/issues/179907).

## Details

Existing integration tests structure have prebuilt rules related integration tests scattered around rules management area. Due to historical reasons and pace of the prebuilt rules customization development some old tests were updated, some new were added as random spots as well as some new tests structure was suggested.

This PR moves files and some tests around to the following structure

- `test_suites/detection_response/rules_management/prebuilt_rules` is the root folder for prebuilt rules related integration tests
- `customization_disabled` subfolder contains prebuilt rules integration tests covering scenarios when users have **insufficient** for customization license level (basic/essentials)
- `customization_enabled` subfolder contains  prebuilt rules integration tests covering scenarios when users have **sufficient** for customization license level
- `customization_disabled` and `customization_enabled` subfoldera have test suites grouped by sub domains
  - `prebuilt_rules_package` - contains integration tests related to detection rules Fleet package installation and updating, bootstrap is also belong to here
  - `install_prebuilt_rules` - contains tests related to prebuilt rules installation from prebuilt rule assets
  - `upgrade_prebuilt_rules` - contains tests related to prebuilt rules upgrade workflow
  - `customization` - contains tests related to prebuilt rules customization including `is_customized` calculation
  - `import_export` - contains tests related to exporting and importing customized and non-customized prebuilt rules
  - `status` - contain status endpoints related tests
2025-05-30 12:23:45 +02:00
Sonia Sanz Vivas
abf2c2c789
Update console definitions branches (#221888)
## Summary

With https://github.com/elastic/kibana/pull/207036 we introduced some
changes in the script so that it generates two PRs: one for the `main`
branch and one for `8.x` in order to keep previous versions with their
corresponding console definitions.

This PR updates the branches so the script generates PRs for `main`,
`9.0`, `8.19` and `8.18`
2025-05-29 19:35:17 +03:00
Alex Szabo
9a806938ae
[ci] trigger artifact builds for 9.0 also (#221791)
## Summary
These jobs should be triggered for 9.0 as well (now that main is on
9.1):
https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs/builds/5001

Since we no longer have a long-term 8.x branch, we may simplify the
triggering logic, and trigger it for any non-main, non-7.17 branches.
2025-05-28 16:13:47 +02:00
Arturo Lidueña
85efa38773
Stateful Deployment-Agnostic FTR Config for AI Assistant (#221469)
Closes [#221468](https://github.com/elastic/kibana/issues/221468)

## Summary

Create a Dedicated Stateful Deployment-Agnostic FTR Config for AI
Assistant
2025-05-27 11:39:10 +02:00
Kevin Delemme
9650da839f
chore(streams): add scout test for wired and classic stream (#220295) 2025-05-23 08:37:51 -04:00
Jon
aa6b42369f
[ci] Increase disk for capture_oas_snapshot (#221267) 2025-05-22 09:39:21 -05:00