Moves calling the table factory out of components to avoid instantiation on every render call. Note all of this is a workaround for our own typescript version of EuiInMemoryTable. Once the original table has been migrated to TS, we should be able to remove the custom code.
* IndexPatternsContract
* types
* Expose FieldList on indexPattern contract (as its stateful)
Rename FieldListInterface to IFieldList
Remove more exports from ui/index_patterns
Fix Maps import
Move data services initialization to top level of the plugin
* Clean up mocks
* ts
* setFieldFormats from Legacy plugin
* Remove FIeldList export
* Fix checking of error type in management
* Fix security import of indexpatterns
* fix jest tests
* Fix jest tests
* Update snapshots
* Fix mocha tests
* add onPreResponse interceptor
* use onPreResponse interceptor to add license sign
* expose registerPreResponse to plugins
* refresh for license update get the most fresh license
* license plugin injects own header for signature: 'kbn-license-sig'
* add integration tests for license type and license header
* switch config to duration
* don't run interceptor on anon paths. add tests
* add functional tests for licensing plugin
* regen docs
* fix test in security due to updated mocks;
* update snapshots accoring to new mock implementation
* migrate license expired banner to NP
* add readme for the licensing plugin
* remove outdated import. licensing has separate functional tests
* add tag for test to run on CI
* regen docs
* Update x-pack/plugins/licensing/README.md
Co-Authored-By: Josh Dover <me@joshdover.com>
* update tests
* adds route to update status on a signal / query result of signals. This also adds some example curl commands in scripts/signals and updates the README with general instructions on how to use the scripts to interact with the new endpoint.
* utilizes 'mget' to allow multiple id's to be passed in. Updates relevant example curl script.
* utilizes updateByQuery instead of querying then updating individual results
* adds tests for set signals status route. Adds tests for set signals route schema. Updates schema to make status a required field.
* fixes type check failures, fixes missing import due to renaming, fixes naming of mocked elasticsearch plugin after rebasing
* removes anys from mocked es plugin, updates example comments in signals scripts
* removes undefined | null from signal status definition, updates put_signal_doc with the get_signals_index script, adds getIndex to open_close_signals_route, updates tests to mock getIndex fn, updates README with instructions to run signals scripts from inside scripts directory.
* removes null/undefined check for callWithRequest
* sets signal status query to object
* Add functional tests for plugins to x-pack (so we can do a functional test of the Resolver embeddable)
* Add Endpoint plugin
* Add Resolver embeddable
* Test that Resolver embeddable can be rendered
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Adds comment about duplicating full config for NP config
* Use New Platform features plugin to registerFeature()
* Re-arranging and relying on request context as uch as possible
* Refactors KibanaRequest for RequestHandlerContext
* fixes types for callWithRequest
* Moves callWithRequest method override types directly into class to get them working, need to fix this when we understand it better
* Fixes callWithRequest framework types
* Removes a few NP_TODO comments
* Fix broken imports
* Ensure GraphQL resolvers are actually passed requestContext and not the raw request, and switch to the savedObjects client via requestContext
* Remove the legacy traces of the savedObjects plugin
* Fixes TSVB access with NP raw requests and requestContext
* Remove unused getUiSettingsService (moved to requestContext)
* Migrate to new Spaces plugin
* Fix calculateMetricInterval after merged changes
* Reinstate and migrate the infrastructure metadata route
* Fix various type check errors
* Amend InfraSources lib unit tests
Mock the savedObjects client differently
* Amend MetricsExplorer API response
Renaming of variable inadvertently broke the response
* Remove GraphQLI references from feature controls tests
* Remove other GraphiQL references
* Fix security / access issue
* Add a framework level registerRoute method which always adds access tags by default
* *Temp* disable test
* Migrate the log rate validation endpoint to the new platform
Fully migrates the [Logs UI] log rate setup index validation #50008 PR to New Platform routing etc
* Amend types
* Example of how to expose APM get indices method in NP
* Fix calls to TSVB bug caused by object mutation
This is a temp fix as the TSVB NP migration will supercede this
* Converts getApmIndices function to accept saved object client, implements usage in infra
* Fix APM setup_request tests
* Fixes some unused references for linting
* Migrate all work from #50730 to NP
* Remove duplicate declaration files for rison_node and add a single source of truth at x-pack/typings/rison_node.d.ts for x-pack uses
* Moved type file back into infra plugin to bypass strange break
* Updates apm indices method signature per feedback from @elastic/apm-ui
* [Maps] use style metadata to calculate symbolization bands
* only update style meta when fields change
* load join source style meta
* use style meta data request to populate range
* apply source filter to style meta request
* fix heatmap
* only use style meta range if field supports field meta
* add fieldMetaOptions to style prperty descriptor and add migration script
* add UI for setting fieldMetaOptions.isEnabled
* clean up
* review feedback
* fix can_skip_fetch tests
* review feedback
* only show field meta popover for fields that support field meta
* avoid duplicate fields re-fetching style meta
* clean up problems when first creating grid source
* update text for enabling field meta toggle
* provide UI for setting sigma
* allow users to include global time in style meta request
* update SIEM saved objects
* add less than and greater than symbols when styling by field stats
* fix functional tests
* review feedback
* add support for date fields
* review feedback
* only show less then and greater then in legend when values will be outside of std range
* unnest VectorStyle._getFieldRange
* remove unused function
* only show style isTimeAware switch when style fields use field meta
## [SIEM] Remove placeholder from pinned event tooltips
Similar to signals, pinned timeline events should be copied from source indexes, which are subject to ILM, to separate (space-aware) indexes (with different ILM), such that pinned events can be viewed in a timeline after the events have aged out of the original indexes.
The backend APIs and UI patterns in development now for signals can likely be reused to implement the above, but until then, the placeholder tooltip text for unpinned / pinned events, which mentions persistence, should be removed from the SIEM beta.
- [x] Changed the _unpinned_ event tooltip text from (sic) `This is event is NOT persisted with the timeline` to `Unpinned event`
- [x] Changed the pinned event tooltip text from `This event is persisted with the timeline` to `Pinned event`
https://github.com/elastic/siem-team/issues/482
Part of #44151,
Continuation of #51835,
Just moves existing state related url utils to kibana_utils plugin
Also fixes small regression introduced in #51835,
When sharing hashed url directly it should show error toast instead of full page fatal error
## Summary
Changes the signals output index to be based on the user's space
* Adds the ability to create a space based index through `POST /api/detection_engine/index`
* Adds the existence API for the index through `HEAD /api/detection_engine/index`
* Adds an index check during the creation of a rule, `POST api/detection_engine/rules` that will return a status of 400 with an error message if the index does not exist
* Adds a new optional key in kibana.dev.yml of `xpack.siem.signalsIndex` for developers working together who need to segregate signals indexes.
* Splits apart the ECS mappings and the signal mappings into separate files for easier maintenance.
* Deprecates the defaultSignalsIndex (will remove it once the UI is updated)
* Updates the README.md to remove the SIGNALS_INDEX environment variable
* Updates the existing unit tests
* Adds more unit tests unit tests
For people writing the UI:
---
How do I check for the existence of a signals index?
See [scripts/signal_index_exists.sh](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/signal_index_exists.sh)
```sh
HEAD /api/detection_engine/index
```
How do I create a new signals index if my user has correct privileges?
See [scripts/post_signal_index.sh](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/post_signal_index.sh)
```sh
POST /api/detection_engine/index
```
How do I delete _everything_ of all signal indexes, policies, and templates for a particular space?
See [scripts/delete_signal_index.sh](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/scripts/delete_signal_index.sh)
```sh
DELETE /api/detection_engine/index
```
FAQ for people testing
---
What is the name of the index, policy, etc... per space?
If you're using the default space the index, policies, etc... will be:
```sh
.siem-signals-default
```
If you're using a custom space such as `test-space` they will be:
```sh
.siem-signals-test-space
```
If you set your `xpack.siem.signalsIndex` in your `kibana.dev.yml` to something such as:
```yml
xpack.siem.signalsIndex: .siem-signals-frank-hassanabad
```
And use the default space it will be:
```sh
.siem-signals-frank-hassanabad-default
```
And for a custom space such as `test-space` they will be:
```sh
.siem-signals-frank-hassanabad-test-space
```
What is the policy that is being set?
See: [signals_policy.json](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/signals_policy.json)
```json
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "10gb",
"max_age": "7d"
}
}
}
}
}
}
```
What is the boot strap index that is being set look like?
See: [create_bootstrap_index.ts](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/index/create_bootstrap_index.ts)
You should see this when running:
```sh
./get_signal_index.sh | less
```
```json
".siem-signals-default-000001": {
"aliases": {
".siem-signals-default": {
"is_write_index": true
}
},
```
What is the template that is being set look like?
See: [get_signals_template.ts](28937ebe00/x-pack/legacy/plugins/siem/server/lib/detection_engine/routes/index/get_signals_template.ts)
You should see this at the bottom when running:
```sh
./get_signal_index.sh
```
```json
"settings": {
"index": {
"lifecycle": {
"name": ".siem-signals-default",
"rollover_alias": ".siem-signals-default"
},
"number_of_shards": "1",
"provided_name": ".siem-signals-default-000001",
"creation_date": "1575502837772",
"number_of_replicas": "1",
"uuid": "GB0h3AYRQD6AWl8OfNonJA",
"version": {
"created": "8000099"
}
}
}
```
For more in-depth of testing of spaces using dev tools of Kibana
---
Different testing scenarios involving having spaces set in the URL, vs not having spaces set. Also different testing scenarios involving having a developer based `xpack.siem.signalsIndex` being set vs not having one set and gettin the default of `.siem-signals`
With a default space and kibana.dev.yml setting of:
* xpack.siem.signalsIndex: .siem-signals-frank-hassanabad
You can use dev tools to check the results after doing a `./post_signal_index.sh`
``` sh
GET /_template/.siem-signals-frank-hassanabad-default
GET /.siem-signals-frank-hassanabad-default-000001
GET /_ilm/policy/.siem-signals-frank-hassanabad-default
GET /_alias/.siem-signals-frank-hassanabad-default
```
With a default space and no `kibana.dev.yml` setting, you can use dev tools to check the results after doing a `./post_signal_index.sh`
```sh
GET /.siem-signals-default
GET /_template/.siem-signals-default
GET /.siem-signals-default-000001
GET /_ilm/policy/.siem-signals-default
GET /_alias/.siem-signals-default
```
Setting a space through:
```sh
export SPACE_URL=/s/test-space
```
With a default space and `kibana.dev.yml` setting using a user name such as mine:
* xpack.siem.signalsIndex: .siem-signals-frank-hassanabad
You can use dev tools to check the results after doing a `./post_signal_index.sh`
```
GET /.siem-signals-frank-hassanabad-test-space
GET /_template/.siem-signals-frank-hassanabad-test-space
GET /.siem-signals-frank-hassanabad-test-space-000001
GET /_ilm/policy/.siem-signals-frank-hassanabad-test-space
GET /_alias/.siem-signals-frank-hassanabad-test-space
```
With a default space and no `kibana.dev.yml` setting, you can use dev tools to check the results after doing a `./post_signal_index.sh`
```
GET /.siem-signals-test-space
GET /_template/.siem-signals-test-space
GET /.siem-signals-default-test-space-000001
GET /_ilm/policy/.siem-signals-test-space
GET /_alias/.siem-signals-test-space
```
### Checklist
Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.
~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] 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/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~
### For maintainers
~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
* Move a REST endpoint and the GQL endpoint to NP routing.
* Delete obsolete REST endpoint.
* Update remaining REST routes to work with NP router.
* Remove obsolete code, update some unit tests.
* Simplify route creation.
* Remove tests of API decommissioned API endpoint.
* Rename domain check.
* Make return shape of index pattern endpoint correspond to required NP resp body.
* Move validate to appropriate level of route definition object for monitor details endpoint.
* Update snapshot count route.
* Fix broken lint rule.
* Remove usages of Boom.
* Fix license router creation.
This instructs mapbox-gl to load its workers using a static script. It removes the corresponding child-src CSP-rule from the policy. It retains the worker-src rule as it is required by the ace-editor in Dev-tools.
* [ci/reportFailures] --dry-run is overloaded, split it up
* force some failures to verify the fix
* Revert "force some failures to verify the fix"
This reverts commit cf2a58e139.
* update readme to mention new flags
* remove unnecessary commas
* add job description input to creation form
* wip add description to expanded row
* add description to analytics list table
* update jest test
* description input to 2 rows and update types
* update type
* [xpack/ftr/common] follow conventions, expose a config file
In order to make xpack/test/common ftr config easier to work with, this updates it to follow the conventions established by most other configs of exposing all services from the services module as an object that can be easily merges into local services modules.
* common config file and FtrProviderConfig are unused and unnecessary
* turns out FtrProviderContext was used...
* [failed_tests_cli] update reports with links to github issues
* reorder test report hooks so that published Junit includes modified reports
* force failures and enable dry-run mode for debugging
* auto-switch to --dry-run when running in non-tracked branches/prs
* add --skip-junit-update flag to skip mutating the reports
* remove comma after URL to support auto-linking in Jenkins
* Revert "force failures and enable dry-run mode for debugging"
This reverts commit ac0c287a3f.
* fix method call
* extend TestResult to include relevence flag rather than wrapping
* fix createFailureIssue() tests
* make report messages more consistent, append when not dry-run
* rename module
* update snapshots to not contain valid xml
* don't send authorization header if no token defined
* merge with master modified fixtures