Dominique Clarke
a049461f44
[Synthetics] add synthetics-private-location command ( #189531 )
...
# Summary
Quickily start Fleet, enroll Elastic Agent, and create a private
location.
## Usage
```
node x-pack/scripts/synthetics_private_location.js
```
For available options, run `--help`.
## Prerequistes
This script requires `docker` and the following `kibama.yml`
configuration.
```
# Create an agent policy for Fleet Server.
xpack.fleet.agentPolicies:
- name: Fleet Server policy
id: fleet-server-policy
is_default_fleet_server: true
# is_managed: true # Useful to mimic cloud environment
description: Fleet server policy
namespace: default
package_policies:
- name: Fleet Server
package:
name: fleet_server
inputs:
- type: fleet-server
keep_enabled: true
vars:
- name: host
value: 0.0.0.0
frozen: true
- name: port
value: 8220
frozen: true
# Set a default Fleet Server host.
xpack.fleet.fleetServerHosts:
- id: default-fleet-server
name: Default Fleet server
is_default: true
host_urls: ['https://host.docker.internal:8220 '] # For running a Fleet Server Docker container
# Set a default Elasticsearch output.
xpack.fleet.outputs:
- id: es-default-output
name: Default output
type: elasticsearch
is_default: true
is_default_monitoring: true
hosts: ['http://host.docker.internal:9200 '] # For enrolling dockerized agents
```
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-08-09 07:02:02 -04:00
Stratoula Kalafateli
1391836d7d
[ES|QL] Hides the METRICS command ( #190208 )
...
## Summary
Thanks to the hidden property added
[here](https://github.com/elastic/kibana/pull/189827 ) we can now hide
the METRICS command.
2024-08-09 12:37:43 +02:00
Alejandro Fernández Haro
8905ecd6df
Add ELU history to APM metrics ( #190146 )
2024-08-09 12:35:53 +02:00
Stratoula Kalafateli
04c46db429
[ES|QL] Rename the params in ?t_start ?t_end ( #190115 )
...
## Summary
Renames the variables from `?start` to `?t_start` and `?end` to `?t_end`
Naming is hard so bare with us 😅 (I think this will be the last change)
2024-08-09 11:43:35 +02:00
Marta Bondyra
06d5d25d53
[Managed content] Fix flaky tests ( #190145 )
...
## Summary
Fixes https://github.com/elastic/kibana/issues/178920 Fixes
https://github.com/elastic/kibana/issues/178712 Fixes
https://github.com/elastic/kibana/issues/177551
The flakiness was caused by the redirect that was unnecessary (from
`#edit/managed-36db-4a3b-a4ba-7a64ab8f130b` to
`#/edit/managed-36db-4a3b-a4ba-7a64ab8f130b`- sometimes the url would be
compared before, sometimes after the redirect. This change adds the '/'
inside the path so no redirect is happening.
2024-08-09 11:41:34 +02:00
Alejandro Fernández Haro
3db4cebf92
[Flaky #190197 ] Find random **available** port ( #190200 )
2024-08-09 10:26:18 +02:00
Umberto Pepato
17577ae48c
[ResponseOps][Alerts] Merge useAlertsDataView implementations ( #189638 )
...
## Summary
Removes TriggersActionsUI's and Cases's implementations of the
`useAlertDataView(s)` hooks, refactors the main implementation
(temporarily placed in `@kbn/alerts-ui-shared`) to remove `useEffects`
and make the binary (siem/non siem) logic clearer and better documented.
## To verify
- Create rules that fire alerts in all solutions
- Check that the alerts tables in all solutions work (visit the Stack
management > Alerts, Observability > Alerts, Security > Alerts pages)
- Check that the table columns and fields browser (`Fields` button at
the left of the table toolbar) show fields coherent with the current
view and solution
### References
Closes #189467
### Checklist
Delete any items that are not applicable to this PR.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html )
were updated or added to match the most common scenarios
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-09 03:24:24 -05:00
Janki Salvi
3f8d1d7539
[ResponseOps][Cases] Fix custom fields and push button flaky tests ( #190139 )
...
## Summary
Fixes https://github.com/elastic/kibana/issues/176805
Updated `getBy` to `findBy` and added `await waitFor` for method calls.
Updated `push_button.test.tsx` as this [build
fail](https://buildkite.com/elastic/kibana-on-merge/builds/42597#018e3daf-4e91-4e2e-8d51-83800ad109b1 )
had both tests failing in it.
2024-08-09 09:21:57 +01:00
Elastic Machine
eaa54db5d1
[main] Sync bundled packages with Package Storage ( #190192 )
...
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/1082
2024-08-09 09:22:55 +02:00
Kibana Machine
2ae1a3c37e
[api-docs] 2024-08-09 Daily api_docs build ( #190207 )
...
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/794
2024-08-09 05:01:36 +00:00
Kibana Machine
785840ee1f
skip failing test suite ( #168991 )
2024-08-09 12:10:40 +10:00
elastic-renovate-prod[bot]
291dfb04ec
Update dependency @redocly/cli to ^1.19.0 (main) ( #190180 )
...
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-08-08 19:53:46 -05:00
Shaunak Kashyap
b4b17c6f90
[Fleet] Allow traces
to be added to the monitoring_enabled
array in Agent policies ( #189908 )
...
## Summary
This PR modifies the Agent policy schema to allow `traces` to be added
to the `monitoring_enabled` array.
2024-08-08 17:43:01 -05:00
Brad White
b5c7e53f17
[CI] Increase Sonarqube Memory ( #190194 )
...
## Summary
https://buildkite.com/elastic/kibana-sonarqube/builds/3#01913147-34c2-45f5-adc8-8da7fd3e7235/6-16877
I think we can double the memory for now, then pull it back as needed
since the logs have the memory usage as the scanner is running.
2024-08-08 15:06:38 -07:00
Jon
9a54dbcf8d
[renovate] Enable GitHub actions ( #190173 )
...
https://docs.renovatebot.com/modules/manager/github-actions/
2024-08-08 16:13:59 -05:00
Jon
4813ccfccb
[build] Update chainguard-base digest ( #190176 )
2024-08-08 16:07:54 -05:00
Stef Nestor
f69bb024b1
(Doc-) duplicate sections to SIEM docs ( #188376 )
...
Removes duplicated content in Kibana's [Elastic Security
overview](https://www.elastic.co/guide/en/security/current/es-overview.html )
page, refreshes the Security app description, and adds a reference to
the Security docset so we don't need to maintain the Kibana page.
Preview:
https://kibana_bk_188376.docs-preview.app.elstc.co/guide/en/kibana/master/xpack-siem.html
---------
Co-authored-by: nastasha.solomon <nastasha.solomon@elastic.co>
Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
2024-08-08 16:45:22 -04:00
Alejandro Fernández Haro
de6e45241f
Flaky #175531 - sort keys ( #190157 )
2024-08-08 15:35:35 -05:00
christineweng
92b89703fb
[Security Solutions][Alert Details] Add cypress coverage for kpi charts ( #189758 )
...
## Summary
Added cypress tests for navigation and some cypress clean up.
2024-08-08 15:35:22 -05:00
seanrathier
cdb5333987
[Cloud Security] [Fleet] Write E2E tests for agentless policy creation flow ( #188787 )
2024-08-08 16:29:03 -04:00
Tiago Costa
ea935755ce
skip flaky suite ( #189994 )
2024-08-08 21:28:35 +01:00
Kibana Machine
d04f939f69
skip failing test suite ( #173451 )
2024-08-09 06:26:51 +10:00
Kibana Machine
ab6c44effd
skip failing test suite ( #182467 )
2024-08-09 06:25:46 +10:00
Julia Rechkunova
6a8b9505b8
[Discover] Unskip time zone test ( #190116 )
...
- Closes https://github.com/elastic/kibana/issues/189943
- Closes https://github.com/elastic/kibana/issues/190058
2024-08-08 16:16:49 -03:00
Alejandro Fernández Haro
bfb1bf52c4
Flaky #171289 ( #190160 )
2024-08-08 11:51:10 -07:00
Rickyanto Ang
4a7aa9c94f
[Cloud Security] Fix Auth check on API ( #189687 )
...
## Summary
In this [PR](https://github.com/elastic/kibana/pull/186937 ) I put the
wrong auth check for Bulk Action, instead of all I set it that user only
need read permission. This PR fixes that issue as well as updates
related FTRs
2024-08-08 11:41:03 -07:00
Vadim Kibana
e40c095775
[ES|QL] Treat METRICS
command as source command in autocomplete ( #190034 )
...
## Summary
Closes https://github.com/elastic/kibana/issues/189945
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-08 12:21:35 -05:00
Brad White
d82e65ab46
[CI] Archive kibana-fips-ftr-errors ( #190162 )
...
## Summary
The [FIPS smoke test
pipeline](https://buildkite.com/elastic/kibana-fips/builds?branch=main )
has been stable, so we can move it back to `#kibana-operations-alerts`
and archive the old, specific channel.
2024-08-08 09:42:55 -07:00
Kevin Delemme
1b018a43a3
chore(rca): add create api ( #190094 )
2024-08-08 11:42:19 -05:00
Dominique Clarke
5f86b53ae3
[Uptime] do not reset pagination when filters have not changed ( #189831 )
...
## Summary
Prevents pagination from resetting when Uptime filters are changed.
Previously there was some logic to reset pagination when filters
changed. The intention is to take the user back to page 1 when they
apply a new filter.
However there was not a conditional check against the previous filters
to see if any changes had, in actuality, been applied, and the hook
calling the logic was being called multiple times within the component.
To prevent this unwanted behavior, a conditional was added to check
against the previous state of the filter
### Release note
Fixes broken pagination in Uptime when a filter is applied.
### Testing
1. Create 11 monitors, in Synthetics, all with the same tag. The easiest
way to do this is by using `oblt-cli` kibana.yml config, navigating to
Synthetics, creating a monitor with a specific tag, and then copying it
10 times, resulting in 11 monitors.
2. Navigate to Stack Management and toggle uptime on
<img width="1236" alt="Screenshot 2024-08-02 at 4 33 21 PM"
src="https://github.com/user-attachments/assets/aa088bd8-2f73-4349-9b08-3443c0b4f8a4 ">
3. Refresh the page. Navigate to `app/uptime/settings`. Change the
Uptime index pattern to `synthetics-*`.
4. Navigate to `app/uptime`. In the top filters, select your tag to
apply a filter. There should still be at least 11 monitors to test.
6. Click on the next pagination error. You should be placed on the
second page with only 1 monitor.
2024-08-08 12:41:08 -04:00
Yngrid Coello
c8edac6e3f
[StdPerf] Extending kibana:plugin_render_time with custom metrics ( #189115 )
...
## Summary
This PR enable consumers of `PerformanceContextProvider` to track
customMetrics along `onPageReady`.
Tracking customMetrics is important to further analyse and put into
perspective TTFMP. e.g. is not the same trying to load a component that
underneath is using thousand of documents vs one just using a couple of
them.
### Changes
Changes are leveraging existing `PerformanceMetricEvent` schema.
### Ideas
One improvement could be reserving a pair of key/values (aka omitting
them when defining `CustomMetrics` type) for explicitly dedicate them to
timerange values. e.g. the amount of milliseconds between the start and
end date in the timepicker. This could help us to keep the values in the
same property for all observability applications and standardise the
measurement of it.
2024-08-08 18:09:07 +02:00
Lisa Cawley
a1dd9f8f21
[DOCS] Add 8.15.0 release notes ( #189985 )
...
Co-authored-by: Florent Le Borgne <florent.leborgne@elastic.co>
2024-08-08 09:04:52 -07: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—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—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
Quynh Nguyen (Quinn)
a5d0321f25
[ES|QL] Add support for client-side INLINESTATS validation ( #189827 )
...
## Summary
Addresses https://github.com/elastic/kibana/issues/189356 . This PR adds
support for client-side INLINESTATS validation in the text based editor.
Changes include:
- Add INLINESTATS context in AST package
- Update function definitions to include INLINESTATS
- Hide INLINESTATS from list of suggestions (which we will revert after
command is merged in tech preview)
Before:

After:
https://github.com/user-attachments/assets/4723735d-ab40-49c3-a1d9-51482c6fb441
### 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—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—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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-08 10:51:05 -05:00
dkirchan
83e78ea5da
[Security Solution][Serverless] Security verify promote es ( #188971 )
...
## Summary
In this PR, the security FTR tests are added in the
[kibana-elasticsearch-serverless-verify-and-promote](https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote )
In order for this to be done a [new step is
added](https://github.com/elastic/kibana/pull/188971/files#diff-c24aca993d6eaa3978eb5334eb5a34d8c7a18a1f5a34b41d43ec9db3e9972a81R67 )
where only the security FTR + integration tests are running.
The reason that I preferred to split the security tests into a different
step is the fact that they do not exactly follow the execution way of
the rest of the tests in the specific pipeline. They are executed in a
different config pattern. We could definitely add the pattern in the
existing step like the following way, but I would ask from feedback from
the relevant teams for this:
`FTR_CONFIG_PATTERNS:
"**/test_serverless/**,**/test/security_solution_api_integration/**/serverless.config.ts"`
In order for a test to be executed, the test file has mandatorily to be
part of the `index.ts` file like
[here](https://github.com/elastic/kibana/pull/188971/files#diff-ad4cd826846527b8d18ce4162f5d006723d8ddf6f64a2108528ee7870bd281b0R21 ).
Then in order to add a test or a suite of tests as part of this pipeline
a tag needs to be added like [this
line](https://github.com/elastic/kibana/pull/188971/files#diff-d166758022907afbfefce03776d6395740408bc65f955549264e7bc9a76087c6R80 ).
---------
Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2024-08-08 10:19:57 -05:00
Sandra G
836af5ff01
[Obs AI Assistant] Add settings to serverless allowlist ( #190098 )
...
Resolves https://github.com/elastic/kibana/issues/190089
- Adds AI Assistant settings to allowlist in serverless. They will
appear in both "Advanced Settings" and "AI Assistant for Observability"
settings
- Updates card text to fix title casing and have a more meaningful
description
<img width="835" alt="Screenshot 2024-08-07 at 3 40 22 PM"
src="https://github.com/user-attachments/assets/382ef5c9-4454-46b4-8ffb-abb8d1afe507 ">
2024-08-08 10:26:21 -04:00
Milton Hultgren
c45e2d4252
[EEM] Rename assets data access to entities data access ( #190072 )
2024-08-08 09:00:08 -05:00
Nikita Indik
3de37cea01
[Security Solution] Add ComparisonSide
component ( #189384 )
...
**Partially addresses: https://github.com/elastic/kibana/issues/171520 **
## Summary
This PR adds the `ComparisonSide` component for the ThreeWayDiff UI
([see it on the Miro
diagram](https://miro.com/app/board/uXjVK0gqjjQ=/?moveToWidget=3458764594147853908&cot=14 )).
`ComparisonSide` lets the user compare field values from the two
selected rule versions. It will be displayed on the left side of the
upgrade flyout.
You can view and test it in Storybook by running `yarn storybook
security_solution` in the root Kibana dir. Go to `http://localhost:9001 `
once the Storybook is up and running.
https://github.com/user-attachments/assets/e71ae626-d0f7-43ae-8324-f3d4ea540b02
Also updated `react-diff-view` to the latest version (`3.2.0` ->
`3.2.1`)
2024-08-08 08:59:05 -05:00
Nathan Reese
b87e967f46
[control group] apply selections on reset ( #189830 )
...
Fixes https://github.com/elastic/kibana/issues/189580
PR awaits until all control filters are ready and then applies
selections during reset.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-08 07:50:57 -06:00
Sid
88144cc45c
Display invalid file error on dragging unsupported file types to user profile image ( #190077 )
...
Closes [#174044 ](https://github.com/elastic/kibana/issues/174044 )
## Summary
This PR adds an error message to users if an invalid file type is
dragged and dropped into file picker for updating User Profile image
https://github.com/user-attachments/assets/77a65b6e-3cca-4792-80ea-63a5103dbb4b
## Release note
Display error message to user if invalid file type is dragged and
dropped into file picker when updating User Profile image
2024-08-08 08:32:06 -05:00
Marta Bondyra
ef8caa8abf
[Annotations listing page] unskip flaky test ( #190053 )
...
Fixes https://github.com/elastic/kibana/issues/168281
Fixes https://github.com/elastic/kibana/issues/190030
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6706
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6718
2024-08-08 15:23:39 +02:00
Drew Tate
edf5c762d8
[ES|QL] Stronger typing for ESQL field interface ( #189941 )
...
## Summary
The heart of this PR is [this
change](https://github.com/elastic/kibana/pull/189941/files#diff-88513481c44d7b2de70ca2f7826c2b1fb1d8bda5b308aab0f8917a42ac2c24b7R11-R94 )
where I clean up and clarify the various data-type-related types
floating around in the engines + [this
change](https://github.com/elastic/kibana/pull/189941/files#diff-f48b526b82119bd591cf781262173d7a0233d236ab26496a4c06f5ea9a441561R21 )
where I add strong typing to the ES|QL field interface.
Pretty much everything else is a result of that. For example, strongly
typing the fields and test helpers highlighted a bunch of tests that
were still using Kibana types instead of Elasticsearch types. So, then
those had to be updated.
There's more work to do to extend the strong field typing to the rest of
the engines, but this got big and I decided to do it piece-meal.
Next plans
- Extend typing to subroutines in autocomplete and validation engines
(e.g. the stuff in `factories.ts`)
- Add typing to the [variable
interface](https://github.com/elastic/kibana/pull/189941/files#diff-f48b526b82119bd591cf781262173d7a0233d236ab26496a4c06f5ea9a441561R13 )
- Consider merging `time_literal` and `time_duration` types
- "It looks like timespan literals are the way to write a constant
time_duration. and time_durations can only be constants at the moment.
so they aren't the same, but sure are about the same" - Nik
- Consider merging
`packages/kbn-esql-validation-autocomplete/src/shared/esql_types.ts`
with
`packages/kbn-esql-validation-autocomplete/src/definitions/types.ts` in
some common place
### 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-08 08:11:43 -05:00
elena-shostak
c8608461ae
Bulk Role Endpoint ( #189173 )
...
## Summary
This PR adds a new `POST security/roles` API that can be used to bulk
create or update roles.
## How to test
1. Create empty roles
```
POST kbn:/api/security/roles
{
"roles": {
"bulk_role_1": {},
"bulk_role_2": {}
}
}
```
<details>
<summary>2. Create roles with Kibana and ES privileges</summary>
POST kbn:/api/security/roles
{
"roles": {
"bulk_role_with_privilege_1": {
"elasticsearch": {
"cluster": ["manage"],
"indices": [
{
"names": ["logstash-*"],
"privileges": ["read", "view_index_metadata"]
}
],
"run_as": ["watcher_user"]
},
"kibana": [
{
"base": ["read"]
},
{
"feature": {
"dashboard": ["read"],
"discover": ["all"],
"ml": ["all"]
},
"spaces": ["marketing", "sales"]
}
]
},
"bulk_role_with_privilege_2": {
"elasticsearch": {
"cluster": ["manage"],
"indices": [
{
"names": ["logstash-*"],
"privileges": ["read", "view_index_metadata"]
}
],
"run_as": ["watcher_user"]
},
"kibana": [
{
"base": ["read"]
},
{
"feature": {
"dashboard": ["read"],
"discover": ["all"],
"ml": ["all"]
},
"spaces": ["marketing", "sales"]
}
]
}
}
}
</details>
<details>
<summary>3. Create roles failing validation </summary>
POST kbn:/api/security/roles
{
"roles": {
"bulk_role_es_invalid": {
"elasticsearch": {
"cluster": ["bla"]
}
},
"bulk_role_kibana_invalid": {
"kibana": [
{
"spaces": ["bar-space"],
"base": [],
"feature": {
"fleetv2": ["all", "read"]
}
}
]
},
"bulk_role_valid": {
"elasticsearch": {
"cluster": ["all"]
}
}
}
}
</details>
<details>
<summary>4. Check validation for license (under basic license should
return security_exception) </summary>
POST kbn:/api/security/roles
{
"roles": {
"role_with_privileges_dls_fls": {
"metadata": {
"foo": "test-metadata"
},
"elasticsearch": {
"cluster": ["manage"],
"indices": [
{
"field_security": {
"grant": ["*"],
"except": ["geo.*"]
},
"names": ["logstash-*"],
"privileges": ["read", "view_index_metadata"],
"query": "{ \"match\": { \"geo.src\": \"CN\" } }"
}
],
"run_as": ["watcher_user"]
}
}
}
}
</details>
### Checklist
- [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1 ) was
used on any tests changed
__Fixes: https://github.com/elastic/kibana/issues/187427__
## Release Notes
Added API endpoint `POST security/roles` that can be used to bulk create
or update roles.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-08 14:33:25 +02:00
Ilya Nikokoshev
ebaa751ad1
[Automatic Import] Try parsing samples as both NDJSON and JSON ( #190046 )
...
## Summary
Changes the logic for parsing log samples in the Automatic Import plugin.
## Explanation
Previously we relied on the `fileType` as reported by the browser to
differentiate between JSON and newline-delimited JSON (NDJSON) format.
This required the user to save the file with a correct extension and was
broken for some combinations of browsers + operating systems.
The fix consists in optimistically attempting to parse the sample as
NDJSON; if that fails we attempt JSON. We consider separately a case of
file that consists of one JSON line, since it's both a valid JSON and a
valid NDJSON.
This makes `fileType` parameter unused, so we also remove it. We also
use the new error message (in the spotlight of the image) when parsing
fails:
https://github.com/user-attachments/assets/334a6424-21dd-4fb4-8ce9-4536894c396f
Note that the "logs sample" is consistent with the existing texts:
defaultMessage: 'The logs sample file is not an array',
...
defaultMessage: 'The logs sample file is empty',
...
defaultMessage: 'The logs sample file contains non-object entries',
This will also make it easier to upload multiple files at once, shall we
decide to implement such a feature.
### Risk Matrix
There are performance considerations, but they are fairly minimal:
- Where the file was previously expected to have NDJSON format, we
continue to parse it as such, without spending any additional time.
- Where the file was previously expected to have JSON format, we now
first try to parse it as NDJSON. This requires additional time to fail,
but it should be fast (after the first line).
- Where the file is actually malformed, previously we tried to parse it
once, but now will try to parse it twice. This increases the time to
fail, which can be significant if the file is a JSON that is malformed
towards the end. However, we expect this to be a rare scenario.
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Longer time to process the log in the UI. | Low | Low | As explained,
only likely to be significant for malformed files. |
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
2024-08-08 15:00:09 +03:00
Dmitry Gurevich
55953a45b7
[Cloud Security] update sanity ui tests ( #190050 )
2024-08-08 14:03:38 +03:00
Antonio
853f32c45d
[ResponseOps][Cases] Fix flaky title
tests ( #190048 )
...
Fixes #187364
## Summary
Updated the tests to stop using enzyme.
2024-08-08 12:37:48 +02:00
elastic-renovate-prod[bot]
671a343237
Update dependency @launchdarkly/node-server-sdk to ^9.5.0 (main) ( #190101 )
2024-08-08 05:16:02 -05:00
Milton Hultgren
1b85455d27
[EEM] Add entities aliases ( #190055 )
...
## Summary
When an entity definition is installed and the transforms write the
first documents to the `.entities-*` indices, the index templates
applied also set up an alias like `entities-{type}-latest` to make it
easier to query data by entity type.
## How to test
Ingest some data using data forge, install a definition of a given type,
try to query for the data via the new alias.
## Open question
Do we need to do anything related to users/roles/privileges for the
entities data, to make it easier for admins to create their users with
the right access?
The built in `viewer` role has read access to all indices and it seems
trivial to create a new role that limits that down to `entities-*`.
2024-08-08 11:08:13 +02:00
Agustina Nahir Ruidiaz
87bf9b230d
[Security Solution] Add content to the new Data Ingestion Hub header ( #189969 )
...
## Summary
Align the header styles with the latest design:
<img width="1262" alt="Screenshot 2024-08-07 at 10 23 45"
src="https://github.com/user-attachments/assets/7fd4de24-e428-4b2e-b997-1fd44aab5048 ">
<img width="1176" alt="Screenshot 2024-08-07 at 10 24 53"
src="https://github.com/user-attachments/assets/c1d8f979-49fa-4638-920a-3e3a387ea86f ">
### Checklist
Delete any items that are not applicable to this PR.
- [ ] [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-08 10:40:23 +02:00
Sander Philipse
6edf6f1373
[Inference] Improve no inference ID error ( #189598 )
...
## Summary
This improves the error message shown when an index has a semantic text
field with an inference ID referencing a non-existing inference
endpoint.
2024-08-08 03:20:16 -05:00