[KMS] Implement PMK-aware validation for CMK#9289
[KMS] Implement PMK-aware validation for CMK#9289bingosummer wants to merge 1 commit intoAzure:mainfrom
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @bingosummer, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements PMK (Platform-Managed Keys) awareness in CMK (Customer-Managed Keys) validation for Azure Key Vault KMS in AKS. The changes enable different validation logic based on whether PMK infrastructure encryption is enabled.
- Added PMK-aware validation logic for Key Vault key IDs and resource IDs
- Enhanced validators to handle both versionless (PMK enabled) and versioned (PMK disabled) key ID formats
- Added comprehensive test coverage for PMK scenarios including creation and key rotation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| _validators.py | Enhanced key ID and resource ID validators with PMK-aware logic |
| test_validators.py | Added comprehensive test cases for PMK scenarios |
| test_aks_commands.py | Added integration tests for PMK-enabled cluster creation and key rotation |
| except InvalidArgumentValueError: | ||
| # Re-raise our validation errors | ||
| raise | ||
| except Exception as ex: |
There was a problem hiding this comment.
Catching generic Exception is too broad and can hide unexpected errors. Consider catching more specific exceptions like KeyError or ValueError that might be raised by parse_resource_id.
| except Exception as ex: | |
| except (KeyError, ValueError) as ex: |
|
Hi @bingosummer Release SuggestionsModule: aks-preview
Notes
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
… customer-managed-key (CMK)
39aff0d to
e703cd6
Compare
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.