Skip to content

[Cloud Secutity Posture] Add cloud connector support for asset discovery #221689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Omolola-Akinleye
Copy link
Contributor

@Omolola-Akinleye Omolola-Akinleye commented May 27, 2025

Summary

Add Cloud Connector support for Agentless Asset Discovery Integration. In this PR, we add the following:

  • Feature flag in Security Solution Plugin to enable Cloud Connector feature in Asset Discover Integration
  • Add Cloud Connector as the default supported option in Agentless AWS Form similar CSPM
Screenshot 2025-05-27 at 3 56 25 PM Screenshot 2025-05-27 at 3 56 40 PM image

@Omolola-Akinleye Omolola-Akinleye self-assigned this May 27, 2025
@Omolola-Akinleye Omolola-Akinleye added Team:Cloud Security Cloud Security team related v9.1.0 v8.19.0 release_note:feature Makes this part of the condensed release notes labels May 27, 2025
@Omolola-Akinleye Omolola-Akinleye marked this pull request as ready for review May 27, 2025 21:06
@Omolola-Akinleye Omolola-Akinleye requested review from a team as code owners May 27, 2025 21:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@Omolola-Akinleye Omolola-Akinleye added the backport:prev-major Backport to (8.19, 8.18, 8.17) the previous major branch and other branches in development label May 27, 2025
@opauloh opauloh requested review from opauloh and Copilot May 28, 2025 16:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Cloud Connector integration in Agentless Asset Discovery by introducing new feature flags, updated AWS credential forms and related constants, and corresponding test changes. Key changes include:

  • Adding new hooks and constants for Cloud Connector support
  • Updating AWS credentials forms and options to support Cloud Connectors
  • Enhancing tests and mocks to cover the new functionality

Reviewed Changes

Copilot reviewed 17 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/hooks/use_kibana.ts Adds a new hook to extend Kibana context for CSP integration.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/constants.ts Introduces new test subject constants and version info.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/utils.ts Adds new utility functions for handling Cloud Connector AWS credential configuration.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/policy_template_selectors.tsx Updates component props to pass along the new showCloudConnectors flag.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/policy_template_form.tsx Modifies policy template form to include Cloud Connector support and feature flag integration.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/policy_template_form.test.tsx Updates tests to include Cloud Connector functionality.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/mocks.ts Adds a new mock for AWS package info reflecting Cloud Connector assets.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/constants.ts Adds new constants for Cloud Connector template URLs and environment variables.
x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/aws_credentials_form/* Updates AWS credentials form types, hooks, options, and components to incorporate Cloud Connector support.
x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts Introduces a new experimental feature flag for Cloud Connectors.
x-pack/solutions/security/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx Adjusts the AWS agentless credentials form for the CSPM integration using Cloud Connector details.
Files not reviewed (3)
  • x-pack/platform/plugins/private/translations/translations/fr-FR.json: Language not supported
  • x-pack/platform/plugins/private/translations/translations/ja-JP.json: Language not supported
  • x-pack/platform/plugins/private/translations/translations/zh-CN.json: Language not supported
Comments suppressed due to low confidence (2)

x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/constants.ts:40

  • Consider correcting the spelling from 'ACCORDIAN' to 'ACCORDION' to align with standard English spelling and maintain consistency across the codebase.
export const TEST_SUBJ_AWS_CLOUD_FORMATION_ACCORDIAN = 'asset-inventory-launchAws-CloudFormation-Accordian-Instructions';

x-pack/solutions/security/plugins/security_solution/public/asset_inventory/components/fleet_extensions/aws_credentials_form/aws_credentials_form_options.tsx:153

  • The i18n translation id contains a double dot ('..assumeRoleLabel'); please remove the extra dot to ensure proper translation key mapping.
label: i18n.translate('xpack.securitySolution.assetInventory.fleetIntegration..assumeRoleLabel', {

@Omolola-Akinleye Omolola-Akinleye requested review from a team as code owners May 29, 2025 00:24
Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kibana management changes lgtm

@@ -688,7 +687,9 @@ export const CspPolicyTemplateForm = memo<PackagePolicyReplaceDefineStepExtensio
const isParentSecurityPosture = !integrationParam;
// Handling validation state
const [isValid, setIsValid] = useState(true);
const { cloud } = useKibana().services;
const { cloud, uiSettings } = useKibana().services;
const cloudConnectorsEnabled = uiSettings.get('securitySolution:enableCloudConnector') || false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, I'd reuse the constant here

Suggested change
const cloudConnectorsEnabled = uiSettings.get('securitySolution:enableCloudConnector') || false;
const cloudConnectorsEnabled = uiSettings.get(SECURITY_SOLUTION_ENABLE_CLOUD_CONNECTOR_SETTING) || false;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you replace this string with a constant? Either SECURITY_SOLUTION_ENABLE_CLOUD_CONNECTOR_SETTING or ENABLE_CLOUD_CONNECTOR_SETTING would work

@Omolola-Akinleye Omolola-Akinleye requested a review from a team as a code owner May 29, 2025 13:58
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner May 29, 2025 14:56
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
…ery (elastic#221689)

## Summary

Add Cloud Connector support for Agentless Asset Discovery Integration.
In this PR, we add the following:

- Feature flag in Security Solution Plugin to enable Cloud Connector
feature in Asset Discover Integration
- Add Cloud Connector as the default supported option in Agentless AWS
Form similar CSPM

<img width="1146" alt="Screenshot 2025-05-27 at 3 56 25 PM"
src="https://github.com/user-attachments/assets/b6b92136-ff24-4eed-ad95-3e1345dd70b8"
/>

<img width="1687" alt="Screenshot 2025-05-27 at 3 56 40 PM"
src="https://github.com/user-attachments/assets/434d4606-f3ea-4db0-a17a-8ba02fac314a"
/>

<img width="1665" alt="image"
src="https://github.com/user-attachments/assets/b7ce097c-e800-4a2f-9035-9382a3a6e07b"
/>

---------

Co-authored-by: kibanamachine <[email protected]>
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

7 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

11 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

3 similar comments
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 221689 locally
cc: @Omolola-Akinleye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport missing Added to PRs automatically when the are determined to be missing a backport. backport release_note:feature Makes this part of the condensed release notes Team:Cloud Security Cloud Security team related v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants