Skip to content

Commit

Permalink
Merge branch 'main' into exceptions_minor_ux_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jan 17, 2022
2 parents 0164868 + ba60155 commit f31ff78
Show file tree
Hide file tree
Showing 1,074 changed files with 18,355 additions and 8,574 deletions.
2 changes: 0 additions & 2 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
env:
REPORT_FAILED_TESTS_TO_GITHUB: 'true'
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/spaces/ @elastic/kibana-security
/x-pack/test/ui_capabilities/ @elastic/kibana-security
/x-pack/test/encrypted_saved_objects_api_integration/ @elastic/kibana-security
/x-pack/test/functional/apps/security/ @elastic/kibana-security
/x-pack/test/functional/apps/spaces/ @elastic/kibana-security
/x-pack/test/security_api_integration/ @elastic/kibana-security
/x-pack/test/security_functional/ @elastic/kibana-security
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
Expand Down
32 changes: 20 additions & 12 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,19 @@ The `xpack.apm.autocreateApmIndexPattern` APM setting has been removed. For more
*Impact* +
To automatically create data views in APM, use `xpack.apm.autoCreateApmDataView`.
====

[discrete]
[[deprecation-119494]]
.Updates Fleet API responses for consistency
.Updates Fleet API to improve consistency
[%collapsible]
====
*Details* +
To make sure all Fleet API GET resposes return `items`, the following have been updated:
The Fleet API has been updated to improve consistency:
* `/api/fleet/enrollment-api-keys`
* `/api/fleet/agents`
* Hyphens are changed to underscores in some names.
* The `pkgkey` path parameter in the packages endpoint is split.
* The `response` and `list` properties are renamed to `items` or `item` in some
responses.
For more information, refer to {kibana-pull}119494[#119494].
Expand All @@ -157,24 +159,30 @@ When you upgrade to 8.0.0, use the following API changes:
* Use `service_tokens` instead of `service-tokens`.
* `check-permissions` is no longer supported.
* Use `/epm/packages/{packageName}/{version}` instead of `/epm/packages/{pkgkey}`.
* Use `items[]` or `item` instead of `response[]` in the following:
* Use `items[]` instead of `response[]` in:
+
[source,text]
--
/api/fleet/enrollment_api_keys
/api/fleet/agents
/epm/packages/
/epm/packages/{pkgkey}
/epm/categories
/epm/packages/_bulk
/epm/packages/limited
/epm/packages/{packageName}/{version} <1>
--
<1> Use `items[]` when the verb is `POST` or `DELETE`. Use `item` when the verb
is `GET` or `PUT`.
For more information, refer to {fleet-guide}/fleet-api-docs.html[Fleet APIs].
====

To review the depcrecations in previous versions, refer to the <<deprecations-8.0.0-alpha1,8.0.0-alpha1 release notes>>.

To review the deprecations in previous versions, refer to the <<deprecations-8.0.0-alpha1,8.0.0-alpha1 release notes>>.


[float]
[[features-8.0.0-rc1]]
=== Features
Expand Down
2 changes: 1 addition & 1 deletion docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ There are two things you can do to if you'd like to ensure a field is searchable
1. Index your additional data as {apm-guide-ref}/metadata.html[labels] instead.
These are dynamic by default, which means they will be indexed and become searchable and aggregatable.

2. Use the {apm-guide-ref}/configuration-template.html[`append_fields`] feature. As an example,
2. Use the `append_fields` feature. As an example,
adding the following to `apm-server.yml` will enable dynamic indexing for `http.request.cookies`:

[source,yml]
Expand Down
2 changes: 1 addition & 1 deletion docs/management/connectors/action-types/email.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NOTE: For emails to have a footer with a link back to {kib}, set the <<server-pu
Email connectors have the following configuration properties.

Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
Sender:: The from address for all emails sent with this connector. This can be specified in `user@host-name` format or as `"human name <user@host-name>"` format. See the https://nodemailer.com/message/addresses/[Nodemailer address documentation] for more information.
Sender:: The from address for all emails sent with this connector. This must be specified in `user@host-name` format. See the https://nodemailer.com/message/addresses/[Nodemailer address documentation] for more information.
Service:: The name of the email service. If `service` is one of Nodemailer's https://nodemailer.com/smtp/well-known/[well-known email service providers], the `host`, `port`, and `secure` properties are defined with the default values and disabled for modification. If `service` is `MS Exchange Server`, the `host`, `port`, and `secure` properties are ignored and `tenantId`, `clientId`, `clientSecret` are required instead. If `service` is `other`, the `host` and `port` properties must be defined.
Host:: Host name of the service provider. If you are using the <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure this hostname is added to the allowed hosts.
Port:: The port to connect to on the service provider.
Expand Down
Binary file modified docs/osquery/images/live-query-check-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 17 additions & 16 deletions docs/osquery/osquery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,18 @@ image::images/scheduled-pack.png[Shows queries in the pack and details about eac

[float]
[[osquery-manage-query]]
== Edit saved queries
== Save queries

Add or edit saved queries from the *Saved queries* tab.
You can save queries in two ways:

. Go to the saved queries, then click **Add saved query** or the edit icon.
* After running a live query, click the *Save for later* link.
* From the *Saved queries* tab, click the **Add saved query** button.

Once you save a query, you can only edit it from the *Saved queries* tab.

To add or edit saved queries from the *Saved queries* tab:

. Go to *Saved queries*, and then click **Add saved query** or the edit icon.
. Provide the following fields:

* The unique identifier.
Expand All @@ -148,7 +155,7 @@ Add or edit saved queries from the *Saved queries* tab.

* From the *Test query* panel, select agents or groups to test the query, then click *Submit* to run a live query. Result columns with the image:images/mapped-icon.png[mapping] icon are mapped. Hover over the icon to see the mapped ECS field.

. Click **Save query**.
. Click *Save* or *Update*.

[float]
[[osquery-map-fields]]
Expand All @@ -175,11 +182,7 @@ and the mapped ECS fields. For example, if you update a query to map `osquery.na

** **Static value**: Enter a static value. When the query runs, the ECS field is set to the value entered. For example, static fields can be used to apply `tags` or your preferred `event.category` to the query results.

. Map more fields, as needed.

** To add a new row for additional fields to map, click the plus icon.

** To remove any mapped rows, click the trash icon.
. Map more fields, as needed. To remove any mapped rows, click the delete icon.

. Save your changes.

Expand Down Expand Up @@ -314,7 +317,7 @@ While this allows you to use advanced Osquery functionality like pack discovery

. Edit the *Osquery config* JSON field to apply your preferred Osquery configuration. Note the following:

* The field may already have content if you have scheduled packs for this agent policy. To keep these packs scheduled, do not edit the `packs` section.
* The field may already have content if you have scheduled packs for this agent policy. To keep these packs scheduled, do not remove the `packs` section.

* Refer to the https://osquery.readthedocs.io/en/stable/[Osquery documentation] for configuration options.

Expand Down Expand Up @@ -344,14 +347,12 @@ https://www.elastic.co/guide/en/fleet/master/upgrade-elastic-agent.html[upgrade

[float]
=== Debug issues
If you encounter issues with *Osquery Manager*, find the relevant logs for the {elastic-agent}
and Osquerybeat in the installed agent directory, then adjust the agent path for your setup.

The relevant logs look similar to the following example paths:
If you encounter issues with *Osquery Manager*, find the relevant logs for {elastic-agent}
and Osquerybeat in the agent directory. Refer to the {fleet-guide}/installation-layout.html[Fleet Installation layout] to find the log file location for your OS.

```ts
`/data/elastic-agent-054e22/logs/elastic-agent-json.log-*`
`/data/elastic-agent-054e22/logs/default/osquerybeat-json.log`
../data/elastic-agent-*/logs/elastic-agent-json.log-*
../data/elastic-agent-*/logs/default/osquerybeat-json.log
```

To get more details in the logs, change the agent logging level to debug:
Expand Down
5 changes: 4 additions & 1 deletion docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ Refer to the corresponding {es} logs for potential write errors.
| `user_logout`
| `unknown` | User is logging out.

| `session_cleanup`
| `unknown` | Removing invalid or expired session.

| `access_agreement_acknowledged`
| N/A | User has acknowledged the access agreement.
| n/a | User has acknowledged the access agreement.

3+a|
===== Category: database
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
"@dnd-kit/core": "^3.1.1",
"@dnd-kit/sortable": "^4.0.0",
"@dnd-kit/utilities": "^2.0.0",
"@elastic/apm-rum": "^5.10.0",
"@elastic/apm-rum-react": "^1.3.2",
"@elastic/apm-rum": "^5.10.1",
"@elastic/apm-rum-react": "^1.3.3",
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/charts": "40.2.0",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
Expand Down Expand Up @@ -602,6 +602,7 @@
"@types/kbn__server-route-repository": "link:bazel-bin/packages/kbn-server-route-repository/npm_module_types",
"@types/kbn__std": "link:bazel-bin/packages/kbn-std/npm_module_types",
"@types/kbn__telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools/npm_module_types",
"@types/kbn__ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module_types",
"@types/kbn__utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module_types",
"@types/kbn__utils": "link:bazel-bin/packages/kbn-utils/npm_module_types",
"@types/license-checker": "15.0.0",
Expand Down Expand Up @@ -724,7 +725,7 @@
"cpy": "^8.1.1",
"css-loader": "^3.4.2",
"cssnano": "^4.1.11",
"cypress": "^9.2.0",
"cypress": "^9.2.1",
"cypress-axe": "^0.14.0",
"cypress-cucumber-preprocessor": "^2.5.2",
"cypress-file-upload": "^5.0.8",
Expand Down
2 changes: 2 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ filegroup(
srcs = [
"//packages/elastic-apm-synthtrace:build_types",
"//packages/elastic-datemath:build_types",
"//packages/elastic-safer-lodash-set:build_types",
"//packages/kbn-ace:build_types",
"//packages/kbn-alerts:build_types",
"//packages/kbn-analytics:build_types",
Expand Down Expand Up @@ -119,6 +120,7 @@ filegroup(
"//packages/kbn-server-route-repository:build_types",
"//packages/kbn-std:build_types",
"//packages/kbn-telemetry-tools:build_types",
"//packages/kbn-ui-shared-deps-npm:build_types",
"//packages/kbn-utility-types:build_types",
"//packages/kbn-utils:build_types",
],
Expand Down
12 changes: 12 additions & 0 deletions packages/elastic-safer-lodash-set/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,15 @@ filegroup(
],
visibility = ["//visibility:public"],
)

alias(
name = "npm_module_types",
actual = PKG_BASE_NAME,
visibility = ["//visibility:public"],
)

alias(
name = "build_types",
actual = "build",
visibility = ["//visibility:public"],
)
2 changes: 1 addition & 1 deletion packages/kbn-apm-config-loader/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUNTIME_DEPS = [
]

TYPES_DEPS = [
"//packages/elastic-safer-lodash-set",
"//packages/elastic-safer-lodash-set:npm_module_types",
"//packages/kbn-utils:npm_module_types",
"@npm//@elastic/apm-rum",
"@npm//@types/jest",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUNTIME_DEPS = [
]

TYPES_DEPS = [
"//packages/elastic-safer-lodash-set",
"//packages/elastic-safer-lodash-set:npm_module_types",
"//packages/kbn-config-schema:npm_module_types",
"//packages/kbn-logging",
"//packages/kbn-std:npm_module_types",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ export const isQueryStringFilter = (filter: Filter): filter is QueryStringFilter
*
* @public
*/
export const buildQueryFilter = (query: QueryStringFilter['query'], index: string, alias: string) =>
({
query,
meta: {
index,
alias,
},
} as QueryStringFilter);
export const buildQueryFilter = (
query: QueryStringFilter['query'],
index: string,
alias?: string,
meta: QueryStringFilterMeta = {}
) => ({ query, meta: { index, alias, ...meta } });
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ TYPES_DEPS = [
"//packages/kbn-config-schema:npm_module_types",
"//packages/kbn-dev-utils:npm_module_types",
"//packages/kbn-std:npm_module_types",
"//packages/kbn-ui-shared-deps-npm",
"//packages/kbn-ui-shared-deps-npm:npm_module_types",
"//packages/kbn-ui-shared-deps-src",
"//packages/kbn-utils:npm_module_types",
"@npm//chalk",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-storybook/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUNTIME_DEPS = [

TYPES_DEPS = [
"//packages/kbn-dev-utils:npm_module_types",
"//packages/kbn-ui-shared-deps-npm",
"//packages/kbn-ui-shared-deps-npm:npm_module_types",
"//packages/kbn-ui-shared-deps-src",
"//packages/kbn-utils:npm_module_types",
"@npm//@storybook/addons",
Expand Down
26 changes: 22 additions & 4 deletions packages/kbn-ui-shared-deps-npm/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("@npm//webpack-cli:index.bzl", webpack = "webpack_cli")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")

PKG_BASE_NAME = "kbn-ui-shared-deps-npm"
PKG_REQUIRE_NAME = "@kbn/ui-shared-deps-npm"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__ui-shared-deps-npm"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -150,7 +151,7 @@ webpack(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types", ":shared_built_assets"],
deps = RUNTIME_DEPS + [":target_node", ":shared_built_assets"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -169,3 +170,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)

pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)
3 changes: 1 addition & 2 deletions packages/kbn-ui-shared-deps-npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"private": true,
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "target_node/index.js",
"browser": "target_node/entry.js",
"types": "target_types/index.d.ts"
"browser": "target_node/entry.js"
}
14 changes: 10 additions & 4 deletions packages/kbn-ui-shared-deps-npm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@

const Path = require('path');

// extracted const vars
const distDir = Path.resolve(__dirname, '../shared_built_assets');
const dllManifestPath = Path.resolve(distDir, 'kbn-ui-shared-deps-npm-manifest.json');
const dllFilename = 'kbn-ui-shared-deps-npm.dll.js';
const publicPathLoader = require.resolve('./public_path_loader');

/**
* Absolute path to the distributable directory
*/
exports.distDir = Path.resolve(__dirname, '../shared_built_assets');
exports.distDir = distDir;

/**
* Path to dll manifest of modules included in this bundle
*/
exports.dllManifestPath = Path.resolve(exports.distDir, 'kbn-ui-shared-deps-npm-manifest.json');
exports.dllManifestPath = dllManifestPath;

/**
* Filename of the main bundle file in the distributable directory
*/
exports.dllFilename = 'kbn-ui-shared-deps-npm.dll.js';
exports.dllFilename = dllFilename;

/**
* Filename of the light-theme css file in the distributable directory
Expand Down Expand Up @@ -54,4 +60,4 @@ exports.darkCssDistFilename = (themeVersion) => {
/**
* Webpack loader for configuring the public path lookup from `window.__kbnPublicPath__`.
*/
exports.publicPathLoader = require.resolve('./public_path_loader');
exports.publicPathLoader = publicPathLoader;
Loading

0 comments on commit f31ff78

Please sign in to comment.