Skip to content

Conversation

Copy link

Copilot AI commented Jan 27, 2026

The adal library (Azure Active Directory Authentication Library) is EOL since 2021 and triggers security findings. AKS authentication now uses exec-based providers, making this code obsolete.

Changes

  • setup.py: Removed adal from extras_require
  • kubernetes/base/config/kube_config.py: Removed Azure auth provider implementation
    • _load_azure_token()
    • _refresh_azure_token()
    • _azure_is_expired()
    • Azure case in _load_auth_provider_token()
  • kubernetes/base/config/kube_config_test.py: Removed Azure auth test coverage

Users with Azure kubeconfigs containing auth-provider: azure will need to regenerate their kubeconfig using modern exec-based authentication.

Original prompt

This section details on the original issue you should resolve

<issue_title>ADAL "extras" dependency triggers security findings</issue_title>
<issue_description>What happened (please include outputs or screenshots):
Security scanning tools such as wiz detect an EOL package in anything built with the Python Kubernetes library due to it bringing in adal library as an Extra (last updated 2021).

What you expected to happen:
Migrate to MSAL or remove the dependency entirely.

How to reproduce it (as minimally and precisely as possible):
Install the kubernetes library without removing extras, verify this package is brought along.

Anything else we need to know?:
#1983 is a previously opened issue on this topic.

Environment:

  • Kubernetes version (kubectl version): n/a
  • OS (e.g., MacOS 10.13.6): n/a
  • Python version (python --version): n/a
  • Python client version (pip list | grep kubernetes): I observed it in 33.1.0, but from pypi.org it seems to still be an issue in 34.1.0
    </issue_description>

<agent_instructions>Please remove the adal dependency and related code, it's no longer needed.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@yliaog /cc @brendandburns @brendandburns I believe this code can be removed as we have moved AKS auth to an exec based authentication provider instead of Entra tokens.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 27, 2026
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 27, 2026
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Copilot
Once this PR has been reviewed and has the lgtm label, please assign yliaog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 27, 2026
Copilot AI changed the title [WIP] Remove ADAL dependency to resolve security findings Remove EOL adal dependency and Azure auth provider Jan 27, 2026
Copilot AI requested a review from brendandburns January 27, 2026 04:07
@brendandburns brendandburns marked this pull request as ready for review January 27, 2026 04:10
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 27, 2026
@brendandburns
Copy link
Contributor

This looks good to me, we removed this from the Java client a while ago and there were no complaints.

@brendandburns
Copy link
Contributor

/lgtm

I will defer to @yliaog for final approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADAL "extras" dependency triggers security findings

3 participants