Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4ad1ebc
[Fleet] POC use mutiple saved object type for agent policies with opt…
nchaulet Jul 29, 2024
76c35fe
Address robustnesst feedback
nchaulet Aug 1, 2024
e5d2a80
Lock API
nchaulet Aug 1, 2024
29fe8d1
Package policy service
nchaulet Aug 2, 2024
61360e0
Update tests
nchaulet Aug 2, 2024
d54f401
fix types
nchaulet Aug 2, 2024
b44f425
Merge branch 'main' of github.com:elastic/kibana into poc-agent-polic…
nchaulet Aug 2, 2024
3442d39
fix types
nchaulet Aug 2, 2024
6df1bd9
fix mappings
nchaulet Aug 2, 2024
7d23916
fix api integration tests and endpoints type
nchaulet Aug 5, 2024
25cd612
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Aug 5, 2024
84af205
fix more tests
nchaulet Aug 5, 2024
3b123d2
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Aug 5, 2024
6591f7b
Fix service using direct access to saved object
nchaulet Aug 5, 2024
d603478
Merge branch 'poc-agent-policy-so-multiple-optin' of github.com:nchau…
nchaulet Aug 5, 2024
97b38c5
More tests
nchaulet Aug 5, 2024
c075579
Merge branch 'main' of github.com:elastic/kibana into poc-agent-polic…
nchaulet Aug 6, 2024
34dfe57
Migration status
nchaulet Aug 6, 2024
8d4319b
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Aug 6, 2024
e8726b0
test migration
nchaulet Aug 6, 2024
2f4a3d6
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Aug 6, 2024
956b064
Test API lock
nchaulet Aug 6, 2024
f2a1d03
Merge branch 'poc-agent-policy-so-multiple-optin' of github.com:nchau…
nchaulet Aug 6, 2024
c55384e
use isSpaceAwareness instead of feature flag
nchaulet Aug 6, 2024
2bf0ed7
add lock at package policy service level
nchaulet Aug 7, 2024
6cc0660
Add integration test for migration
nchaulet Aug 7, 2024
0d103fe
fix tests
nchaulet Aug 7, 2024
ba85e90
Fix jest tests
nchaulet Aug 7, 2024
dc938c8
Fix tests
nchaulet Aug 7, 2024
272aab6
fix tests
nchaulet Aug 8, 2024
09c073e
Merge branch 'main' into poc-agent-policy-so-multiple-optin
elasticmachine Aug 8, 2024
483c1a6
Merge branch 'main' into poc-agent-policy-so-multiple-optin
elasticmachine Aug 8, 2024
583b3f8
fix useless comment
nchaulet Aug 8, 2024
754d2a2
Fix tests
nchaulet Aug 9, 2024
5e6cd0c
Merge branch 'main' into poc-agent-policy-so-multiple-optin
elasticmachine Aug 9, 2024
aa6fe91
Update x-pack/plugins/fleet/server/services/spaces/helper.test.ts
nchaulet Aug 9, 2024
adbd050
Add integration tests
nchaulet Aug 9, 2024
c57357c
Merge branch 'poc-agent-policy-so-multiple-optin' of github.com:nchau…
nchaulet Aug 9, 2024
ed100df
fix unit tests
nchaulet Aug 9, 2024
c21aadf
Merge branch 'main' into poc-agent-policy-so-multiple-optin
elasticmachine Aug 12, 2024
46a5d15
Merge branch 'main' of github.com:elastic/kibana into poc-agent-polic…
nchaulet Aug 14, 2024
0acd1dc
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Aug 14, 2024
7e79428
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Aug 14, 2024
40f7153
fix merge typo
nchaulet Aug 14, 2024
ead6dfc
fix merge typo
nchaulet Aug 14, 2024
1249eca
fix merge conflict
nchaulet Aug 14, 2024
d61be89
Merge branch 'main' of github.com:elastic/kibana into poc-agent-polic…
nchaulet Aug 14, 2024
1be5937
fix mappings
nchaulet Aug 14, 2024
f1566f3
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Aug 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion packages/kbn-check-mappings-update-cli/current_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,36 @@
"token",
"valid_until"
],
"fleet-agent-policies": [
"advanced_settings",
"agent_features",
"agent_features.enabled",
"agent_features.name",
"data_output_id",
"description",
"download_source_id",
"fleet_server_host_id",
"global_data_tags",
"inactivity_timeout",
"is_default",
"is_default_fleet_server",
"is_managed",
"is_preconfigured",
"is_protected",
"keep_monitoring_alive",
"monitoring_enabled",
"monitoring_output_id",
"name",
"namespace",
"overrides",
"revision",
"schema_version",
"status",
"supports_agentless",
"unenroll_timeout",
"updated_at",
"updated_by"
],
"fleet-fleet-server-host": [
"host_urls",
"is_default",
Expand All @@ -469,6 +499,32 @@
"proxy_id"
],
"fleet-message-signing-keys": [],
"fleet-package-policies": [
"created_at",
"created_by",
"description",
"elasticsearch",
"enabled",
"inputs",
"is_managed",
"name",
"namespace",
"output_id",
"overrides",
"package",
"package.name",
"package.requires_root",
"package.title",
"package.version",
"policy_id",
"policy_ids",
"revision",
"secret_references",
"secret_references.id",
"updated_at",
"updated_by",
"vars"
],
"fleet-preconfiguration-deletion-record": [
"id"
],
Expand Down Expand Up @@ -651,7 +707,9 @@
"has_seen_add_data_notice",
"output_secret_storage_requirements_met",
"prerelease_integrations_enabled",
"secret_storage_requirements_met"
"secret_storage_requirements_met",
"use_space_awareness_migration_started_at",
"use_space_awareness_migration_status"
],
"inventory-view": [],
"kql-telemetry": [],
Expand Down
182 changes: 182 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,99 @@
}
}
},
"fleet-agent-policies": {
"properties": {
"advanced_settings": {
"index": false,
"type": "flattened"
},
"agent_features": {
"properties": {
"enabled": {
"type": "boolean"
},
"name": {
"type": "keyword"
}
}
},
"data_output_id": {
"type": "keyword"
},
"description": {
"type": "text"
},
"download_source_id": {
"type": "keyword"
},
"fleet_server_host_id": {
"type": "keyword"
},
"global_data_tags": {
"index": false,
"type": "flattened"
},
"inactivity_timeout": {
"type": "integer"
},
"is_default": {
"type": "boolean"
},
"is_default_fleet_server": {
"type": "boolean"
},
"is_managed": {
"type": "boolean"
},
"is_preconfigured": {
"type": "keyword"
},
"is_protected": {
"type": "boolean"
},
"keep_monitoring_alive": {
"type": "boolean"
},
"monitoring_enabled": {
"index": false,
"type": "keyword"
},
"monitoring_output_id": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"namespace": {
"type": "keyword"
},
"overrides": {
"index": false,
"type": "flattened"
},
"revision": {
"type": "integer"
},
"schema_version": {
"type": "version"
},
"status": {
"type": "keyword"
},
"supports_agentless": {
"type": "boolean"
},
"unenroll_timeout": {
"type": "integer"
},
"updated_at": {
"type": "date"
},
"updated_by": {
"type": "keyword"
}
}
},
"fleet-fleet-server-host": {
"properties": {
"host_urls": {
Expand Down Expand Up @@ -1581,6 +1674,87 @@
"dynamic": false,
"properties": {}
},
"fleet-package-policies": {
"properties": {
"created_at": {
"type": "date"
},
"created_by": {
"type": "keyword"
},
"description": {
"type": "text"
},
"elasticsearch": {
"dynamic": false,
"properties": {}
},
"enabled": {
"type": "boolean"
},
"inputs": {
"dynamic": false,
"properties": {}
},
"is_managed": {
"type": "boolean"
},
"name": {
"type": "keyword"
},
"namespace": {
"type": "keyword"
},
"output_id": {
"type": "keyword"
},
"overrides": {
"index": false,
"type": "flattened"
},
"package": {
"properties": {
"name": {
"type": "keyword"
},
"requires_root": {
"type": "boolean"
},
"title": {
"type": "keyword"
},
"version": {
"type": "keyword"
}
}
},
"policy_id": {
"type": "keyword"
},
"policy_ids": {
"type": "keyword"
},
"revision": {
"type": "integer"
},
"secret_references": {
"properties": {
"id": {
"type": "keyword"
}
}
},
"updated_at": {
"type": "date"
},
"updated_by": {
"type": "keyword"
},
"vars": {
"type": "flattened"
}
}
},
"fleet-preconfiguration-deletion-record": {
"properties": {
"id": {
Expand Down Expand Up @@ -2168,6 +2342,14 @@
},
"secret_storage_requirements_met": {
"type": "boolean"
},
"use_space_awareness_migration_started_at": {
"index": false,
"type": "date"
},
"use_space_awareness_migration_status": {
"index": false,
"type": "keyword"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ const STANDARD_LIST_TYPES = [
'infrastructure-monitoring-log-view',
'apm-indices',
// Fleet saved object types
'ingest_manager_settings',
'ingest-outputs',
'ingest-download-sources',
'ingest-agent-policies',
'fleet-agent-policies',
'ingest-package-policies',
'fleet-package-policies',
'epm-packages',
'epm-packages-assets',
'fleet-preconfiguration-deletion-record',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ describe('checking migration metadata changes on all registered SO types', () =>
"file": "6b65ae5899b60ebe08656fd163ea532e557d3c98",
"file-upload-usage-collection-telemetry": "06e0a8c04f991e744e09d03ab2bd7f86b2088200",
"fileShare": "5be52de1747d249a221b5241af2838264e19aaa1",
"fleet-agent-policies": "f57d3b70e4175a19a18f18ee72a379ceec82e1fc",
"fleet-fleet-server-host": "69be15f6b6f2a2875ad3c7050ddea7a87f505417",
"fleet-message-signing-keys": "93421f43fed2526b59092a4e3c65d64bc2266c0f",
"fleet-package-policies": "2f4d524adb49a5281d3af0b66bb3003ba0ff2e44",
"fleet-preconfiguration-deletion-record": "c52ea1e13c919afe8a5e8e3adbb7080980ecc08e",
"fleet-proxy": "6cb688f0d2dd856400c1dbc998b28704ff70363d",
"fleet-setup-lock": "0dc784792c79b5af5a6e6b5dcac06b0dbaa90bde",
Expand All @@ -120,7 +122,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"ingest-download-sources": "279a68147e62e4d8858c09ad1cf03bd5551ce58d",
"ingest-outputs": "daafff49255ab700e07491376fe89f04fc998b91",
"ingest-package-policies": "53a94064674835fdb35e5186233bcd7052eabd22",
"ingest_manager_settings": "91445219e7115ff0c45d1dabd5d614a80b421797",
"ingest_manager_settings": "e794576a05d19dd5306a1e23cbb82c09bffabd65",
"inventory-view": "b8683c8e352a286b4aca1ab21003115a4800af83",
"kql-telemetry": "93c1d16c1a0dfca9c8842062cf5ef8f62ae401ad",
"legacy-url-alias": "9b8cca3fbb2da46fd12823d3cd38fdf1c9f24bc8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const previouslyRegisteredTypes = [
'file-upload-usage-collection-telemetry',
'fleet-agent-actions',
'fleet-agent-events',
'fleet-agent-policies',
'fleet-package-policies',
'fleet-agents',
'fleet-enrollment-api-keys',
'fleet-fleet-server-host',
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/fleet/common/constants/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* 2.0.
*/

export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies';
export const LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies';
export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'fleet-agent-policies';

export const AGENT_POLICY_INDEX = '.fleet-policies';
export const agentPolicyStatuses = {
Active: 'active',
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/fleet/common/constants/package_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* 2.0.
*/

export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies';
export const LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies';

export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'fleet-package-policies';

export const PACKAGE_POLICY_DEFAULT_INDEX_PRIVILEGES = ['auto_configure', 'create_doc'];

Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/fleet/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export {
FLEET_ENDPOINT_PACKAGE,
// Saved object type
AGENT_POLICY_SAVED_OBJECT_TYPE,
LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE,
PACKAGES_SAVED_OBJECT_TYPE,
PACKAGE_POLICY_SAVED_OBJECT_TYPE,
LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE as PACKAGE_POLICY_SAVED_OBJECT_TYPE,
OUTPUT_SAVED_OBJECT_TYPE,
PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE,
ASSETS_SAVED_OBJECT_TYPE,
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/fleet/common/types/models/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export interface BaseSettings {

export interface Settings extends BaseSettings {
id: string;
version?: string;
preconfigured_fields?: Array<'fleet_server_hosts'>;
secret_storage_requirements_met?: boolean;
output_secret_storage_requirements_met?: boolean;
use_space_awareness_migration_status?: 'pending' | 'success' | 'error';
use_space_awareness_migration_started_at?: string | null;
}
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export interface GetFleetStatusResponse {
>;
missing_optional_features: Array<'encrypted_saved_object_encryption_key_required'>;
package_verification_key_id?: string;
is_space_awareness_enabled?: boolean;
is_secrets_storage_enabled?: boolean;
}
Loading