From 328d0733f99af7fadb1ca9d86928287363b69874 Mon Sep 17 00:00:00 2001
From: Paul Tavares <paul.tavares@elastic.co>
Date: Fri, 15 Oct 2021 15:16:32 -0400
Subject: [PATCH 1/2] set `trustedAppsByPolicyEnabled` flag to true by default

---
 .../plugins/security_solution/common/experimental_features.ts   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts
index 148390324c13f..14b1bf8dc22dd 100644
--- a/x-pack/plugins/security_solution/common/experimental_features.ts
+++ b/x-pack/plugins/security_solution/common/experimental_features.ts
@@ -16,7 +16,7 @@ export const allowedExperimentalValues = Object.freeze({
   ruleRegistryEnabled: false,
   tGridEnabled: true,
   tGridEventRenderedViewEnabled: true,
-  trustedAppsByPolicyEnabled: false,
+  trustedAppsByPolicyEnabled: true,
   excludePoliciesInFilterEnabled: false,
   uebaEnabled: false,
   disableIsolationUIPendingStatuses: false,

From cade738f3ef1e45c2f2750db479027baa414ed95 Mon Sep 17 00:00:00 2001
From: Paul Tavares <paul.tavares@elastic.co>
Date: Sun, 17 Oct 2021 11:14:50 -0400
Subject: [PATCH 2/2] Fix server tests

---
 .../server/fleet_integration/fleet_integration.test.ts         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
index d0bbb3b346ea8..2f31f54143f74 100644
--- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
+++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts
@@ -343,9 +343,10 @@ describe('ingest_integration tests ', () => {
       });
     });
 
-    it("doesn't remove policy from trusted app FF disabled", async () => {
+    it("doesn't remove policy from trusted app if feature flag is disabled", async () => {
       await invokeDeleteCallback({
         ...allowedExperimentalValues,
+        trustedAppsByPolicyEnabled: false, // since it was changed to `true` by default
       });
 
       expect(exceptionListClient.findExceptionListItem).toHaveBeenCalledTimes(0);