Skip to content

Enable Entra authentication by default for Terraform AKS pipelines - #1386

Merged
Leonard Du (LeonardCareer) merged 23 commits into
mainfrom
leonarddu/secure-aks-entra-defaults
Nov 20, 2026
Merged

Leonard Du (LeonardCareer) merged 23 commits into
mainfrom
leonarddu/secure-aks-entra-defaults

Conversation

@LeonardCareer

@LeonardCareer Leonard Du (LeonardCareer) commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Enable Entra ID and Azure RBAC by default across AzureRM, CLI, and AzAPI AKS creation paths; always disable local accounts.
  • Centralize kubelogin installation in Azure’s update-kubeconfig.yml and use sudo for installation.
  • Run Azure CL2 as Kubernetes Jobs with ServiceAccount authentication and ConfigMap-mounted configuration, preserving report collection and propagating exit status.
  • Keep non-Azure CL2 execution unchanged.

@github-actions

Copy link
Copy Markdown

For reviewers only: reply /run-tf-integration to trigger the terraform integration pipeline before approving the PR.

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.

🟡 Changes recommended

The default Azure RBAC change leaves both private-cluster benchmark jobs’ jumpbox identity without Kubernetes API permissions, causing validation to fail with Forbidden before benchmarking starts.

1 open issue
What changed in this PR

This PR makes Microsoft Entra ID and Azure RBAC the default for Telescope’s Terraform-based AKS creation paths, while preserving explicit opt-outs. No role assignments are added; cloud validation remains pending.

Changes:

  • Enable Entra authentication by default and disable local accounts when enabled.
  • Centralize kubelogin installation and scope Azure CLI authentication conversion to fetched kubeconfig contexts.
  • Update authentication tests, input initialization, and documentation.
File Description
steps/​topology/​karpenter/​validate-resources.yml Remove redundant kubelogin installation.
steps/​topology/​hyperscale-cluster/​validate-resources.yml Remove redundant kubelogin installation.
steps/​topology/​cluster-automatic/​validate-resources.yml Remove redundant kubelogin installation.
steps/​terraform/​set-input-variables-azure.yml Initialize inputs when the value is {}.
steps/​engine/​clusterloader2/​cilium/​scale-cluster.yml Convert fetched context to Azure CLI authentication.
steps/​cloud/​azure/​update-kubeconfig.yml Install kubelogin and convert the fetched context.
steps/​cloud/​azure/​install-kubelogin.yml Separate installation from kubeconfig conversion.
modules/​terraform/​azure/​variables.tf Enable root-level AAD defaults.
modules/​terraform/​azure/​tests/​test_azapi.tftest.hcl Test authentication defaults, opt-outs, and metrics permissions.
modules/​terraform/​azure/​tests/​test_aks_cli.tftest.hcl Update expected CLI authentication flags and isolate tests.
modules/​terraform/​azure/​tests/​test_aks_aad.tftest.hcl Test enabled defaults, null inputs, and explicit opt-outs.
modules/​terraform/​azure/​main.tf Use the typed AAD input default.
modules/​terraform/​azure/​azapi/​variables.tf Default AzAPI AAD integration to enabled.
modules/​terraform/​azure/​azapi/​main.tf Disable local accounts when AAD is enabled.
modules/​terraform/​azure/​aks/​variables.tf Enable AAD by default for direct module callers.
modules/​terraform/​azure/​aks/​main.tf Disable local accounts and remove service-principal admin-group configuration.
modules/​terraform/​azure/​aks-cli/​variables.tf Enable AAD by default for direct CLI-module callers.
modules/​terraform/​azure/​aks-cli/​main.tf Update authentication flags and disable local accounts.
modules/​python/​tests/​test_pipelines.py Check installation ordering and context-scoped conversion.
docs/​best-practices.md Document authentication defaults and opt-outs.

Review effort: Balanced

Comment thread modules/terraform/azure/variables.tf Resolved
Comment thread modules/terraform/azure/aks/main.tf Resolved
xinWeiWei24
xinWeiWei24 previously approved these changes Nov 20, 2026
@LeonardCareer
Leonard Du (LeonardCareer) merged commit 13cd14d into main Nov 20, 2026
8 checks passed
@LeonardCareer
Leonard Du (LeonardCareer) deleted the leonarddu/secure-aks-entra-defaults branch November 20, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants