Skip to content

Commit 0659df8

Browse files
authored
Move signature validation tests to production region (#3588)
* Disable applicationhealth ext * Change region * Disable test case 6
1 parent e29cdd2 commit 0659df8

2 files changed

Lines changed: 22 additions & 21 deletions

File tree

tests_e2e/test_suites/ext_signature_validation.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ tests:
66
- "ext_signature_validation/ext_signature_validation.py"
77
# Extension signature is sent by CRP only for CVMs, so this test suite should run exclusively on CVMs.
88
images: "cvm-endorsed"
9-
# This test needs to run in a canary region until all extensions being tested are published with signature in all prod regions.
109
# Extension signatures are currently only available in the public cloud, so we skip this test on other clouds.
11-
locations: "AzureCloud:eastus2euap"
10+
locations: "AzureCloud:westeurope"
1211
skip_on_clouds:
1312
- "AzureChinaCloud"
1413
- "AzureUSGovernment"

tests_e2e/tests/ext_signature_validation/ext_signature_validation.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,21 @@ def run(self):
251251
None
252252
)
253253

254-
# VmAccess 1.5 (signed, single-config) and ApplicationHealthLinux 2.0 (signed, no-config)
255-
# are additional extensions used to stress test signature validation by including multiple
256-
# signed extensions in a single goal state.
257-
vmaccess_id_1_5 = VmExtensionIdentifier(publisher='Microsoft.OSTCExtensions.Edp', ext_type='VMAccessForLinux', version="1.5")
258-
vm_access_signed = ExtSignatureValidation._TestCase(
259-
VirtualMachineExtensionClient(self._context.vm, vmaccess_id_1_5),
260-
settings = None,
261-
protected_settings={'username': 'testuser'}
262-
)
263-
ahl_id_2_0 = VmExtensionIdentifier(publisher='Microsoft.ManagedServices.Edp', ext_type='ApplicationHealthLinux', version="2.0")
264-
application_health_signed = ExtSignatureValidation._TestCase(
265-
VirtualMachineExtensionClient(self._context.vm, ahl_id_2_0),
266-
None
267-
)
254+
# TODO: Uncomment when ApplicationHealthLinux and VmAccess signature issues are resolved (see Test case 6)
255+
# # VmAccess 1.5 (signed, single-config) and ApplicationHealthLinux 2.0 (signed, no-config)
256+
# # are additional extensions used to stress test signature validation by including multiple
257+
# # signed extensions in a single goal state.
258+
# vmaccess_id_1_5 = VmExtensionIdentifier(publisher='Microsoft.OSTCExtensions.Edp', ext_type='VMAccessForLinux', version="1.5")
259+
# vm_access_signed = ExtSignatureValidation._TestCase(
260+
# VirtualMachineExtensionClient(self._context.vm, vmaccess_id_1_5),
261+
# settings = None,
262+
# protected_settings={'username': 'testuser'}
263+
# )
264+
# ahl_id_2_0 = VmExtensionIdentifier(publisher='Microsoft.ManagedServices.Edp', ext_type='ApplicationHealthLinux', version="2.0")
265+
# application_health_signed = ExtSignatureValidation._TestCase(
266+
# VirtualMachineExtensionClient(self._context.vm, ahl_id_2_0),
267+
# None
268+
# )
268269

269270
# Delete any existing extensions on the VM to ensure a clean test setup.
270271
# Signature validation occurs only during download, so extensions must be removed
@@ -325,11 +326,12 @@ def run(self):
325326
# TODO: Add test cases for package published with invalid signature and invalid manifest signingInfo, when
326327
# PIR allows for publication of invalid packages.
327328

328-
log.info("")
329-
log.info("*** Test case 6: should enable multiple signed extensions in single goal state")
330-
# RunCommand v2 is excluded here since it should be deployed only via VirtualMachineRunCommandClient, not ARM template.
331-
ext_to_enable = [custom_script_signed, vm_access_signed, application_health_signed]
332-
self._should_enable_multiple_signed_extensions(ext_to_enable)
329+
# TODO: VmAccess and ApplicationHealthLinux extensions are facing issues where the signature is intermittently missing in certain prod regions. Once the issue is resolved, re-enable this test case.
330+
# log.info("")
331+
# log.info("*** Test case 6: should enable multiple signed extensions in single goal state")
332+
# # RunCommand v2 is excluded here since it should be deployed only via VirtualMachineRunCommandClient, not ARM template.
333+
# ext_to_enable = [custom_script_signed, vm_access_signed, application_health_signed]
334+
# self._should_enable_multiple_signed_extensions(ext_to_enable)
333335

334336
# This set of test cases will test behavior when signature is validated AND enforced. Unsigned extensions should fail.
335337
try:

0 commit comments

Comments
 (0)