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

upcoming: [M3-8139, M3-8140, M3-8141] – Add warning notices re: non-encryption when creating Images & enabling Backups #10521

Merged

Conversation

dwiley-akamai
Copy link
Contributor

@dwiley-akamai dwiley-akamai commented May 28, 2024

Description πŸ“

Add notices to the Imagize dialog, "Enable Backups" dialog, and the Create Image --> "Capture Image" tab advising users that Images and Backups are not encrypted.

Target release date πŸ—“οΈ

6/10

Preview πŸ“·

Screenshots

Screenshot 2024-05-30 at 11 22 36β€―AM

Screenshot 2024-05-30 at 11 30 22β€―AM

Screenshot 2024-05-30 at 11 31 18β€―AM

How to test πŸ§ͺ

Prerequisites

  1. Use an account that doesn't have Managed enabled (since you'll need to check the "Enable Backups" flow)
  2. Have the linode_disk_encryption tag on your account
  3. Point at the alpha/dev environment
  4. Have the Linode Disk Encryption (LDE) flag in our dev tool toggled on

Verification steps

Without the tag and/or with the LDE flag in our dev tool toggled off, you should not see any LDE-related things in the UI. Otherwise,

  1. Go to the Backups tab on a Linode Details page and click "Enable Backups". Observe: a notice that says "Virtual Machine Backups are not encrypted."
  2. Go to the Storage tab on a Linode Details page and select a disk to imagize. Observe in the dialog a notice that says: "Virtual Machine Images are not encrypted."
  3. Go to create an Image and on the "Capture Image" tab select a linode in a core region. Observe a notice that says: "Virtual Machine Images are not encrypted." (if you select a linode in an Edge region, you should not see the notice)

The last item is a bit difficult to test at the moment outside of DevEnv, but you can turn the MSW on and first select metadata-test-image to see the notice and then switch to the next two (metadata-test-region and Gecko Edge Test) to see that it doesn't appear. Nonetheless, the linodeIsInEdgeRegion logic in CreateImageTab.tsx should ensure that the notice is not displayed if the selected linode is in an Edge region.

As an Author I have considered πŸ€”

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@dwiley-akamai dwiley-akamai added the Linode Disk Encryption (LDE) Relating to LDE project label May 28, 2024
@dwiley-akamai dwiley-akamai self-assigned this May 28, 2024
.click();

// Check if notice is visible
cy.get(`[data-testid=${encryptionCaveatNoticeTestId}]`).should('exist');
Copy link
Contributor

Choose a reason for hiding this comment

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

In a hypothetical scenario where this warning notice fails to appear or the language inadvertently gets changed, is there any risk a customer could create an Image and expect it to be encrypted and suffer some kind of incident as a result?

If we're not certain the answer is no, I might suggest searching for the actual contents of the notice (i.e. via cy.findByText('...')), and I might additionally suggest that we define a constant in this spec containing that language (not importing the const from src) so that this test fails if the language is ever inadvertently changed or fails to render inside the data-testid="encryption-caveat-notice" element.

Copy link
Contributor Author

@dwiley-akamai dwiley-akamai May 30, 2024

Choose a reason for hiding this comment

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

I don't think there would be any risk of them suffering an incident since there's currently no ability for a user to choose to encrypt an image, but down the line it is possible some users may assume that all resources get encrypted after being conditioned by LDE.

That is a reasonable adjustment though, included it in the most recent commit πŸš€ Thanks for taking a look and for the suggestions!

@@ -123,9 +149,9 @@ export const CreateImageTab = () => {
text="open a support ticket"
title="Request to increase Image size limit when capturing from Linode disk"
/>{' '}
to request a higher limit. Additionally, images can't be created
from a raw disk or a disk that's formatted using a custom file
system.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

prompted by linter -- small change to use apostrophe as we do in other places throughout the app instead of the single quotation mark


const { data: linode } = useLinodeQuery(
selectedLinodeId ?? -1,
Boolean(selectedLinodeId) && isDiskEncryptionFeatureEnabled
Copy link
Contributor Author

@dwiley-akamai dwiley-akamai May 30, 2024

Choose a reason for hiding this comment

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

the objective here is prevent this query from firing off constantly if a linode hasn't been selected yet or if LDE is not enabled

@dwiley-akamai dwiley-akamai marked this pull request as ready for review May 30, 2024 20:18
@dwiley-akamai dwiley-akamai requested review from a team as code owners May 30, 2024 20:18
@dwiley-akamai dwiley-akamai requested review from AzureLatte, hana-akamai and hkhalil-akamai and removed request for a team May 30, 2024 20:18
Copy link
Contributor

@AzureLatte AzureLatte left a comment

Choose a reason for hiding this comment

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

e2e test create-image.spec.tc passed.

Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Verified the notice appears:

βœ… In the Backups tab
βœ… In the Storage tab
βœ… In the Capture Image tab

βœ… Code review looks good. Thanks for including tests.

Approved pending CI passes (machine-image-upload.spec.ts appears to be failing).

Copy link

github-actions bot commented Jun 3, 2024

Coverage Report: βœ…
Base Coverage: 82.35%
Current Coverage: 82.35%

@dwiley-akamai dwiley-akamai merged commit 5abec31 into linode:develop Jun 3, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linode Disk Encryption (LDE) Relating to LDE project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants