forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Telemetry] Settings Collector: redact sensitive reported values (ela…
- Loading branch information
Showing
37 changed files
with
694 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...development/core/public/kibana-plugin-core-public.uisettingsparams.sensitive.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) > [sensitive](./kibana-plugin-core-public.uisettingsparams.sensitive.md) | ||
|
||
## UiSettingsParams.sensitive property | ||
|
||
a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
sensitive?: boolean; | ||
``` |
13 changes: 13 additions & 0 deletions
13
...elopment/core/server/kibana-plugin-core-server.iuisettingsclient.issensitive.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [IUiSettingsClient](./kibana-plugin-core-server.iuisettingsclient.md) > [isSensitive](./kibana-plugin-core-server.iuisettingsclient.issensitive.md) | ||
|
||
## IUiSettingsClient.isSensitive property | ||
|
||
Shows whether the uiSetting is a sensitive value. Used by telemetry to not send sensitive values. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
isSensitive: (key: string) => boolean; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...development/core/server/kibana-plugin-core-server.uisettingsparams.sensitive.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [UiSettingsParams](./kibana-plugin-core-server.uisettingsparams.md) > [sensitive](./kibana-plugin-core-server.uisettingsparams.sensitive.md) | ||
|
||
## UiSettingsParams.sensitive property | ||
|
||
a flag indicating that value might contain user sensitive data. used by telemetry to mask the value of the setting when sent. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
sensitive?: boolean; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/plugins/kibana_usage_collection/server/collectors/management/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# User-changed UI Settings - Management Collector | ||
|
||
The Usage Collector `stack_management` reports user changed settings. | ||
All user changed UI Settings are automatically collected. | ||
|
||
After adding a new setting you will be required to do the following steps: | ||
|
||
1. Update the [schema](./schema.ts) to include the setting name and schema type. | ||
``` | ||
export const stackManagementSchema: MakeSchemaFrom<UsageStats> = { | ||
'MY_UI_SETTING': { type: 'keyword' }, | ||
} | ||
``` | ||
|
||
2. Update the [UsageStats interface](./types.ts) with the setting name and typescript type. | ||
``` | ||
export interface UsageStats { | ||
'MY_UI_SETTING': string; | ||
} | ||
``` | ||
3. Run the telemetry checker with `--fix` flag to automatically fix the mappings | ||
|
||
``` | ||
node scripts/telemetry_check --fix | ||
``` | ||
|
||
If you forget any of the steps our telemetry tools and tests will help you through the process! | ||
|
||
## Sensitive fields | ||
|
||
If the configured UI setting might contain user sensitive information simply add the property `sensitive: true` to the ui setting registration config. | ||
|
||
``` | ||
uiSettings.register({ | ||
[NEWS_FEED_URL_SETTING]: { | ||
name: i18n.translate('xpack.securitySolution.uiSettings.newsFeedUrl', { | ||
defaultMessage: 'News feed URL', | ||
}), | ||
value: NEWS_FEED_URL_SETTING_DEFAULT, | ||
sensitive: true, | ||
description: i18n.translate('xpack.securitySolution.uiSettings.newsFeedUrlDescription', { | ||
defaultMessage: '<p>News feed content will be retrieved from this URL</p>', | ||
}), | ||
category: [APP_ID], | ||
requiresPageReload: true, | ||
schema: schema.string(), | ||
}, | ||
}), | ||
``` | ||
|
||
The value of any UI setting marked as `sensitive` will be reported as a keyword `[REDACTED]` instead of the actual value. This hides the actual sensitive information while giving us some intelligence over which fields the users are interactive with the most. |
7 changes: 0 additions & 7 deletions
7
...ins/kibana_usage_collection/server/collectors/management/__snapshots__/index.test.ts.snap
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
src/plugins/kibana_usage_collection/server/collectors/management/index.test.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.