Commit graph

77610 commits

Author SHA1 Message Date
Chris Cowan
c42eec3886
[EEM] Add basic integration test (#190097)
## Summary

This PR adds some basic integration tests. I also had to modify the
Entity schemas to allow for parsing the dynamic metadata fields. I don't
love the type solution and would ideally like to have something like:
```typescript
const entitySchema = createEntitySchemaFromDefintion(entityDefinintion);
```
which would dynamically generate an entity schema from the definition
based on the identity and metadata fields. I have a prototype that sort
of works but still needs a lot of work and started to become a huge
"time suck".

Closes [139](https://github.com/elastic/elastic-entity-model/issues/139)
2024-08-14 17:26:51 -05:00
elastic-renovate-prod[bot]
ec196ce91c
Update sergeysova/jq-action action to v2.3.0 (main) (#190552)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sergeysova/jq-action](https://togithub.com/sergeysova/jq-action) |
action | minor | `v2` -> `v2.3.0` |

---

### Release Notes

<details>
<summary>sergeysova/jq-action (sergeysova/jq-action)</summary>

###
[`v2.3.0`](https://togithub.com/sergeysova/jq-action/releases/tag/v2.3.0)

[Compare
Source](https://togithub.com/sergeysova/jq-action/compare/v2.2.1...v2.3.0)

##### What's Changed

- Use $GITHUB_OUTPUT instead of set-output by
[@&#8203;satoryu](https://togithub.com/satoryu) in
[https://github.com/sergeysova/jq-action/pull/9](https://togithub.com/sergeysova/jq-action/pull/9)

##### New Contributors

- [@&#8203;satoryu](https://togithub.com/satoryu) made their first
contribution in
[https://github.com/sergeysova/jq-action/pull/9](https://togithub.com/sergeysova/jq-action/pull/9)

**Full Changelog**:
https://github.com/sergeysova/jq-action/compare/v2...v2.3.0

###
[`v2.2.1`](https://togithub.com/sergeysova/jq-action/releases/tag/v2.2.1)

[Compare
Source](https://togithub.com/sergeysova/jq-action/compare/v2.2.0...v2.2.1)

##### What's Changed

- Fix globbing in input by
[@&#8203;norman-zon](https://togithub.com/norman-zon) in
[https://github.com/sergeysova/jq-action/pull/7](https://togithub.com/sergeysova/jq-action/pull/7)

##### New Contributors

- [@&#8203;norman-zon](https://togithub.com/norman-zon) made their first
contribution in
[https://github.com/sergeysova/jq-action/pull/7](https://togithub.com/sergeysova/jq-action/pull/7)

**Full Changelog**:
https://github.com/sergeysova/jq-action/compare/v2.2.0...v2.2.1

###
[`v2.2.0`](https://togithub.com/sergeysova/jq-action/releases/tag/v2.2.0)

[Compare
Source](https://togithub.com/sergeysova/jq-action/compare/v2.1.0...v2.2.0)

##### What's Changed

- fix: use correct multiline output by
[@&#8203;kennethkalmer](https://togithub.com/kennethkalmer) in
[https://github.com/sergeysova/jq-action/pull/5](https://togithub.com/sergeysova/jq-action/pull/5)

##### New Contributors

- [@&#8203;kennethkalmer](https://togithub.com/kennethkalmer) made their
first contribution in
[https://github.com/sergeysova/jq-action/pull/5](https://togithub.com/sergeysova/jq-action/pull/5)

**Full Changelog**:
https://github.com/sergeysova/jq-action/compare/v2.1.0...v2.2.0

###
[`v2.1.0`](https://togithub.com/sergeysova/jq-action/releases/tag/v2.1.0)

[Compare
Source](https://togithub.com/sergeysova/jq-action/compare/v2...v2.1.0)

Added support for multiline `run`
[https://github.com/sergeysova/jq-action/pull/3](https://togithub.com/sergeysova/jq-action/pull/3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-08-14 17:15:05 -05:00
Jon
1ed50e6cb4
[build] Update node cleanup paths (#190512)
Prior to introducing node variants, we were cleaning up unused files
included with Node.js. The node paths changed, and the cleanup paths
were not. This fixes the issue.

## Testing

`$KIBANA_HOME/node/*` should be cleaned of unused files, see the
patterns in the diff for exact files.
2024-08-14 17:10:53 -05:00
elastic-renovate-prod[bot]
0ecdd148af
Update dependency terser to ^5.31.4 (main) (#190548)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [terser](https://terser.org)
([source](https://togithub.com/terser/terser)) | devDependencies | patch
| [`^5.31.3` ->
`^5.31.4`](https://renovatebot.com/diffs/npm/terser/5.31.3/5.31.4) |
`5.31.6` (+1) |

---

### Release Notes

<details>
<summary>terser/terser (terser)</summary>

###
[`v5.31.4`](https://togithub.com/terser/terser/blob/HEAD/CHANGELOG.md#v5314-reverted)

[Compare
Source](https://togithub.com/terser/terser/compare/v5.31.3...v5.31.4)

- drop_unused: drop classes which only have side effects in the
`extends` part

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2024-08-14 17:06:11 -05:00
Nicolas Chaulet
708fcd20df
[Fleet] Use multiple saved object type for agent and package policies with opt-in migration (#189387) 2024-08-14 17:22:01 -04:00
Jon
2077468c37
[renovate] Add launchdarkly github action (#190535)
Adds the GitHub action `launchdarkly/find-code-references` to the
LaunchDarkly group of dependencies.

A pull request will be opened shortly after introducing sha pinning to
the dependency.
2024-08-14 15:08:30 -05:00
Tiago Costa
96eb1f258d
skip flaky suite (#175841) 2024-08-14 21:02:35 +01:00
Quynh Nguyen (Quinn)
627c9c41cf
[ES|QL] Fix fields are no longer suggested for grok and dissect (#190153)
## Summary

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

![Screenshot 2024-08-08 at 09 54
30](https://github.com/user-attachments/assets/8a3bb30f-50ba-4aa6-a5f3-1ca9bc0075e7)
![Screenshot 2024-08-08 at 09 54
40](https://github.com/user-attachments/assets/81db1d34-bec5-4567-a066-c1f3557891ce)


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-08-14 14:55:38 -05:00
Jon
4b0fb8fd58
[renovate] Add operations related github actions (#190538) 2024-08-14 14:03:05 -05:00
Jon
69c50c8774
[renovate] Add CodeQL github action (#190537) 2024-08-14 13:53:02 -05:00
Kevin Delemme
47c41c16c9
chore(rca): Add notes related APIs (#190362) 2024-08-14 14:32:03 -04:00
Nathan Reese
19e9bfb26e
[control group] do not render control group when there are no controls (#190521)
PR updates ControlGroup to not render any components when there are no
controls. PR also removes loading state from ControlGroup, as suggested
by @ThomThomson

#### Before
<img width="600" alt="Screenshot 2024-08-14 at 9 18 57 AM"
src="https://github.com/user-attachments/assets/e52aabf5-7322-4d8e-838c-d56524ece55e">


### Test instructions
1. start kibana with `yarn start --run-examples`
2. Open controls example at http://localhost:5601/app/controlsExamples
3. Remove all controls. Notice how the ControlGroup no longer takes up
any empty vertical spacing
<img width="600" alt="Screenshot 2024-08-14 at 9 15 53 AM"
src="https://github.com/user-attachments/assets/374ddec4-30c5-46fb-8ed9-c8c41a35fc1e">
2024-08-14 12:15:59 -06:00
Kerry Gallagher
fc12e58c2f
[Logs] Provide help for migrating Logs UI settings (#189646)
## Summary

This implements https://github.com/elastic/kibana/issues/186824.

A new API has been added so that automated corrective actions can be
applied.

## UI / UX


![migration](https://github.com/user-attachments/assets/136d96e3-f3b0-46c4-b3b8-b70f0cb08b65)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-14 19:11:57 +01:00
Chris Cowan
d6b151862d
[EEM] Change latest metric to use @timestamp (#190417)
## Summary

This PR closes
https://github.com/elastic/elastic-entity-model/issues/134 by changing
the timestamp for the latest metrics from `event.ingested` to
`@timestamp`.
2024-08-14 20:03:40 +02:00
Cee Chen
761f5e7133
Upgrade EUI to v95.7.0 (#190346)
`v95.6.0`  `v95.7.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v95.7.0`](https://github.com/elastic/eui/releases/v95.7.0)

**CSS-in-JS conversions**

- Converted `EuiSelectable` to Emotion
([#7940](https://github.com/elastic/eui/pull/7940))
  - Removed `$euiSelectableListItemBorder`
  - Removed `$euiSelectableListItemPadding`
- Converted `EuiSelectableTemplateSitewide` to Emotion
([#7944](https://github.com/elastic/eui/pull/7944))
  - Removed `$euiSelectableTemplateFocusBackgroundLight`
  - Removed `$euiSelectableTemplateFocusBackgroundDark`
  - Removed `$euiSelectableTemplateSitewideTypes`
- Converted `EuiComboBox` to Emotion
([#7950](https://github.com/elastic/eui/pull/7950))
2024-08-14 12:35:08 -05:00
Lisa Cawley
1144c0cea7
[OAS][DOCS] Temporarily omit security APIs from docs (#190467) 2024-08-14 11:52:18 -05:00
Dzmitry Lemechko
96d3325524
[ftr] add roleScopedSupertest service for deployment-agnostic tests (#190279)
## Summary

Adding new service that acts as a wrapper of `supertestWithoutAuth`
service authenticated with role-based API key and enriched with request
headers.

The proposed change streamlines test design by centralizing the
management of API key and internal/common headers, eliminating the need
to pass these arguments individually in every API call. This approach
reduces code duplication and enhances maintainability

Before:

```ts
const samlAuth = getService('samlAuth');
const supertestWithoutAuth = getService('supertestWithoutAuth');
const roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin');
const internalHeaders = samlAuth.getInternalRequestHeader();

await supertestWithoutAuth
  .get('/api/console/api_server')
  .set(roleAuthc.apiKeyHeader)
  .set(internalHeaders)
  .set('kbn-xsrf', 'true')
  .expect(200);
```

After: 
```ts
const roleScopedSupertest = getService('roleScopedSupertest');
const supertestWithAdminScope = await roleScopedSupertest.getSupertestWithRoleScope('admin', {
  withInternalHeaders: true,
  withCustomHeaders: {'kbn-xsrf': 'true'},
});

await supertestWithAdminScope
  .get('/api/console/api_server')
  .expect(200);
```

Use this service to easily test API endpoints with role-specific
authorization and custom headers, both in serverless and stateful
environments.

closes #190228

---------

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2024-08-14 11:43:08 -05:00
Jatin Kathuria
a13f8d983c
[Security Solution] Copies over settings from timeline template (#190511)
## Summary

Handles : https://github.com/elastic/kibana/issues/189992

When user had created a timeline template and attached it to the rule,
the columns were not being copied over from template to the timeline
created from the alert generated by same rule.

This PR fixes that as shown in demo below : 


https://github.com/user-attachments/assets/4237672e-943a-43f9-b160-5449399a5fd8

> [!Caution]
> This PR checks below objects that are needed to be copied over from
template
> - columns
> - data providers
>
> If we think, more things should be copied over, please comment below.

## Test Results


![grafik](https://github.com/user-attachments/assets/ad527eda-a1c2-49f0-bcfe-0ea449c29b34)



### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2024-08-14 11:27:14 -05:00
Tiago Costa
b336eecb2e
skip flaky suite (#169753) 2024-08-14 17:20:54 +01:00
Tiago Costa
00860397d5
skip flaky suite (#178457) 2024-08-14 17:19:39 +01:00
Milton Hultgren
0caa6cdfa7
[kbn/server-route-repository] Add zod support (#190244)
This PR adds support for using `zod` as the validation library alongside
of `io-ts`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-14 18:00:07 +02:00
Stratoula Kalafateli
4d0cfdf943
[ES|QL] Fixes console error when creating ES|QL charts (#190503)
## Summary

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

This is causing the error, as it is not needed. The abortController when
passed to the search strategy is handled by it
2024-08-14 10:31:47 -05:00
Shahzad
8e736c4918
[Fleet] Avoid extra fetch package policy calls (#190398)
## Summary

i noticed few extra calls which can be prevented during package policy
updates/creation while investigating synthetics project monitor API call
!!

---------

Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
2024-08-14 17:27:41 +02:00
Drew Tate
12e6a92ee1
[ES|QL] document ES|QL testing (#190252)
## Summary

Adds documentation for how we currently test our validation and
autocomplete engines.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-14 10:23:52 -05:00
Lisa Cawley
286e0e0a9f
[OAS][DOCS] Edit linting rule severity (#190470) 2024-08-14 10:15:29 -05:00
Jean-Louis Leysens
211170c3f0
Run serverless jest integration with security enabled (#190414) 2024-08-14 16:50:30 +02:00
Maryam Saeidi
5ce361170c
Fix translation (#190504)
Not sure why CI didn't fail in the [main
PR](https://github.com/elastic/kibana/pull/190031), but it did in the
[backport](https://github.com/elastic/kibana/pull/190494) 🤔
2024-08-14 08:41:25 -05:00
Marta Bondyra
f74d479014
[Lens] unskip flaky test (#190419)
## Summary

Fixes https://github.com/elastic/kibana/issues/164623
2024-08-14 15:39:30 +02:00
Bena Kansara
95736fb536
[RCA] Start investigation from alert details page (#190307)
Resolves https://github.com/elastic/kibana/issues/190320 and
https://github.com/elastic/kibana/issues/190396

- Start investigation from Custom threshold alert details page
- Go to ongoing investigation instead of creating new one if one already
exists
- Initial investigation status is set as `ongoing`
- Investigation origin is set as `alert`

"Start investigation" is hidden for other alert types and when
investigate plugin is disabled.

### Testing
- Add the following in `kibana.dev.yml`
```
xpack.investigate.enabled: true
xpack.investigateApp.enabled: true
```
- Create Custom threshold rule
- Open Custom threshold alert details page
- Click on "Start investigation"
- Verify that a new saved object is created for the investigation


https://github.com/user-attachments/assets/6dfe8a5f-287b-4cc5-92ae-e4c315c7420b

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
2024-08-14 15:24:32 +02:00
Alexey Antonov
abc8495337
fix: Home > Cases - Dropdown label does not inform user of related results (#190400)
Closes:
https://github.com/elastic/observability-accessibility/issues/134

## Description

`Home` > `Cases` - Dropdown label does not inform user of related
results

### Steps to recreate

Pre-requisitie:
Screen reader is activated

1. Navigate to the `Serverless Observability Solution `instance.
2. Click `Cases` in Left Nav
3. Keyboard navigate to 'Severity', 'Status', et al. dropdowns

Expected Result:
-Screen reader reads dropdown header as well as number of entries in the
dropdown, indicated by the number in the header

Actual Result:
-Screen reader reads only the category label

### What was changed: 

1. Removed extra `aria-label` attribute. `EuiFilterButton` component is
responsible for setting correct `aria-label` based on internal state.

### Screen

<img width="1296" alt="image"
src="https://github.com/user-attachments/assets/3051e71d-5890-44c4-a2b1-bd47a71edade">
2024-08-14 15:53:04 +03:00
Andrew Macri
2519c76cff
[Security Solution] Updates the test:generate:serverless-dev script to align with the latest serverless defaults (#190461)
## [Security Solution] Updates the `test:generate:serverless-dev` script to align with the latest serverless defaults

This PR updates the `test:generate:serverless-dev` script, (which runs `scripts/endpoint/resolver_generator`), to align with the latest serverless defaults.

After this change, running the following command:

```sh
yarn test:generate:serverless-dev
```

populates a local serverless project with generated alerts and events (for testing).

### Desk testing

1) Start a new (development) instance of Elasticsearch:

```sh
yarn es serverless --clean --projectType security
```

2) Start a local (development) instance of Kibana:

```sh
yarn start --serverless=security --no-base-path
```

3) Login to the project as the `admin` user

4) Install the default detection rules

5) Change to the `$KIBANA_HOME/x-pack/plugins/security_solution` directory:

```sh
cd $KIBANA_HOME/x-pack/plugins/security_solution
```

6) Run the following command:

```sh
yarn test:generate:serverless-dev
```

**Expected result**

- The `resolver_generator` script populates the serverless project with alerts and events, as illustrated by the output below:

```
 info Build flavor: serverless
 info Indexing host and alerts...
 info Creating and indexing documents took: 15098ms
  Done in 17.37s.
```

**Actual result**

- The `resolver_generator` script does NOT populate the serverless project with alerts and events, as illustrated by the output below:

```
info Build flavor: serverless
info Indexing host and alerts...
Unhandled Promise rejection detected:

EndpointDataLoadingError: other side closed - Local: 127.0.0.1:63688, Remote: 127.0.0.1:9200
    at wrapErrorIfNeeded (utils.ts:29:7)
    at wrapErrorAndRejectPromise (utils.ts:32:75)
    at index_endpoint_hosts.ts:259:26 {
  meta: ConnectionError: other side closed - Local: 127.0.0.1:63688, Remote: 127.0.0.1:9200
      at SniffingTransport.request (/Users/$USER/Projects/forks/$USER/kibana/node_modules/@elastic/transport/src/Transport.ts:630:17)
      at Client.BulkApi [as bulk] (/Users/$USER/Projects/forks/$USER/kibana/node_modules/@elastic/elasticsearch/src/api/api/bulk.ts:75:10)
      at index_endpoint_hosts.ts:259:26 {
    options: { redaction: [Object] },
    meta: {
      body: undefined,
      statusCode: 0,
      headers: {},
      meta: [Object],
      warnings: null
    }
  }
}

Terminating process...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
2024-08-14 08:48:00 -04:00
Julia Bardi
9cb49eac87
[Fleet] hide changing agent policies when editing agentless integration policy (#190391)
## Summary

Related to https://github.com/elastic/kibana/issues/183863

Follow up from
https://github.com/elastic/kibana/pull/189934#discussion_r1712146040

Since the edit integration was re-enabled for agentless integration
policies, we have to make sure to hide the agent policy change option
when editing an agentless policy. This pr addresses that.

To verify:
- add CSPM integration with agentless setup technology
- edit the integration policy
- verify that the agent policies can't be modified
- upload another agentless package (instruction
[here](https://github.com/elastic/kibana/pull/189612))
- add Agentless integration with setup technology agentless
- edit the integration policly
- verify that the agent policies can't be modified

<img width="1526" alt="image"
src="https://github.com/user-attachments/assets/557cc6d4-37e7-43f6-b52a-3d5f4c073e1c">
<img width="1524" alt="image"
src="https://github.com/user-attachments/assets/e890efa8-4faf-4608-9228-32debadb895a">


### 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-08-14 14:09:15 +02:00
Dima Arnautov
0e18fb39f3
[ML] Enable PUT trained model API integration tests (#189697)
## Summary

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


### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-08-14 06:54:19 -05:00
Achyut Jhunjhunwala
2a33601c9a
[Dataset Quality] Replication of dataset flyout as an independent component (#189532)
## Summary

Relates to - https://github.com/elastic/kibana/issues/184572
Figma Design -
https://www.figma.com/design/8WVWLeVn8mvoUm0VGgbSbB/Data-set-quality-V2?node-id=3564-73485&t=KADTdNFiiOBJ7rOS-0

**NOTE: This PR is part of a multi series PRs. Hence expect it to not do
everything.**

### What are we going to do?

1. The content of the flyout, henceforth will be known as Dataset
Quality Details is being copied to a component with the same name.
2. This component can be initialised as page, like in Management app or
used as an individual component in a flyout in Unified Doc Viewer for
example. As scope of this PR, a page in Management app has been created
which will load this detailed component. A new route will be created
with breadcrumb.
3. This page will co-live with the Flyout for now, accessible only via
direct URL. In subsequent PR, when we remove the Flyout completely, we
will change the action in Dataset Quality to instead of opening a Flyout
to navigating to this new page.

### What's in this PR ?

1. As part of this change, i have created a complete new State Machine,
Controller for Dataset Quality Details component which is responsible
for replicating the Flyout.
2. A dedicated route registered under `/details` where this component
will live at the moment. Sample URL will look like this

`http://localhost:5601/pfd/app/management/data/data_quality/details?pageState=(dataStream:logs-synth.1-default,v:1)`
3. The individual components which currently load inside the flyout may
be duplicated for time being.
4. Validation when no data stream provided.
5. Breadcrumb for the Management page

### What's not in this PR

1. Tests needs to be migrated, they will be done as part of the Next PR
2. Telemetry for Flyout has been removed. It will be added as part of
next PR.
3. Existing Flyout code has not be removed. That needs to be removed and
the old state machine needs to be meticulously cleaned.
6. Swapping the Click to Open Flyout to Page needs to be done when the
above 3 are ready.

## Screenshot

### Good scenario

<img width="1482" alt="image"
src="https://github.com/user-attachments/assets/4409eb57-89d5-477c-a946-1b7a45df074c">

### When datastream does not exist

<img width="1527" alt="image"
src="https://github.com/user-attachments/assets/66d735aa-8f0f-4fb8-b57c-4d22cecad2c7">

### When invalid state is provided by the page, it redirects to parent
Dataset Quality Page

![Aug-09-2024
13-55-54](https://github.com/user-attachments/assets/ea8379c5-0642-458c-8164-f50a17818895)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-14 13:46:46 +02:00
Stratoula Kalafateli
c026279547
[ES|QL] Cleanup the filters when transitioning from dataviews to ES|QL (#190477)
## Summary

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

Clean ups the filters when moving from DataViews to ES|QL mode.

### Checklist

- [ ] [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-08-14 13:21:39 +02:00
Larry Gregory
54234a22b4
Exclude scripts directories from CodeQL config (#190347) 2024-08-14 07:14:25 -04:00
Elena Stoeva
cc29eea74f
[Advanced Settings] Add retry for 409 conflicts in API integration tests (#189813)
Fixes https://github.com/elastic/kibana/issues/176445

## Summary

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

This PR fixes the advanced settings API integration tests that seem to
be flaky. The reason for the occasional failures is most likely a
`version_conflict_engine_exception` which is thrown when another node
indexes the same documents. This can happen when we save an advanced
setting since the settings API uses saved objects under the hood, and in
CI, multiple nodes can try to save an advanced setting simultaneously.

The solution in this PR is to retry the request if we encounter a 409
error. This is adapted from the solution in
https://github.com/elastic/kibana/pull/174185 which resolves a similar
failure.
2024-08-14 05:55:06 -05:00
Maryam Saeidi
ae4d522b52
[Custom threshold] Always pass allowLeadingWildcards as true to the KQL validation in the custom threshold rule API param validation (#190031)
Fixes #189072
Related #190029

## Summary

This PR updates the KQL validation on the server side by passing the
Kibana leadingWildcard setting as true during validation. This means
that even if this configuration is disabled in Kibana, we will still
allow saving such a filter in the rule, but it will fail during rule
execution.
I've created a separate ticket to discuss how to apply the KQL
validation correctly during API param validation.
([issue](https://github.com/elastic/kibana/issues/190029))

This fix will solve the following issues:
<img
src="https://github.com/user-attachments/assets/d99177cb-d4cd-4f33-9a60-8575d87372e3"
width=500 />


We also have [proper validation on the UI
side](https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/validation.tsx#L60,L64)
that considers Kibana setting during validation:

|Error|Leading wildcard error|
|---|---|
|
![image](7719813d-ee7b-4eac-b04f-69a867a6dd89)|
2024-08-14 12:38:53 +02:00
Luke Gmys
b67da82336
[Security Solution] Remove runtime fields from sourcerer data model (#189891)
## Summary

Runtime mappings should be obtained from data view spec, we are removing
this field from the sourcerer model and all the uses will depend on the
embedded spec from now on.
2024-08-14 11:32:00 +02:00
Alexey Antonov
cfa2deb90a
fix: Home > Project Settings > Integrations- Radio buttons context not coveyed through AT (#190393)
Closes:
https://github.com/elastic/observability-accessibility/issues/137

## Description

`Home` > `Project Settings` > `Integrations`- Radio buttons
(Recommended, Elastic Agent, Beats) do not have context conveyed via
screen reader

### Steps to recreate

Pre-requisite:
Screen reader is activated

1. Navigate to the `Serverless Observability Solution `instance.
2. Click `Project Settings` in lower Left Nav
3. Select `Integrations`
4. Keyboard navigate to the Recommended, Elastic Agent, Beats radio
buttons
5. Tab through the list

Expected Result:
-Screen reader user understands the meaning and context of the radio
button options.

Actual Result:
-Screen reader reads radio buttons but is not provided the context of
what they relate to.


### Screens

<img width="1296" alt="image"
src="https://github.com/user-attachments/assets/fdca5a9b-46d9-44a2-a12f-f50134439333">
2024-08-14 11:19:34 +03:00
Shahzad
0692302fd7
[Synthetics] Use saved objects finder API to fetch objects (#190169)
## Summary

Use saved objects finder API to fetch objects !!
2024-08-14 09:52:10 +02:00
Marta Bondyra
c0c5a51b25
[Lens] unskip flaky test (#190415)
## Summary

Fixes https://github.com/elastic/kibana/issues/180231
2024-08-14 09:46:51 +02:00
Marta Bondyra
833409dd27
[Lens] fix flaky jest tests (#190409)
## Summary

Fixes https://github.com/elastic/kibana/issues/179854 fixes
https://github.com/elastic/kibana/issues/179853

Instead of debugging the original issue, I rewrote the rest of the tests
from this file to testing library. The issue broke on 8.14, but just
twice over the span of 6 months, so I'd not backport (unless in the
future it causes more problems in 8.14)
2024-08-14 09:43:46 +02:00
Kevin Lacabane
5fd68e4147
[eem] add service_summary to builtin service definition (#190240) 2024-08-14 09:37:03 +02:00
Alex Szabo
e73f68867b
skip flaky test: https://github.com/elastic/kibana/issues/186996 (#190475)
## Summary
Manually skipping test from
https://github.com/elastic/kibana/issues/186996 - it's going to stay
flaky, as it's depending on the `new Date()`s hitting the same second.
2024-08-14 08:56:44 +02:00
Søren Louv-Jansen
be26e46116
[Obs AI Assistant] Use internal user when fetching connectors (#190462)
Closes https://github.com/elastic/kibana/issues/187921

The Obs AI Assistant calls the endpoint `GET _connector` to get a list
of connector indices. This works for admin users but not for users with
limited privileges like users with the `editor` role.

Currently an error is thrown but never caught. This causes the kibana
server to crash during development. In prod this problem means that
users cannot retrieve connector indices, and thus fallback to querying
`search-*`.

This PR fixes it by using the internal user to call `GET _connector`. 


Additional context:
https://elastic.slack.com/archives/C05J7LXR5DE/p1723560268104559
2024-08-14 07:10:48 +01:00
Kibana Machine
a429807170
[api-docs] 2024-08-14 Daily api_docs build (#190473)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/799
2024-08-14 05:05:50 +00:00
Paulo Henrique
a28f2193bc
[Agentless API] Updating Agentless API URL and enablement flag (#190277)
## Summary

It closes https://github.com/elastic/security-team/issues/10104

This PR addresses the necessary changes in Kibana to reflect the updated
agentless API settings in kibana.yml settings:

- **xpack.fleet.agentless.enabled: true**
Changing to use `xpack.fleet.agentless.enabled` as a Feature flag for
enabling agentless in ESS environments. (Serverless changes was out of
scope, so it is still using `xpack.fleet.enableExperimental` for now).
Also, this value will now be exposed to the client side instead of the
API URL (It closes
https://github.com/elastic/security-team/issues/10019).


- **xpack.fleet.agentless.api.url**
This setting will now include only the URL (without the basePath), so I
added a `prependAgentlessApiBasePathToEndpoint` helper function to
append the basePath with type support. Also this value will no longer be
exposed to the client side

### Additional changes

- This PR also modified the Agentless settings schema validation to be
optional (so it will only validate the types), as because of the nature
of how the `kibana.yml` will set the configuration as of
[this](https://github.com/elastic/cloud/pull/130314) PR, it might happen
that we will have partial settings, so changing the schema to optional
will prevent Kibana failing from starting due to incomplete agentless
settings. (It closes
https://github.com/elastic/security-team/issues/10189)

- Updated unit tests and FTR e2e config files to reflect the latest
changes
2024-08-13 19:48:46 -05:00
Bryce Buchanan
6ee8051a07
Fixes accordion disclosure keyboard focus border (#190436)
## Summary

This fixes keyboard navigation focus border around the accordion element
on the Exploratory View.


https://github.com/user-attachments/assets/e863f52a-9745-4f55-acc5-d2aa12464f3c


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-08-13 16:44:57 -05:00
Rodney Norris
be2b853062
[Search] update copy for try in console button, to Run in Console (#190412)
## Summary

Updated the default copy for "Try in Console" to be "Run in Console"
instead.

### Screenshots
<img width="716" alt="image"
src="https://github.com/user-attachments/assets/ccd102ec-4732-429f-bb7b-76c157481c09">

### 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
- [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-08-13 16:19:59 -05:00