Skip to content

feat: enable customer-managed key for nodePool OS disk encryption - #5682

Open
Caden Marchese (cadenmarchese) wants to merge 3 commits into
Azure:mainfrom
cadenmarchese:cadenmarchese/pass-des-to-cluster-service
Open

feat: enable customer-managed key for nodePool OS disk encryption#5682
Caden Marchese (cadenmarchese) wants to merge 3 commits into
Azure:mainfrom
cadenmarchese:cadenmarchese/pass-des-to-cluster-service

Conversation

@cadenmarchese

@cadenmarchese Caden Marchese (cadenmarchese) commented Jun 16, 2026

Copy link
Copy Markdown
Member

https://redhat.atlassian.net/browse/ARO-27738

What

allows BYOK for nodePool OS disk encryption. Currently, since we don't pass the diskEncryptionSet ID to cluster service, all nodePool OS disks fall back to platform-managed keys.

This also unblocks mHSM support for nodePool OS Disk encryption (but not etcd, that requires HyperShift changes)

This requires service managed identity (or the mock) to have Reader role over the disk encryption set, otherwise e2e fails with the following:

: Nodepool OS Disk Encryption should create a nodepool with customer-managed disk encryption via DES expand_less23m40s{fail [github.com/Azure/ARO-HCP/test/e2e/nodepool_osdisk_encryption.go:134]: failed to create nodepool des-np with DES Unexpected error:     <*fmt.wrapError \| 0xc0015ba6c0>:      failed to create NodePool des-np: failed waiting for nodepool="des-np" for cluster "des-encrypt" in resourcegroup="des-encrypt-6jl8pq" to finish creating: GET https://rp.j6608000.hcpsvc.osadev.cloud/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28     --------------------------------------------------------------------------------     RESPONSE 200: 200 OK     ERROR CODE: InternalServerError     --------------------------------------------------------------------------------     {       "id": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28",       "name": "c915d1eb-59bc-41f2-800e-47d6179fae28",       "status": "Failed",       "startTime": "2026-07-16T22:00:30.305420763Z",       "endTime": "2026-07-16T22:00:45.224060261Z",       "error": {         "code": "InternalServerError",         "message": "[clusterServiceNodePoolStatus] GET https://management.azure.com/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje\n--------------------------------------------------------------------------------\nRESPONSE 403: 403 Forbidden\nERROR CODE: AuthorizationFailed\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"AuthorizationFailed\",\n    \"message\": \"The client '33e65307-a696-491e-831f-42341ce3a9b5' with object id 'b26c2343-0863-4a55-bb7e-dfb2544999c1' does not have authorization to perform action 'Microsoft.Compute/diskEncryptionSets/read' over scope '/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\n  }\n}\n--------------------------------------------------------------------------------\n"       }     }     -------------------------------------------------------------------------------- | : Nodepool OS Disk Encryption should create a nodepool with customer-managed disk encryption via DES expand_less | 23m40s | {fail [github.com/Azure/ARO-HCP/test/e2e/nodepool_osdisk_encryption.go:134]: failed to create nodepool des-np with DES Unexpected error:     <*fmt.wrapError \| 0xc0015ba6c0>:      failed to create NodePool des-np: failed waiting for nodepool="des-np" for cluster "des-encrypt" in resourcegroup="des-encrypt-6jl8pq" to finish creating: GET https://rp.j6608000.hcpsvc.osadev.cloud/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28     --------------------------------------------------------------------------------     RESPONSE 200: 200 OK     ERROR CODE: InternalServerError     --------------------------------------------------------------------------------     {       "id": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28",       "name": "c915d1eb-59bc-41f2-800e-47d6179fae28",       "status": "Failed",       "startTime": "2026-07-16T22:00:30.305420763Z",       "endTime": "2026-07-16T22:00:45.224060261Z",       "error": {         "code": "InternalServerError",         "message": "[clusterServiceNodePoolStatus] GET https://management.azure.com/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje\n--------------------------------------------------------------------------------\nRESPONSE 403: 403 Forbidden\nERROR CODE: AuthorizationFailed\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"AuthorizationFailed\",\n    \"message\": \"The client '33e65307-a696-491e-831f-42341ce3a9b5' with object id 'b26c2343-0863-4a55-bb7e-dfb2544999c1' does not have authorization to perform action 'Microsoft.Compute/diskEncryptionSets/read' over scope '/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\n  }\n}\n--------------------------------------------------------------------------------\n"       }     }     --------------------------------------------------------------------------------
: Nodepool OS Disk Encryption should create a nodepool with customer-managed disk encryption via DES expand_less | 23m40s
{fail [github.com/Azure/ARO-HCP/test/e2e/nodepool_osdisk_encryption.go:134]: failed to create nodepool des-np with DES Unexpected error:     <*fmt.wrapError \| 0xc0015ba6c0>:      failed to create NodePool des-np: failed waiting for nodepool="des-np" for cluster "des-encrypt" in resourcegroup="des-encrypt-6jl8pq" to finish creating: GET https://rp.j6608000.hcpsvc.osadev.cloud/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28     --------------------------------------------------------------------------------     RESPONSE 200: 200 OK     ERROR CODE: InternalServerError     --------------------------------------------------------------------------------     {       "id": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses/c915d1eb-59bc-41f2-800e-47d6179fae28",       "name": "c915d1eb-59bc-41f2-800e-47d6179fae28",       "status": "Failed",       "startTime": "2026-07-16T22:00:30.305420763Z",       "endTime": "2026-07-16T22:00:45.224060261Z",       "error": {         "code": "InternalServerError",         "message": "[clusterServiceNodePoolStatus] GET https://management.azure.com/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje\n--------------------------------------------------------------------------------\nRESPONSE 403: 403 Forbidden\nERROR CODE: AuthorizationFailed\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"AuthorizationFailed\",\n    \"message\": \"The client '33e65307-a696-491e-831f-42341ce3a9b5' with object id 'b26c2343-0863-4a55-bb7e-dfb2544999c1' does not have authorization to perform action 'Microsoft.Compute/diskEncryptionSets/read' over scope '/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\n  }\n}\n--------------------------------------------------------------------------------\n"       }     }     --------------------------------------------------------------------------------

Why

This is required to get BYOK for nodePool OS Disk encryption working, both for regular keyvaults, and mHSM keyvaults. Today the HCP API will accept a disk encryption set but won't use it for the actual encryption.

Testing

Special notes for your reviewer

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

Copilot AI lite review requested due to automatic review settings June 16, 2026 21:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds support for propagating an OS disk Disk Encryption Set (DES) resource ID from the RP node pool model into the Cluster Service (CS) node pool representation.

Changes:

  • Added a dedicated helper to build the CS OS disk builder, including optional SSE encryption-set wiring.
  • Updated BuildCSNodePool to use the new OS disk builder helper.
  • Added test coverage to verify DES ID propagation and the nil case.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/ocm/convert.go Introduces buildCSOsDisk and uses it in BuildCSNodePool to set SseEncryptionSetResourceId when present.
internal/ocm/convert_test.go Adds test cases validating the DES resource ID mapping and ensuring the field is omitted when EncryptionSetID is nil.

Comment thread internal/ocm/convert.go Outdated
@bennerv

Copy link
Copy Markdown
Member

Can you add an e2e test that creates a nodepool with os disk encryption set, and uses an azure client to confirm they're actually set when the node pools are created?

Copilot AI review requested due to automatic review settings June 17, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread test/e2e/nodepool_osdisk_encryption.go Outdated
Comment thread test/util/framework/deployment_params.go Outdated
Comment thread test/e2e/nodepool_osdisk_encryption.go Outdated
Comment thread test/e2e/nodepool_osdisk_encryption.go Outdated
@miguelsorianod

Copy link
Copy Markdown
Collaborator

What are the code changes themselves look good to me.

About the e2e, without being familiar with the functionality on Azure side, the test conceptually seems correct. I will let others more familiar with it give their view.

I left some minor comments.

Copilot AI review requested due to automatic review settings June 18, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@cadenmarchese

Copy link
Copy Markdown
Member Author

/retest

Copilot AI review requested due to automatic review settings July 16, 2026 13:28
@cadenmarchese
Caden Marchese (cadenmarchese) force-pushed the cadenmarchese/pass-des-to-cluster-service branch from e930d35 to ff2fba2 Compare July 16, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread test/util/framework/deployment_params.go Outdated
Comment thread test/util/framework/hcp_helper.go Outdated
Copilot AI review requested due to automatic review settings July 16, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread test/util/framework/deployment_params.go Outdated
Comment thread test/util/framework/hcp_helper.go Outdated
@cadenmarchese

Caden Marchese (cadenmarchese) commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

The CI custom role was updated to accommodate this e2e test. Context:

 Nodepool OS Disk Encryption should create a nodepool with customer-managed disk encryption via DES expand_less | 23m40s | {fail [github.com/Azure/ARO-HCP/test/e2e/nodepool_osdisk_encryption.go:134]: failed to create nodepool des-np with DES Unexpected error:     <*fmt.wrapError \| 0xc0015ba6c0>:      failed to create NodePool des-np: failed waiting for nodepool="des-np" for cluster "des-encrypt" in resourcegroup="des-encrypt-6jl8pq" to finish creating: GET https://rp.j6608000.hcpsvc.osadev.cloud/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     --------------------------------------------------------------------------------     RESPONSE 200: 200 OK     ERROR CODE: InternalServerError     --------------------------------------------------------------------------------     {       "id": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/providers/Microsoft.RedHatOpenShift/locations/westus3/hcpOperationStatuses//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",       "name": "/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",       "status": "Failed",       "startTime": "2026-07-16T22:00:30.305420763Z",       "endTime": "2026-07-16T22:00:45.224060261Z",       "error": {         "code": "InternalServerError",         "message": "[clusterServiceNodePoolStatus] GET https://management.azure.com/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje\n--------------------------------------------------------------------------------\nRESPONSE 403: 403 Forbidden\nERROR CODE: AuthorizationFailed\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"AuthorizationFailed\",\n    \"message\": \"The client '/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' with object id '/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX does not have authorization to perform action 'Microsoft.Compute/diskEncryptionSets/read' over scope '/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/des-encrypt-6jl8pq/providers/Microsoft.Compute/diskEncryptionSets/des-encrypt-des-o3nbqnh7nwvje' or the scope is invalid. If access was recently granted, please refresh your credentials.\"\n  }\n}\n--------------------------------------------------------------------------------\n"       }     }     --------------------------------------------------------------------------------

@cadenmarchese
Caden Marchese (cadenmarchese) force-pushed the cadenmarchese/pass-des-to-cluster-service branch from ba4f0a3 to f3055a7 Compare July 21, 2026 16:04
Copilot AI review requested due to automatic review settings July 21, 2026 16:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@cadenmarchese

Copy link
Copy Markdown
Member Author

/retest-required

Copilot AI review requested due to automatic review settings July 22, 2026 13:51
@cadenmarchese

Caden Marchese (cadenmarchese) commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

Rael Garcia (@raelga) the change you mentioned was intentional but was due to a misunderstanding. I removed the sweeper because I assumed that we used the same keyvault across all e2e tests (meaning that the sweeper wouldn't function anymore as part of my purge protection changes). Now that I see this was not correct and we use 1 keyvault per test case, I have reverted this so that it can continue sweeping keyvaults that are not part of my test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Suppressed comments (3)

test/e2e/nodepool_osdisk_encryption.go:71

  • This test creates a Key Vault key via the Key Vault data-plane client (azkeys.CreateKey) when building the Disk Encryption Set. With Key Vault RBAC enabled, the test runner typically needs an explicit Key Vault Crypto Officer assignment (as done in kms_key_rotation.go) or the CreateKey call can fail with 403.

Add the "assignKeyVaultCryptoOfficer" parameter to the customer-infra deployment inputs so the test runner can create/rotate keys.

				map[string]interface{}{
					"enableKeyVaultSoftDelete":          true,
					"enableKeyVaultPurgeProtection":     true,
					"keyVaultSoftDeleteRetentionInDays": 7,
				},

test/e2e-setup/bicep/modules/customer-infra.bicep:113

  • The module description says purge protection "requires soft delete", but the template currently allows enableKeyVaultPurgeProtection=true while enableKeyVaultSoftDelete=false. Azure will reject that combination at deploy time.

Guard enablePurgeProtection behind enableKeyVaultSoftDelete (or add an assert) so invalid parameter combinations can’t be passed.

    enableRbacAuthorization: true
    enableSoftDelete: enableKeyVaultSoftDelete
    enablePurgeProtection: enableKeyVaultPurgeProtection
    softDeleteRetentionInDays: enableKeyVaultSoftDelete ? keyVaultSoftDeleteRetentionInDays : null

test/util/framework/per_test_framework.go:687

  • Key Vault purge-on-teardown was removed here, but NewResourceGroup still documents a "best-effort teardown purge" as a second layer of defense against Key Vault soft-delete name collisions (per_test_framework.go:432-445). This makes the file’s documentation inconsistent with behavior, and it’s unclear whether dropping the purge is intentional for all E2E runs.

Either reintroduce the best-effort purge (if still desired) or update the NewResourceGroup comment to remove references to a purge step and clarify the collision-mitigation strategy.

	ginkgo.GinkgoLogr.Info("deleting resource group", "resourceGroup", resourceGroupName)
	if err := DeleteResourceGroup(ctx, resourceClientFactory.NewResourceGroupsClient(), networkClientFactory, resourceGroupName, false, timeout); err != nil {
		return fmt.Errorf("failed to cleanup resource group: %w", err)
	}

	// we want non-conformant clusters to be visible at the end, without impeding our ability to clean up the resource group
	return nonConformantErr

Copilot AI review requested due to automatic review settings August 5, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

test/e2e-setup/bicep/modules/customer-infra.bicep:113

  • enableKeyVaultPurgeProtection is documented as requiring soft delete, but the resource sets enablePurgeProtection based only on enableKeyVaultPurgeProtection. If a caller enables purge protection while leaving soft delete disabled, the deployment may be rejected or behave unexpectedly. Gate purge protection on enableKeyVaultSoftDelete to enforce the documented invariant.
  properties: {
    enableRbacAuthorization: true
    enableSoftDelete: enableKeyVaultSoftDelete ? true : null
    enablePurgeProtection: enableKeyVaultPurgeProtection ? true : null
    softDeleteRetentionInDays: enableKeyVaultSoftDelete ? keyVaultSoftDeleteRetentionInDays : null

Comment thread test/e2e/nodepool_osdisk_encryption.go Outdated
Copilot AI review requested due to automatic review settings August 5, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Suppressed comments (2)

test/util/verifiers/osdisk_encryption.go:45

  • VirtualMachinesClient.NewListPager only lists Microsoft.Compute/virtualMachines. HCP worker nodes are VMSS instances (.../virtualMachineScaleSets/<vmss>/virtualMachines/<id>), so this verifier will likely find zero VMs and fail even when the nodepool exists. Consider switching the discovery to VMSS resources (list VMSS in the managed RG, filter by nodepool name/tag, then list VMSS VMs and read their OS disks).
	vmClient := v.computeFactory.NewVirtualMachinesClient()
	disksClient := v.computeFactory.NewDisksClient()

	var vms []*armcompute.VirtualMachine
	pager := vmClient.NewListPager(v.managedResourceGroup, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)

test/e2e-setup/bicep/modules/customer-infra.bicep:113

  • enablePurgeProtection is documented as requiring soft delete, but the template allows enableKeyVaultPurgeProtection=true while enableKeyVaultSoftDelete=false, which can cause a deployment failure. Gate purge protection on soft delete (or add a parameter assertion).
    enableRbacAuthorization: true
    enableSoftDelete: enableKeyVaultSoftDelete ? true : null
    enablePurgeProtection: enableKeyVaultPurgeProtection ? true : null
    softDeleteRetentionInDays: enableKeyVaultSoftDelete ? keyVaultSoftDeleteRetentionInDays : null

Comment thread test/e2e-setup/bicep/modules/customer-infra.bicep
Comment thread test/e2e/nodepool_osdisk_encryption.go
Copilot AI review requested due to automatic review settings August 6, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Suppressed comments (1)

test/e2e-setup/bicep/modules/customer-infra.bicep:113

  • enablePurgeProtection can be set to true while enableSoftDelete is omitted (null) when enableKeyVaultPurgeProtection=true but enableKeyVaultSoftDelete=false. Key Vault purge protection requires soft delete; this combination can cause an ARM validation failure or unexpected behavior. Consider deriving both properties from a single "soft delete enabled" condition so purge protection always implies soft delete (and sets retention days).
    enableSoftDelete: enableKeyVaultSoftDelete ? true : null
    enablePurgeProtection: enableKeyVaultPurgeProtection ? true : null
    softDeleteRetentionInDays: enableKeyVaultSoftDelete ? keyVaultSoftDeleteRetentionInDays : null

@cadenmarchese

Copy link
Copy Markdown
Member Author

/retest-required

Copilot AI review requested due to automatic review settings August 7, 2026 13:14
@cadenmarchese
Caden Marchese (cadenmarchese) force-pushed the cadenmarchese/pass-des-to-cluster-service branch from b2de3db to 0574156 Compare August 7, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Suppressed comments (1)

test/e2e-setup/bicep/modules/customer-infra.bicep:112

  • enableKeyVaultPurgeProtection is documented as requiring soft delete, but the template can currently set enablePurgeProtection even when enableKeyVaultSoftDelete is false (since the properties are gated independently). That combination is invalid for Key Vault and would make deployments fail if a caller accidentally enables purge protection without soft delete.
    enableSoftDelete: enableKeyVaultSoftDelete ? true : null
    enablePurgeProtection: enableKeyVaultPurgeProtection ? true : null

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for updating the E2E test code, now the test code is aligned with the existing code.

I have 2 comments though:

  • one minor note about improvements in error reporting in the new verifier
  • I still see the removal of key vault cleanup in the PR, I assumed we want to preserve it

}
}
if len(errs) > 0 {
return fmt.Errorf("OS disk encryption verification failed for %d/%d VMs: %v", len(errs), len(workerVMs), errs)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of passing list of errors errs via %v, join the errors together as errors.Join(errs...) and pass it as %w, that would preserve more context about the errors.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, let me know if this works.

Comment thread test/util/framework/per_test_framework.go
allows BYOK for nodePool OS disk encryption, unblocks mHSM support
requires service managed identity to have Reader role over the
disk encryption set
use Go SDK rather than bicep templates for des e2e test
Copilot AI review requested due to automatic review settings August 11, 2026 18:30
@cadenmarchese
Caden Marchese (cadenmarchese) force-pushed the cadenmarchese/pass-des-to-cluster-service branch from 0574156 to 3412e08 Compare August 11, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

Suppressed comments (1)

test/e2e-setup/bicep/modules/customer-infra.bicep:113

  • enableKeyVaultPurgeProtection is documented as requiring soft delete, but the current expressions allow enableKeyVaultPurgeProtection=true while leaving enableSoftDelete and softDeleteRetentionInDays unset. Depending on Key Vault API behavior, that combination can fail deployment or produce an unexpected default retention configuration. Consider making soft delete implicit whenever purge protection is enabled (or add an explicit validation/assert) so the parameters can’t be set to an invalid combination.
    enableSoftDelete: enableKeyVaultSoftDelete ? true : null
    enablePurgeProtection: enableKeyVaultPurgeProtection ? true : null
    softDeleteRetentionInDays: enableKeyVaultSoftDelete ? keyVaultSoftDeleteRetentionInDays : null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants