The process for offboarding cloud accounts from a CSPM tool is an essential step in maintaining the security and compliance of your cloud infrastructure. Here is a general process for offboarding cloud accounts:

  • Identify inactive or decommissioned cloud accounts: Determine which cloud accounts are no longer in use, have been decommissioned, or are otherwise no longer relevant to your organization’s operations. This can be based on input from IT and operations teams, account status, or business requirements.
  • Review account dependencies: Before offboarding a cloud account, assess its dependencies within the CSPM solution. Identify any connected resources, configurations, or associated data that may require migration or backup.
  • Plan the offboarding process: Create a clear plan outlining the steps involved in offboarding the cloud accounts. Include considerations such as data backup, resource migration, and access revocation.
  • Backup or transfer data: If there is any relevant data associated with the offboarding cloud accounts in the CSPM solution, ensure it is properly backed up or transferred to a suitable location for future reference or auditing purposes.
  • Terminate monitoring and alerting: Disable monitoring and alerting for the specific cloud accounts within the CSPM solution. This ensures that the CSPM platform no longer collects data or generates alerts for those accounts.
  • Revoke access and permissions: Remove the CSPM solution’s access and permissions to the offboarding cloud accounts, ensuring that the solution can no longer access or manage the resources within those accounts.
  • Update documentation and processes: Update any relevant documentation, procedures, or workflows to reflect the offboarding of the cloud accounts from the CSPM solution. Ensure that stakeholders are informed of the changes and any alternative monitoring mechanisms, if applicable.
  • Validate and verify offboarding: After completing the offboarding process, perform validation checks to ensure that the cloud accounts are successfully removed from the CSPM solution and that monitoring and management have ceased.
  • Decommission resources (if applicable): If there are any resources associated with the offboarding cloud accounts that are no longer needed, follow proper decommissioning processes to remove or delete those resources securely.

Remember that the specific steps for offboarding cloud accounts from a CSPM solution may vary depending on the solution itself and the cloud provider involved. Always consult the documentation and guidelines provided by the CSPM solution and the respective cloud provider for the most accurate and up-to-date offboarding procedures.

Summary

In this chapter, we explored the best practices and steps involved in onboarding cloud accounts to a CSPM solution. We discussed the importance of automating the onboarding process to streamline and expedite account setup. Additionally, we examined the deployment architecture for onboarding multi-cloud environments, considering the complexities and unique requirements of each cloud provider. We also delved into the challenges that can arise during the onboarding process and provided mitigations to address them. We explored the topic of offboarding cloud accounts from the CSPM solution and its significance.

The next chapter is focused on containers onboarding to CSPM tool. As containers are complex and vast in themselves, their onboarding aspects are discussed separately.

Further reading

To learn more about the topics that were covered in this chapter, take a look at the following resources:

Containerization has revolutionized the way applications are developed, deployed, and managed. Some key advantages include the following:

  • Portability: Containers possess remarkable portability, facilitating the consistent execution of applications across various operating systems, cloud platforms, and infrastructure environments. This inherent mobility effectively eliminates the pervasive issue of “works on my machine” and simplifies the deployment process.
  • Scalability: Containers facilitate the easy scaling of applications. They can be quickly replicated and distributed across multiple instances, allowing organizations to handle increased workloads efficiently. With container orchestration platforms such as Kubernetes, scaling applications becomes seamless and automated.
  • Resource efficiency: Containers are lightweight, consuming minimal resources compared to traditional virtual machines (VMs). They share the host operating system kernel, reducing the overhead associated with full OS virtualization. This efficiency enables higher density and optimal utilization of infrastructure resources.
  • Faster deployment: Containers provide rapid application deployment and release cycles. By encapsulating all dependencies within the container image, applications can be deployed consistently and quickly. This agility is particularly beneficial in modern DevOps and continuous delivery practices.
  • Isolation and security: Containers offer process-level isolation, ensuring that applications and their dependencies run independently of one another. This isolation provides enhanced security by mitigating the impact of potential vulnerabilities or exploits in one container or many. Container security measures, such as sandboxing and restricted access, further strengthen the overall security posture.
  • DevOps collaboration: Containerization fosters collaboration between development and operations teams. By providing a standardized environment, developers can package their applications with all required dependencies, ensuring consistent behavior throughout the development life cycle. Operations teams can then deploy these containers seamlessly across various environments.
  • Microservices architecture: Containers align well with microservices-based architectures. They enable the decomposition of complex applications into smaller, independently deployable, and scalable services. This modular approach enhances agility and fault isolation, and facilitates easier maintenance and updates.

Now that you understand what containers are and the benefits they bring, let us now understand the importance of security in a containerized environment.

At the time of writing this chapter, Defender for Containers support for Amazon EKS clusters is a preview feature. To receive the full protection offered by Microsoft Defender for Containers, the following components are needed:

  • Kubernetes audit logs
  • Azure Arc-enabled Kubernetes
  • The Defender extension
  • The Azure Policy extension

To understand the full concepts and updated information, read the Microsoft documentation (https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-architecture?tabs=defender-for-container-arch-eks#architecture-diagram-of-defender-for-cloud-and-eks-clusters).

Figure 7.3 – Architecture diagram of Defender for Cloud and Amazon EKS cluster (source: Microsoft)

Google Cloud GKE cluster

At the time of writing this chapter, Defender for Containers support for GKE in a connected GCP project cluster is a preview feature. To receive the full protection offered by Microsoft Defender for Containers, the following components are needed:

  • Kubernetes audit logs
  • Azure Arc-enabled Kubernetes
  • The Defender extension
  • The Azure Policy extension

To understand the full concepts and updated information, read the Microsoft documentation (https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-architecture?tabs=defender-for-container-arch-eks#architecture-diagram-of-defender-for-cloud-and-eks-clusters).

Figure 7.4 – Architecture diagram of Defender for Cloud and GKE cluster (source: Microsoft)

Once containers are onboarded, Defender for Containers receives and analyzes the following information to protect Kubernetes containers:

  • Audit logs and security events from the API server
  • Cluster configuration information from the control plane
  • Workload configuration from Azure Policy
  • Security signals and events from the node level

Now that you understand the architecture diagram of Kubernetes clusters along with Microsoft Defender for Containers, let us now understand how the onboarding of Kubernetes clusters works.

Enabling Microsoft Defender for Containers for Kubernetes clusters

Microsoft Defender for Containers is a feature bundled with cloud-native solutions through Microsoft Defender for Cloud for securing your Kubernetes clusters.

Let us now understand how it works in the case of Azure Kubernetes clusters.

Roadblock #4 – Policy complexity

Defining and configuring complex security policies can be time-consuming and prone to misconfigurations.

Best practices are as follows:

  • Start with foundational security policies and gradually add complexity as needed
  • Leverage industry-standard templates for common policies
  • Use automation to simplify policy creation and enforcement

Roadblock #5 – Alert fatigue

Overwhelming numbers of alerts can lead to alert fatigue, where important alerts may be overlooked.

Best practices are as follows:

  • Customize alert thresholds and priorities based on the severity and business impact
  • Implement intelligent alerting that correlates multiple events to reduce noise
  • Use automated remediation to address common, low-level issues without generating alerts

Roadblock #6 – Integration complexity

Integrating the CSPM tool with existing security and operations tools can be complex.

Best practices are as follows:

  • Use pre-built integrations where available
  • Develop clear integration strategies and roadmaps
  • Engage with the CSPM tool vendor or consult with experts to facilitate integration

Roadblock #7 – Monitoring and alerting configuration

Configuring the monitoring and alerting features of the CSPM tool correctly can be daunting.

Best practices are as follows:

  • Consult with CSPM tool documentation and vendor support for guidance
  • Start with a small set of critical alerts and expand gradually
  • Conduct regular testing and validation to ensure alerts are functioning as expected

Roadblock #8 – Data privacy and security

Handling sensitive data collected by the CSPM tool can pose privacy and security concerns.

Best practices are as follows:

  • Implement data protection measures, including encryption and access controls
  • Comply with data privacy regulations (e.g., GDPR) and data retention policies
  • Conduct regular security assessments of the CSPM tool itself

Roadblock #9 – Compliance variability

Different cloud platforms may have variations in compliance standards and terminology.

Best practices are as follows:

  • Ensure that the CSPM tool can handle these variations and offer consistent reporting
  • Collaborate with compliance experts to align your policies and practices

Roadblock #10 – Scalability

The CSPM tool should be able to scale with your growing cloud infrastructure.

Best practices are as follows:

  • Choose a CSPM tool that can handle increased volumes of cloud accounts and resources
  • Regularly assess the performance and capacity of the tool to plan for scaling

Addressing these roadblocks and implementing the recommended best practices will help ensure a smooth onboarding process and effective use of a CSPM tool in securing your cloud accounts and resources.

Every CSPM vendor is on a journey to bring new features every day. It is part of the vendor assessment process to make sure that the vendor you are choosing has the capabilities to support all other cloud environments your organization is using. For example, as of today while writing this chapter, Microsoft Defender for Cloud supports Azure DevOps and GitHub environment (in preview) but no other cloud environments, such as Oracle Cloud Infrastructure (OCI) or Alibaba Cloud. However, you can still onboard your SQL servers, Windows servers, or any other workloads by installing Microsoft Defender for Endpoint agents to the workloads. Defender for Cloud can monitor the security posture of non-Azure computers, but first, you need to connect them to Azure.

The following are some links that you can refer to when onboarding non-Azure workloads to Microsoft Defender for Cloud:

Please refer to the Further reading section of this chapter to learn more about cloud account onboarding.

Let us now look at challenges and roadblocks that may arise during onboarding.

Onboarding roadblocks and mitigation best practices

During the onboarding process of cloud accounts to a CSPM tool, organizations may encounter several roadblocks. Let us understand these roadblocks one by one, along with mitigation best practices.

Roadblock #1 – Lack of necessary permissions

Obtaining the required permissions and credentials to connect cloud accounts can be challenging, especially in larger organizations.

Best practices are as follows:

  • Work closely with your cloud service providers to grant the necessary access
  • Clearly define and communicate the required permissions to relevant stakeholders
  • Use role-based access control (RBAC) to manage access more effectively

Roadblock #2 – Complex cloud environments

Multi-cloud or hybrid environments can be complex, with different configurations and security practices across platforms.

Best practices are as follows:

  • Develop a standardized approach for security policies and practices
  • Ensure your CSPM tool can support multiple cloud platforms
  • Create a comprehensive inventory of all cloud assets

Roadblock #3 – Resistance to change

Resistance from IT or development teams when introducing a CSPM tool can be a roadblock.

Best practices are as follows:

  • Communicate the benefits of the CSPM tool, such as improved security and compliance
  • Collaborate with teams to address their concerns and involve them in the onboarding process
  • Provide training to ensure that teams can use the tool effectively

The account onboarding process is also known as the account connection process for public clouds. It is the process of establishing a connection between a CSPM account and your CSP account such as Microsoft Azure, AWS, GCP, Oracle Cloud, and so on. When the connection between the CSPM tool and the cloud account is established, CSPM can access your cloud infrastructure and scan it for vulnerabilities and other security issues.

Note

To make the concept easily understandable, the Microsoft Defender for Cloud CSPM tool is taken as a reference wherever it is imperative to explain with an example. This book does not justify one tool over another. The tool is chosen based on the information available publicly. Generic and high-level steps are provided here, which is not enough for onboarding an account. You must follow vendor documentation and support for successful onboarding. It is beyond the scope of this book to dive deep into a particular tool.

Onboarding AWS accounts

Connecting your AWS accounts to Microsoft Defender for Cloud allows you to leverage the security capabilities of Microsoft Defender to protect your AWS resources and workloads. This integration provides centralized visibility, threat detection, and incident response across your AWS infrastructure. Microsoft Defender for Cloud protects workloads in AWS, but you need to set up the connection between them and your Azure subscription.

Every CSPM vendor provides comprehensive documentation and support for successful account onboarding as part of their contract with customers. To connect your AWS account to Microsoft Defender for Cloud, you should follow its documentation and guidance.

Follow this documentation link to connect your AWS accounts to Microsoft Defender for Cloud: https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-aws.

Prerequisites

Before we set up the connection, you’ll need to be ready with the following:

  • You need a Microsoft Azure subscription. If you do not have an Azure subscription, set one up.
  • You must set up your CSPM (Microsoft Defender for Cloud in this case) on your Azure subscription.
  • You must have access to an AWS account.
  • Ensure you have appropriate permissions and access to manage AWS resources. You need to have Contributor permission for the relevant Azure subscription and Administrator permission on the AWS account.

Let’s begin!

  1. Set up an AWS IAM role: The first step is to create an IAM role in your AWS account that grants necessary permissions to Microsoft Defender for Cloud. Assign appropriate permissions to the IAM role, such as read-only access to your AWS resources. Make sure to define a trust relationship between the IAM role and the Microsoft Defender for Cloud service principal.
  2. Configure AWS account in Microsoft Defender for Cloud: Sign in to the Microsoft Defender Security Center. Navigate to Settings and select AWS accounts or Add AWS account. Provide the necessary details such as account name, AWS account ID, and the IAM role ARN (Amazon Resource Names) you created. Click on Add account to initiate the connection process.
  3. Validate the connection: Microsoft Defender for Cloud will attempt to establish a connection with the specified AWS account using the provided IAM role. If the connection is successful, you will see the AWS account listed as connected in the Microsoft Defender Security Center.
  4. Enable data collection: Once the connection is established, you can configure data collection settings for the AWS account. Decide which types of AWS data you want to collect, such as CloudTrail logs, VPC flow logs, or CloudWatch events. Enable the necessary data connectors and configure any required permissions or settings.
  5. Monitor and respond to threats: Defender for Cloud will start collecting and analyzing the security data from your AWS resources. Monitor the alerts and security recommendations provided by Defender for Cloud and take appropriate actions to remediate any identified threats.

If you follow the documentation steps correctly, you should be able to see that your AWS account has onboarded into the Microsoft Defender for Cloud CSPM tool, as shown in the following screenshot:

Figure 6.1 – Microsoft Defender for Cloud

Now that we have seen how an AWS account can be onboarded to Microsoft Defender for Cloud, let us look at how to onboard the same for Microsoft Azure.

copyright © 2025 skygravity.org