Skip to content

Commit d3f0ceb

Browse files
committed
Adding invalidate API key task for TM
1 parent 87bc4df commit d3f0ceb

File tree

53 files changed

+2476
-1786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2476
-1786
lines changed

docs/extend/plugin-list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ mapped_pages:
240240
| [streamsApp](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/streams_app/README.md) | Home of the Streams app plugin, which allows users to manage Streams via the UI. |
241241
| [synthetics](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/README.md) | The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening in their infrastructure. |
242242
| [taskManager](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/task_manager/README.md) | The task manager is a generic system for running background tasks. |
243-
| [taskManagerDependencies](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/task_manager_dependencies/README.md) | This plugin is used as a temporary sidecar plugin to enable the task manager plugin access to the encrypted saved objects client as there is a circular dependency if the task manager were to require the encrypted saved objects plugin directly. |
243+
| [taskManagerDependencies](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/task_manager_dependencies/README.md) | This plugin is used as a temporary sidecar plugin to enable the task manager plugin access to the encrypted saved objects client and the security plugin start contract as there is a circular dependency if the task manager were to require the encrypted saved objects plugin directly. |
244244
| [telemetryCollectionXpack](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/telemetry_collection_xpack/README.md) | Gathers all usage collection, retrieving them from both: OSS and X-Pack plugins. |
245245
| [timelines](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/timelines/README.md) | Timelines is a plugin that provides a grid component with accompanying server side apis to help users identify events of interest and perform root cause analysis within Kibana. |
246246
| [transform](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/private/transform/README.md) | This plugin provides access to the transforms features provided by Elasticsearch. It follows Kibana's standard plugin architecture, originally the plugin boilerplate code was taken from the snapshot/restore plugin. |

packages/kbn-check-saved-objects-cli/current_fields.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
"apiKeyId",
9898
"createdAt"
9999
],
100+
"api_key_to_invalidate": [
101+
"apiKeyId",
102+
"createdAt"
103+
],
100104
"apm-custom-dashboards": [
101105
"dashboardSavedObjectId",
102106
"kuery",

packages/kbn-check-saved-objects-cli/current_mappings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,17 @@
325325
}
326326
}
327327
},
328+
"api_key_to_invalidate": {
329+
"dynamic": false,
330+
"properties": {
331+
"apiKeyId": {
332+
"type": "keyword"
333+
},
334+
"createdAt": {
335+
"type": "date"
336+
}
337+
}
338+
},
328339
"apm-custom-dashboards": {
329340
"properties": {
330341
"dashboardSavedObjectId": {

src/core/packages/saved-objects/server-internal/src/object_types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export { registerCoreObjectTypes } from './registration';
1111

1212
// set minimum number of registered saved objects to ensure no object types are removed after 8.8
1313
// declared in internal implementation explicitly to prevent unintended changes.
14-
export const SAVED_OBJECT_TYPES_COUNT = 138 as const;
14+
export const SAVED_OBJECT_TYPES_COUNT = 139 as const;

src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
6767
"alert": "25c6ceada17bfbe3027062c87e8eec6207d210f69638e53dd8110cba9735973b",
6868
"alerting_rule_template": "7c0ce40abc7416e49e3729b5189623be396c31b6c7ce2f915d9f4908405eca74",
6969
"api_key_pending_invalidation": "19ece0ac908352a86624e7c487f452077db878a9bf15286892c6da8e76bbb479",
70+
"api_key_to_invalidate": "556a42e1ae119c25e4935058aad011cbc6ae2f9cfaee12f6936118ad07ac3edd",
7071
"apm-custom-dashboards": "30647691e2f67ccb9530d4c99d5723800872b4e5291a033de1116357603e4f27",
7172
"apm-indices": "9d3b6f5d29647738edb718b38e0eab712ec705f707b47572cf0bb37e011f3a8e",
7273
"apm-server-schema": "a58389bb3de41d987a2f0e53fd3360e90586656c981a9adaf862f4a06b7ab873",
@@ -299,6 +300,11 @@ describe('checking migration metadata changes on all registered SO types', () =>
299300
"api_key_pending_invalidation|mappings: 6690f4f2a071feda5eec8353cdb23c0f1624910a",
300301
"api_key_pending_invalidation|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709",
301302
"api_key_pending_invalidation|10.1.0: 61265eecca1fe876ad48410cd295efdd61a593911dd6ab530b36bd8943c7c102",
303+
"===============================================================================================",
304+
"api_key_to_invalidate|global: d1a20b058bd48891c1c958a20a8e1bac37c25b87",
305+
"api_key_to_invalidate|mappings: fa87c3b4528dcec61462709d2575ac13ba86397e",
306+
"api_key_to_invalidate|schemas: da39a3ee5e6b4b0d3255bfef95601890afd80709",
307+
"api_key_to_invalidate|10.1.0: 61265eecca1fe876ad48410cd295efdd61a593911dd6ab530b36bd8943c7c102",
302308
"=====================================================================================================",
303309
"apm-custom-dashboards|global: f72017061cda1a43792af034d019b3a766eacd7a",
304310
"apm-custom-dashboards|mappings: 72a467c41818fc3a8f88c40a885e835485752e73",
@@ -1264,6 +1270,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
12641270
"alert": "10.7.0",
12651271
"alerting_rule_template": "10.2.0",
12661272
"api_key_pending_invalidation": "10.1.0",
1273+
"api_key_to_invalidate": "10.1.0",
12671274
"apm-custom-dashboards": "10.1.0",
12681275
"apm-indices": "10.1.0",
12691276
"apm-server-schema": "10.1.0",
@@ -1412,6 +1419,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
14121419
"alert": "10.7.0",
14131420
"alerting_rule_template": "10.2.0",
14141421
"api_key_pending_invalidation": "10.1.0",
1422+
"api_key_to_invalidate": "10.1.0",
14151423
"apm-custom-dashboards": "10.1.0",
14161424
"apm-indices": "10.1.0",
14171425
"apm-server-schema": "10.1.0",

src/core/server/integration_tests/saved_objects/registration/type_registrations.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const previouslyRegisteredTypes = [
1818
'alert',
1919
'alerting_rule_template',
2020
'api_key_pending_invalidation',
21+
'api_key_to_invalidate',
2122
'apm-custom-dashboards',
2223
'apm-indices',
2324
'apm-server-schema',

src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ kibana_vars=(
435435
xpack.task_manager.auto_calculate_default_ech_capacity
436436
xpack.task_manager.discovery.active_nodes_lookback
437437
xpack.task_manager.discovery.interval
438+
xpack.task_manager.invalidate_api_key_task.interval
439+
xpack.task_manager.invalidate_api_key_task.removalDelay
438440
xpack.task_manager.kibanas_per_partition
439441
xpack.task_manager.max_attempts
440442
xpack.task_manager.max_workers

x-pack/platform/plugins/private/task_manager_dependencies/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Task Manager Dependencies
22

33
This plugin is used as a temporary sidecar plugin to enable the task manager plugin access to
4-
the encrypted saved objects client as there is a circular dependency if the task manager were to
4+
the encrypted saved objects client and the security plugin start contract as there is a circular dependency if the task manager were to
55
require the encrypted saved objects plugin directly.
66

77
This is because the encrypted saved objects plugin has a dependency on the security plugin, which

x-pack/platform/plugins/private/task_manager_dependencies/kibana.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
"taskManager",
2020
"encryptedSavedObjects",
2121
],
22+
"optionalPlugins": [
23+
"security",
24+
]
2225
},
2326
}

x-pack/platform/plugins/private/task_manager_dependencies/moon.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ project:
2020
dependsOn:
2121
- '@kbn/core'
2222
- '@kbn/encrypted-saved-objects-plugin'
23+
- '@kbn/security-plugin'
2324
- '@kbn/task-manager-plugin'
2425
tags:
2526
- plugin

0 commit comments

Comments
 (0)