Skip to content

Commit

Permalink
Merge branch 'main' into 132553-flaky-test-context-encoded-url
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored May 25, 2022
2 parents 167b697 + 537d812 commit 874ef4b
Show file tree
Hide file tree
Showing 333 changed files with 7,966 additions and 2,123 deletions.
7 changes: 4 additions & 3 deletions dev_docs/operations/operations_landing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ layout: landing
{ pageId: "kibDevDocsOpsOptimizer" },
{ pageId: "kibDevDocsOpsBabelPreset" },
{ pageId: "kibDevDocsOpsTypeSummarizer" },
{ pageId: "kibDevDocsOpsBabelPluginSyntheticPackages"},
{ pageId: "kibDevDocsOpsBabelPluginSyntheticPackages" },
{ pageId: "kibDevDocsOpsUiSharedDepsSrc" },
]}
/>

Expand All @@ -45,7 +46,7 @@ layout: landing
{ pageId: "kibDevDocsOpsJestSerializers"},
{ pageId: "kibDevDocsOpsExpect" },
{ pageId: "kibDevDocsOpsAmbientStorybookTypes" },
{ pageId: "kibDevDocsOpsAmbientUiTypes"},
{ pageId: "kibDevDocsOpsTestSubjSelector"},
{ pageId: "kibDevDocsOpsAmbientUiTypes" },
{ pageId: "kibDevDocsOpsTestSubjSelector" },
]}
/>
42 changes: 19 additions & 23 deletions docs/user/commands/encryption-keys/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
[[kibana-encryption-keys]]
=== kibana-encryption-keys

The `kibana-encryption-keys` command helps you set up encryption keys that {kib} uses
The `kibana-encryption-keys` command helps you generate encryption keys that {kib} uses
to protect sensitive information.

[discrete]
=== Synopsis

[source,shell]
--------------------------------------------------
bin/kibana-encryption-keys generate
[-i, --interactive] [-q, --quiet]
[-f, --force] [-h, --help]
--------------------------------------------------

[discrete]
=== Description

{kib} uses encryption keys in several areas, ranging from encrypting data
in {kib} associated indices to storing session information. By defining these
encryption keys in your configuration, you'll ensure consistent operations
across restarts.

[discrete]
[[encryption-key-parameters]]
=== Parameters

`generate`:: Randomly generates passwords to the console.
=== Usage

`-i, --interactive`:: Prompts you for which encryption keys to set and optionally
where to save a sample configuration file.

`-q, --quiet`:: Outputs the encryption keys without helper information.
[source,shell]
--------------------------------------------------
bin/kibana-encryption-keys [command] [options]
--------------------------------------------------

`-f, --force`:: Shows help information.
[discrete]
[[encryption-key-parameters]]
=== Commands

`generate`:: Generate encryption keys.
+
Unless interactive mode (`-i`) is used, the generated encryption keys will be output to your console only.
From here, you should manually copy the keys into either `kibana.yml` or where else you're configurating {kib}.
+
`-i, --interactive`::: Prompts you for which encryption keys to set and optionally where to save a sample configuration file.
`-q, --quiet`::: Outputs the config options/encryption keys only (without helper information).
`-f, --force`::: Generates new keys for all settings. By default, only un-configured encryption keys will be generated.
`-h, --help`::: Shows help information.

[discrete]
=== Examples
Expand Down
19 changes: 19 additions & 0 deletions docs/user/security/secure-saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ xpack.encryptedSavedObjects:
If you don't specify an encryption key, {kib} might disable features that rely on encrypted saved objects.
============================================================================

[TIP]
============================================================================
For help generating the encryption key, refer to the <<kibana-encryption-keys, `kibana-encryption-keys`>> script.
============================================================================

[[encryption-key-rotation]]
==== Encryption key rotation

Expand All @@ -45,3 +50,17 @@ You might also leverage this functionality if multiple {kib} instances connected
============================================================================

At some point, you might want to dispose of old encryption keys completely. Make sure there are no saved objects that {kib} encrypted with these encryption keys. You can use the <<saved-objects-api-rotate-encryption-key, rotate encryption key API>> to determine which existing saved objects require decryption-only keys and re-encrypt them with the primary key.

[[encryption-key-docker-configuration]]
==== Docker configuration

It's also possible to configure the encryption keys using <<environment-variable-config,Docker environment variables>>.

Docker environment variable examples:

[source,sh]
--------------------------------------------------------------------------------
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY="min-32-byte-long-NEW-encryption-key"
XPACK_ENCRYPTEDSAVEDOBJECTS_KEYROTATION_DECRYPTIONONLYKEYS[0]="min-32-byte-long-OLD#1-encryption-key"
XPACK_ENCRYPTEDSAVEDOBJECTS_KEYROTATION_DECRYPTIONONLYKEYS[1]="min-32-byte-long-OLD#2-encryption-key"
--------------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions nav-kibana-dev.docnav.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
{ "id": "kibCoreSavedObjectsPluginApi" },
{ "id": "kibFieldFormatsPluginApi" },
{ "id": "kibDataPluginApi" },
{ "id": "kibDataEnhancedPluginApi" },
{ "id": "kibDataViewsPluginApi" },
{ "id": "kibDataQueryPluginApi" },
{ "id": "kibDataSearchPluginApi" },
Expand Down Expand Up @@ -182,7 +181,8 @@
{ "id": "kibDevDocsOpsOptimizer" },
{ "id": "kibDevDocsOpsBabelPreset" },
{ "id": "kibDevDocsOpsTypeSummarizer" },
{ "id": "kibDevDocsOpsBabelPluginSyntheticPackages"}
{ "id": "kibDevDocsOpsBabelPluginSyntheticPackages" },
{ "id": "kibDevDocsOpsUiSharedDepsSrc" }
]
},
{
Expand All @@ -202,7 +202,7 @@
{ "id": "kibDevDocsOpsExpect" },
{ "id": "kibDevDocsOpsAmbientStorybookTypes" },
{ "id": "kibDevDocsOpsAmbientUiTypes" },
{ "id": "kibDevDocsOpsTestSubjSelector"}
{ "id": "kibDevDocsOpsTestSubjSelector" }
]
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export { DataViewIllustration } from './data_view_illustration';
24 changes: 0 additions & 24 deletions packages/kbn-shared-ux-components/src/empty_state/assets/index.tsx

This file was deleted.

68 changes: 4 additions & 64 deletions packages/kbn-shared-ux-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,10 @@
import React from 'react';
import { withSuspense } from '@kbn/shared-ux-utility';

export const LazyToolbarButton = React.lazy(() =>
import('./toolbar').then(({ ToolbarButton }) => ({
default: ToolbarButton,
}))
);

/**
* A `ToolbarButton` component that is wrapped by the `withSuspense` HOC. This component can
* be used directly by consumers and will load the `LazyToolbarButton` component lazily with
* a predefined fallback and error boundary.
*/
export const ToolbarButton = withSuspense(LazyToolbarButton);

/**
* An example of the toolbar button and popover
*/
export { AddFromLibraryButton, ToolbarPopover } from './toolbar';

/**
* The Lazily-loaded `IconButtonGroup` component. Consumers should use `React.Suspense` or the
* `withSuspense` HOC to load this component.
*/
export const LazyIconButtonGroup = React.lazy(() =>
import('./toolbar').then(({ IconButtonGroup }) => ({
default: IconButtonGroup,
}))
);

/**
* The IconButtonGroup component that is wrapped by the `withSuspence` HOC.
*/
export const IconButtonGroup = withSuspense(LazyIconButtonGroup);
export { ToolbarButton, IconButtonGroup, AddFromLibraryButton, ToolbarPopover } from './toolbar';
export { KibanaPageTemplateSolutionNav } from './page_template/solution_nav';
export type { KibanaPageTemplateProps } from './page_template';
export { KibanaPageTemplate } from './page_template';

/**
* A `KibanaNoDataPage` component, with service hooks. Consumers should use `React.Suspennse` or the
Expand All @@ -58,35 +30,3 @@ export const KibanaNoDataPageLazy = React.lazy(() =>
* a predefined fallback and error boundary.
*/
export const KibanaNoDataPage = withSuspense(KibanaNoDataPageLazy);

/**
* The lazily loaded `KibanaPageTemplate` component that is wrapped by the `withSuspense` HOC. Consumers should use
* `React.Suspense` or `withSuspense` HOC to load this component.
*/
export const KibanaPageTemplateLazy = React.lazy(() =>
import('./page_template').then(({ KibanaPageTemplate }) => ({
default: KibanaPageTemplate,
}))
);

/**
* A `KibanaPageTemplate` component that is wrapped by the `withSuspense` HOC. This component can
* be used directly by consumers and will load the `KibanaPageTemplateLazy` component lazily with
* a predefined fallback and error boundary.
*/
export const KibanaPageTemplate = withSuspense(KibanaPageTemplateLazy);

/**
* A `KibanaPageTemplateProps` type.
*/
export type { KibanaPageTemplateProps } from './page_template';

/**
* The lazily loaded `KibanaPageTemplateSolutionNav` component that is wrapped by the `withSuspense` HOC. Consumers should use
* `React.Suspense` or `withSuspense` HOC to load this component.
*/
export const KibanaPageTemplateSolutionNavLazy = React.lazy(() =>
import('./page_template/solution_nav').then(({ KibanaPageTemplateSolutionNav }) => ({
default: KibanaPageTemplateSolutionNav,
}))
);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/kbn-ui-shared-deps-src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ filegroup(

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md"
]

RUNTIME_DEPS = [
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-ui-shared-deps-src/README.md

This file was deleted.

13 changes: 13 additions & 0 deletions packages/kbn-ui-shared-deps-src/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
id: kibDevDocsOpsUiSharedDepsSrc
slug: /kibana-dev-docs/ops/ui-shared-deps-src
title: "@kbn/ui-shared-deps-src"
description: A package to share single instances of internal packages across bundles
date: 2022-05-24
tags: ['kibana', 'dev', 'contributor', 'operations', 'ui', 'shared', 'deps', 'src']
---

This is a package of shared dependencies that must only have a single instance and are internal to
the Kibana repository. To consume them, import the package and merge the `externals` export into
your webpack externals config so that all references to the supported modules will be remapped
to use the global versions.
21 changes: 1 addition & 20 deletions packages/shared-ux/avatar/solution/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,5 @@
* Side Public License, v 1.
*/

import React from 'react';
import { withSuspense } from '@kbn/shared-ux-utility';

export { KibanaSolutionAvatar } from './solution_avatar';
export type { KibanaSolutionAvatarProps } from './solution_avatar';

/**
* The Lazily-loaded `KibanaSolutionAvatar` component. Consumers should use `React.Suspense` or
* the withSuspense` HOC to load this component.
*/
export const KibanaSolutionAvatarLazy = React.lazy(() =>
import('./solution_avatar').then(({ KibanaSolutionAvatar }) => ({
default: KibanaSolutionAvatar,
}))
);

/**
* A `KibanaSolutionAvatar` component that is wrapped by the `withSuspense` HOC. This component can
* be used directly by consumers and will load the `KibanaPageTemplateSolutionNavAvatarLazy` component lazily with
* a predefined fallback and error boundary.
*/
export const KibanaSolutionAvatar = withSuspense(KibanaSolutionAvatarLazy);
41 changes: 0 additions & 41 deletions packages/shared-ux/button/exit_full_screen/src/index.ts

This file was deleted.

11 changes: 11 additions & 0 deletions packages/shared-ux/button/exit_full_screen/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export { ExitFullScreenButtonKibanaProvider, ExitFullScreenButtonProvider } from './services';
export { ExitFullScreenButton as ExitFullScreenButtonComponent } from './exit_full_screen_button.component';
export { ExitFullScreenButton } from './exit_full_screen_button';
Loading

0 comments on commit 874ef4b

Please sign in to comment.