-
Notifications
You must be signed in to change notification settings - Fork 117
feat: azure/aks workload identity support #1451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit adds comprehensive support for Azure Managed Identity authentication for AI Gateway backends through the BackendSecurityPolicy. Changes include: - New AzureManagedIdentityTokenProvider with system and user-assigned identity support - Support for OIDC token exchange and Kubernetes secret-based authentication - Comprehensive test coverage including integration tests - Example configurations and CRD validation test data - Updated API documentation and CRD schemas - Added *.test pattern to .gitignore to exclude Go test binaries 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matt Mencel <matt@techminer.net>
Remove omitempty from ClientID field in BackendSecurityPolicyAzureCredentials to maintain consistency with other ID fields and avoid breaking existing integrations that expect the field to always be present in JSON output. This addresses the GitHub Copilot review comment in PR envoyproxy#1183. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matt Mencel <matt@techminer.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work! However, I have a suggestion that would drastically change the current code.
Right now, the impl is using the SA mounted by Envoy AI Gateway controller, and it distributes/copies that identity into the secret that is eventually mounted by extproc. That I think is a bad practice from security perspective since you have no idea to tell which pod is actually accessing the service since this makes potentially tens of envoy poids will access Azure sevice with the same identity.
So, I would suggest to do the same thing as #1394 like by using Azure SDK to get the token dynamically inside the extproc using the SA mounted by the Envoy pod, and insert the token in the header. That would mean you have to write more code in https://github.com/envoyproxy/ai-gateway/tree/main/internal/extproc/backendauth than controller package right now
I agree, I was just trying to get the origina #1183 to work. But I guess this will affect the current Azure authentication implementation as well? I can see if i can make something work with the help of some collegues and various agents. |
no, we can make it work without affecting it. |
Description
The PR is a small re-work of #1183 which I could not get to work since it was using
azidentity.NewManagedIdentityCredential(managedIDOptions)which would leverage the underlying AKS node's identity. I addedazidentity.NewWorkloadIdentityCredential(workloadIDOptions)that allows pods to run with a specific Azure identity, federated with the kubernetes cluster.Related Issues/PRs (if applicable)
Related to PR #1183 (Azure Managed Identity support by @mattmancel)
Special notes for reviewers (if applicable)
I dont know if we should change to specifically creating a service account, or if we should continue with the patch approach during install or after.