diff --git a/x-pack/plugins/cloud_security_posture/common/constants.ts b/x-pack/plugins/cloud_security_posture/common/constants.ts index 57f1e465ea73b..27fc64d44966f 100644 --- a/x-pack/plugins/cloud_security_posture/common/constants.ts +++ b/x-pack/plugins/cloud_security_posture/common/constants.ts @@ -199,6 +199,6 @@ export const TEMPLATE_URL_ACCOUNT_TYPE_ENV_VAR = 'ACCOUNT_TYPE'; export const ORGANIZATION_ACCOUNT = 'organization-account'; export const SINGLE_ACCOUNT = 'single-account'; -export const CLOUD_SECURITY_PLUGIN_VERSION = '1.8.1'; +export const CLOUD_SECURITY_PLUGIN_VERSION = '1.9.0'; // Cloud Credentials Template url was implemented in 1.10.0-preview01. See PR - https://github.com/elastic/integrations/pull/9828 export const CLOUD_CREDENTIALS_PACKAGE_VERSION = '1.10.0-preview01'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx index 653986a7128de..114d973f32541 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx @@ -420,6 +420,7 @@ function SecretInputField({ iconType="refresh" iconSide="left" size="xs" + data-test-subj={`button-replace-${fieldTestSelector}`} > { + return await testSubjects.find(`button-replace-${secretField}`); + }; + return { cisAzure, cisAws, @@ -311,5 +315,6 @@ export function AddCisIntegrationFormPageProvider({ getValueInEditPage, isOptionChecked, checkIntegrationPliAuthBlockExists, + getReplaceSecretButton, }; } diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts index cae23e9bfe8a4..5523e05120912 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts @@ -124,6 +124,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -159,6 +160,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -247,6 +249,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -283,6 +286,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 6bd117c36a85d..99cc57905d46e 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -111,11 +111,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect( - (await cisIntegration.getValueInEditPage( - CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET - )) === clientSecret - ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null); }); }); @@ -227,11 +223,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect( - (await cisIntegration.getValueInEditPage( - CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET - )) === clientSecret - ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts index ec4a7c61239ea..db567d335b0ff 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts @@ -73,6 +73,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -107,6 +108,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts index 320b130e63e91..11b4f056841f1 100644 --- a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts +++ b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; import { createTestConfig } from '../../config.base'; export default createTestConfig({ @@ -14,7 +15,7 @@ export default createTestConfig({ }, kbnServerArgs: [ `--xpack.fleet.packages.0.name=cloud_security_posture`, - `--xpack.fleet.packages.0.version=1.5.2`, + `--xpack.fleet.packages.0.version=${CLOUD_SECURITY_PLUGIN_VERSION}`, `--xpack.securitySolutionServerless.productTypes=${JSON.stringify([ { product_line: 'security', product_tier: 'essentials' }, { product_line: 'endpoint', product_tier: 'essentials' },