Skip to content

add code to support kubelogin device code authentication - #10493

Merged
Ximeng Zhao (xmzhao0822) merged 2 commits into
Azure:mainfrom
xmzhao0822:xmzhao/add-convert-kubelogin
Oct 20, 2026
Merged

Ximeng Zhao (xmzhao0822) merged 2 commits into
Azure:mainfrom
xmzhao0822:xmzhao/add-convert-kubelogin

Conversation

@xmzhao0822

@xmzhao0822 Ximeng Zhao (xmzhao0822) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

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

Related command

az aimanager get-credentials
az aimanager namespace get-credentials

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 azdev 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 balanced review requested due to automatic review settings October 20, 2026 04:18

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

Conversion can alter unrelated cluster authentication and cause conflicts on repeated credential downloads.

3 open issues
What changed in this PR

Adds automatic conversion from kubelogin device-code authentication to Azure CLI authentication for AI Manager credential downloads.

Changes:

  • Detects device-code credentials and invokes kubelogin when available.
  • Integrates conversion into both get-credentials commands.
  • Updates the extension version and release notes.
File Description
src/​aimanager/​setup.py Bumps version to 2.0.1b3.
src/​aimanager/​HISTORY.rst Documents authentication conversion.
src/​aimanager/​azext_aimanager/​custom.py Invokes conversion after credential merging.
src/​aimanager/​azext_aimanager/​_helpers.py Adds executable lookup, detection, and conversion helpers.

Review effort: Balanced

Comment thread src/aimanager/azext_aimanager/custom.py Resolved
@xmzhao0822

Copy link
Copy Markdown
Contributor Author

Tested az aimanager get-credentials -g xmz-rg -n aim888 and az aimanager namespace get-credentials -g xmz-rg -m aim888 -n ns1.

image image

@xmzhao0822
Ximeng Zhao (xmzhao0822) merged commit 4745455 into Azure:main Oct 20, 2026
24 checks passed
@azclibot

Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ aimanager-2.0.1b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=186655173&view=results

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.

4 participants