From 579278c024b49a7128bcc637362c736c1844529f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20G=C3=B3mez?= Date: Tue, 13 Apr 2021 11:10:51 +0200 Subject: [PATCH] Add config flag to enable/disable the permissions --- x-pack/plugins/fleet/common/types/index.ts | 1 + .../fleet/public/applications/fleet/mock/plugin_configuration.ts | 1 + x-pack/plugins/fleet/server/index.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/x-pack/plugins/fleet/common/types/index.ts b/x-pack/plugins/fleet/common/types/index.ts index 1984de79a6357e..b48f99c3481848 100644 --- a/x-pack/plugins/fleet/common/types/index.ts +++ b/x-pack/plugins/fleet/common/types/index.ts @@ -31,6 +31,7 @@ export interface FleetConfigType { }; agentPolicyRolloutRateLimitIntervalMs: number; agentPolicyRolloutRateLimitRequestPerInterval: number; + agentPolicyTightPermissions: boolean; }; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts index 81ef6a6703c343..0026d254bd94b2 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/mock/plugin_configuration.ts @@ -28,6 +28,7 @@ export const createConfigurationMock = (): FleetConfigType => { }, agentPolicyRolloutRateLimitIntervalMs: 100, agentPolicyRolloutRateLimitRequestPerInterval: 1000, + agentPolicyTightPermissions: false, }, }; }; diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts index 0178b801f4d2fc..2e67d6ae5de08b 100644 --- a/x-pack/plugins/fleet/server/index.ts +++ b/x-pack/plugins/fleet/server/index.ts @@ -76,6 +76,7 @@ export const config: PluginConfigDescriptor = { agentPolicyRolloutRateLimitRequestPerInterval: schema.number({ defaultValue: AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL, }), + agentPolicyTightPermissions: schema.boolean({ defaultValue: false }), }), }), };