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

feat(terraform): Ensure that the AKS cluster encrypt temp disks, caches, and data flows between Compute and Storage resources #5588

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

tdefise
Copy link
Contributor

@tdefise tdefise commented Sep 22, 2023

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Fixes #5586

New/Edited policies (Delete if not relevant)

With host-based encryption, the data stored on the VM host of your AKS agent nodes' VMs is encrypted at rest and flows encrypted to the Storage service. This means the temp disks are encrypted at rest with platform-managed keys. The cache of OS and data disks is encrypted at rest with either platform-managed keys or customer-managed keys depending on the encryption type set on those disks.

By default, when using AKS, OS and data disks use server-side encryption with platform-managed keys. The caches for these disks are encrypted at rest with platform-managed keys. You can specify your own managed keys following Bring your own keys (BYOK) with Azure disks in Azure Kubernetes Service. The caches for these disks are also encrypted using the key you specify.

Host-based encryption is different than server-side encryption (SSE), which is used by Azure Storage. Azure-managed disks use Azure Storage to automatically encrypt data at rest when saving data. Host-based encryption uses the host of the VM to handle encryption before the data flows through Azure Storage.

Note that on the documentation of Terraform, it is seen as "Preview".

image

However, it has been set as "General availability" on May 25, 2021

image

Fix

Enable "Encryption At Host"

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@tdefise tdefise temporarily deployed to scan-security September 22, 2023 08:37 — with GitHub Actions Inactive
@tdefise tdefise temporarily deployed to scan-security September 22, 2023 11:06 — with GitHub Actions Inactive
Copy link
Contributor

@JamesWoolfenden JamesWoolfenden left a comment

Choose a reason for hiding this comment

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

LGTM

@JamesWoolfenden JamesWoolfenden temporarily deployed to scan-security September 26, 2023 10:31 — with GitHub Actions Inactive
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

thanks, nice work 🥇

@gruebel gruebel merged commit b52e850 into bridgecrewio:main Sep 29, 2023
4 checks passed
JamesWoolfenden added a commit that referenced this pull request Sep 29, 2023
…es, and data flows between Compute and Storage resources (#5588)

* Create check

* Correct the wrong TF test

---------

Co-authored-by: Thomas Defise <[email protected]>
Co-authored-by: James Woolfenden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants