Skip to content

feat(acns): Add mTLS as transit encryption type for ACNS#9668

Open
nddq wants to merge 1 commit intoAzure:mainfrom
nddq:add-mtls-transit-encryption
Open

feat(acns): Add mTLS as transit encryption type for ACNS#9668
nddq wants to merge 1 commit intoAzure:mainfrom
nddq:add-mtls-transit-encryption

Conversation

@nddq
Copy link
Member

@nddq nddq commented Mar 10, 2026

Add 'mTLS' as a new option for --acns-transit-encryption-type in az aks create/update. Includes validation to prevent mTLS from being used with L7 advanced network policies or Istio service mesh, both for create and update scenarios.


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 March 10, 2026 17:21
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 10, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate aks create cmd aks create update parameter acns_transit_encryption_type: updated property choices from ['None', 'WireGuard'] to ['None', 'WireGuard', 'mTLS']
⚠️ 1010 - ParaPropUpdate aks update cmd aks update update parameter acns_transit_encryption_type: updated property choices from ['None', 'WireGuard'] to ['None', 'WireGuard', 'mTLS']

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 10, 2026

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

@github-actions
Copy link
Contributor

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>

@nddq nddq changed the title {AKS} Add mTLS as transit encryption type for ACNS feat(acns): Add mTLS as transit encryption type for ACNS Mar 10, 2026
@github-actions
Copy link
Contributor

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link
Contributor

Copy link
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

Adds support for mTLS as a new ACNS transit encryption type in the aks-preview extension, including CLI enum exposure and validation that prevents incompatible combinations with L7 advanced network policies and Istio service mesh during both create and update flows.

Changes:

  • Add mTLS to --acns-transit-encryption-type allowed values and help text for az aks create and az aks update.
  • Add validation blocking mTLS when L7 advanced network policies are requested or already enabled, and when Azure Service Mesh (Istio) is enabled or already present.
  • Add/extend unit tests, scenario tests, and recordings for the new mTLS option.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/aks-preview/setup.py Bumps extension version to 19.0.0b25.
src/aks-preview/HISTORY.rst Documents the new mTLS transit encryption option in release notes.
src/aks-preview/azext_aks_preview/_consts.py Adds CONST_TRANSIT_ENCRYPTION_TYPE_MTLS = "mTLS".
src/aks-preview/azext_aks_preview/_params.py Adds mTLS to enum list and updates help text for create/update arguments.
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py Adds create/update validation to block mTLS with L7 policies or Istio service mesh.
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py Adds unit tests for mTLS value and mutual exclusion cases (create + update).
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py Adds scenario tests for mTLS in create/update flows.
src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_transit_encryption_type_mtls.yaml Adds recording for the new mTLS create scenario test.

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@nddq nddq force-pushed the add-mtls-transit-encryption branch from 6b5c916 to 610dfbb Compare March 11, 2026 13:17
@nddq nddq requested a review from Copilot March 11, 2026 13:18
Copy link
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

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

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@nddq nddq force-pushed the add-mtls-transit-encryption branch from 610dfbb to aae778c Compare March 12, 2026 04:56
@nddq nddq requested a review from Copilot March 12, 2026 04:57
Copy link
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

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


You can also share your feedback on Copilot code review. Take the survey.

@nddq nddq force-pushed the add-mtls-transit-encryption branch from aae778c to 07fa159 Compare March 12, 2026 21:31
@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@nddq nddq requested a review from FumingZhang March 13, 2026 03:11
@nddq nddq force-pushed the add-mtls-transit-encryption branch from 07fa159 to def6faa Compare March 13, 2026 03:15
@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

FumingZhang
FumingZhang previously approved these changes Mar 13, 2026
Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

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

LGTM

@FumingZhang
Copy link
Member

FumingZhang commented Mar 13, 2026

Please resolve merge conflicts, @nddq

Remove explicit aks delete step from mTLS transit encryption test to
avoid 409 EtagMismatch race condition. Resource cleanup is handled by
AKSCustomResourceGroupPreparer.

Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
@nddq nddq force-pushed the add-mtls-transit-encryption branch from def6faa to e79acb5 Compare March 13, 2026 05:41
@nddq nddq requested a review from FumingZhang March 13, 2026 05:42
@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

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

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants