Skip to content

[AKS] Remove validation of --azure-keyvault-kms-key-id when PMK is enabled#9388

Merged
yanzhudd merged 1 commit intoAzure:mainfrom
bingosummer:binxi/kms-cmk-key-id
Nov 5, 2025
Merged

[AKS] Remove validation of --azure-keyvault-kms-key-id when PMK is enabled#9388
yanzhudd merged 1 commit intoAzure:mainfrom
bingosummer:binxi/kms-cmk-key-id

Conversation

@bingosummer
Copy link
Copy Markdown
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings November 4, 2025 09:08
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Nov 4, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @bingosummer,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Nov 4, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

Hi @bingosummer

Release Suggestions

Module: aks-preview

  • Update VERSION to 19.0.0b11 in src/aks-preview/setup.py

Notes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes PMK (Platform-Managed Keys) validation logic from the Azure Key Vault KMS key ID parameter handling. Previously, the code enforced different key ID format requirements based on whether PMK was enabled (versionless key IDs for PMK, versioned key IDs otherwise). The change simplifies the implementation by removing these format validations entirely.

  • Removed PMK-based validation logic from _get_azure_keyvault_kms_key_id method
  • Updated all test cases to expect acceptance of both versioned and versionless key IDs regardless of PMK status
  • Added changelog entry documenting the removal of PMK validation

Reviewed Changes

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

File Description
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py Removed 26 lines of PMK validation logic that enforced key ID format requirements
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py Updated test expectations to reflect removal of validation - removed exception assertions and added assertions that all key ID formats are now accepted
src/aks-preview/HISTORY.rst Added changelog entry for the PMK validation removal
Comments suppressed due to low confidence (1)

src/aks-preview/azext_aks_preview/managed_cluster_decorator.py:1423

  • The docstring is outdated and references validation logic that has been removed. The sentence 'It will also validate the key ID format based on PMK (Platform Managed Key) enablement status.' should be removed since PMK validation is no longer performed.
        This function supports the option of enable_validation. When enabled, it will check if
        azure_keyvault_kms_key_id is assigned but enable_azure_keyvault_kms is not specified,
        if so, raise a RequiredArgumentMissingError. It will also validate the key ID format
        based on PMK (Platform Managed Key) enablement status.

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd merged commit 8b6c74b into Azure:main Nov 5, 2025
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants