Skip to content
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

[Cloud Security] add required_vars validation rules and default CSPM and Asset Inventory to agentless deployment #12363

Merged
merged 15 commits into from
Jan 27, 2025

Conversation

seanrathier
Copy link
Contributor

@seanrathier seanrathier commented Jan 15, 2025

Proposed commit message

required_vars validation rules for CSPM integration and default agentless deployments.

Add required_vars validation rules for CSPM integration for conditionally required fields.
Defaulting CSPM and Asset Inventory to agentless deployments.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • package-spec version 3.3.2 released

How to test this PR locally

Related issues

Screenshots

Screenshot 2025-01-23 at 12 34 13 PM

@andrewkroh andrewkroh added the Integration:cloud_security_posture Security Posture Management label Jan 15, 2025
@seanrathier seanrathier changed the title [Cloud Security] added required_vars [Cloud Security] [Bug] Require Agentless CSPM account fields' to be mandatory and editable options Jan 21, 2025
@seanrathier seanrathier changed the title [Cloud Security] [Bug] Require Agentless CSPM account fields' to be mandatory and editable options [Cloud Security] add required_vars validation rules and default to agentless deployment Jan 23, 2025
@andrewkroh andrewkroh added the Integration:cloud_asset_inventory Cloud Asset Inventory label Jan 23, 2025
@seanrathier seanrathier added the enhancement New feature or request label Jan 23, 2025
@seanrathier seanrathier marked this pull request as ready for review January 23, 2025 17:34
@seanrathier seanrathier requested a review from a team as a code owner January 23, 2025 17:34
@andrewkroh andrewkroh added the Team:Cloud Security Label for the Cloud Security team [elastic/cloud-security-posture] label Jan 23, 2025
@seanrathier seanrathier self-assigned this Jan 23, 2025
@seanrathier seanrathier changed the title [Cloud Security] add required_vars validation rules and default to agentless deployment [Cloud Security] add required_vars validation rules and default CSPM and Asset Inventory to agentless deployment Jan 23, 2025
Comment on lines +48 to +94
- type: cloudbeat/asset_inventory_aws
title: AWS Asset Inventory
description: AWS Asset Inventory
vars:
- name: cloud_formation_template
type: text
title: CloudFormation Template
multi: false
required: true
show_user: false
description: Template URL to Cloud Formation Quick Create Stack
# ACCOUNT_TYPE value should be either "single-account" or "organization-account"
default: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-asset-inventory-ACCOUNT_TYPE-8.17.0.yml&stackName=Elastic-Cloud-Security-Posture-Management&param_EnrollmentToken=FLEET_ENROLLMENT_TOKEN&param_FleetUrl=FLEET_URL&param_ElasticAgentVersion=KIBANA_VERSION&param_ElasticArtifactServer=https://artifacts.elastic.co/downloads/beats/elastic-agent
- name: cloud_formation_credentials_template
type: text
title: CloudFormation Credentials Template
multi: false
required: true
show_user: false
description: Template URL to Cloud Formation Cloud Credentials Stack
# ACCOUNT_TYPE value should be either "single-account" or "organization-account"
default: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-asset-inventory-direct-access-key-ACCOUNT_TYPE-8.17.0.yml
- type: cloudbeat/asset_inventory_azure
title: Azure Asset Inventory
description: Azure Asset Inventory
vars:
- name: arm_template_url
type: text
title: ARM Template URL
multi: false
required: true
show_user: false
description: A URL to the ARM Template for creating a new deployment
# ACCOUNT_TYPE value should be either "single-account" or "organization-account"
default: https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Felastic%2Fcloudbeat%2F8.17%2Fdeploy%2Fasset-inventory-arm%2FARM-for-ACCOUNT_TYPE.json
- type: cloudbeat/asset_inventory_gcp
title: GCP Asset Inventory
description: GCP Asset Inventory
vars:
- name: cloud_shell_url
type: text
title: CloudShell URL
multi: false
required: true
show_user: false
description: A URL to CloudShell for creating a new deployment
default: https://shell.cloud.google.com/cloudshell/?ephemeral=true&cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Felastic%2Fcloudbeat&cloudshell_git_branch=8.17&cloudshell_workspace=deploy%2Fdeployment-manager&show=terminal
Copy link
Contributor

Choose a reason for hiding this comment

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

was that an IDE auto-formatting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. I ran the elastic-package build lint on it. That may have changed it.

@Omolola-Akinleye Omolola-Akinleye self-requested a review January 24, 2025 17:48
Copy link
Contributor

@Omolola-Akinleye Omolola-Akinleye left a comment

Choose a reason for hiding this comment

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

Role_ARN showing in AWS CSPM UI for Manual selection. Sorry for the confusion.

@seanrathier
Copy link
Contributor Author

/test

@elastic elastic deleted a comment from elasticmachine Jan 27, 2025
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

Package cloud_security_posture 👍(0) 💚(1) 💔(1)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
findings 52631.58 43478.26 -9153.32 (-17.39%) 💔

To see the full report comment with /test benchmark fullreport

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @seanrathier

@seanrathier seanrathier merged commit b3b3362 into elastic:main Jan 27, 2025
4 of 5 checks passed
@elastic-vault-github-plugin-prod

Package cloud_asset_inventory - 0.8.0 containing this change is available at https://epr.elastic.co/package/cloud_asset_inventory/0.8.0/

@elastic-vault-github-plugin-prod

Package cloud_security_posture - 1.13.0-preview02 containing this change is available at https://epr.elastic.co/package/cloud_security_posture/1.13.0-preview02/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:cloud_asset_inventory Cloud Asset Inventory Integration:cloud_security_posture Security Posture Management Team:Cloud Security Label for the Cloud Security team [elastic/cloud-security-posture]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants