-
Notifications
You must be signed in to change notification settings - Fork 6
Support for Azure workload identity in AKS and Arc clusters #141
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?
Support for Azure workload identity in AKS and Arc clusters #141
Conversation
…ude msal modules for azure
|
This is awesome, @agreaves-ms! Thank you so much for looking into this. The team will be going through this change and thinking through what else we might need to change. Some high level thoughts is we probably need to give you more "types" of Credentials (e.g. WorkloadIdentityCredential, DataAccessCredential, ConnectionStringCredential, etc). Another thing we will look at as a team is changes necessary to our service and |
This is a great idea, I wanted to try and make a PR that was small and focused without refactoring to much of your codebase. Mainly to get the ideas through. Having a new credential type would be the most ideal, I'm needing to also alter the client_config.py to support DataSet upload and also DataSet download from both the osmo cli (if I'm a user running locally with I'll update this PR with that change as well as a separate commit and then point you at it. I was trying to think through a more agnostic naming scheme for this since Workload Identity is really an Azure and GCP term whereas AWS uses something like IRSA. I was thinking of going with Also, feel free to not take this PR, and instead implement the logic however way makes the most sense for your teams architecture that you've planned out. Thank you again for looking into this! |
… and add unit tests
|
@fernandol-nvidia I've pushed an extra commit to further address workload identity support for input and output datasets, both on upload from the osmo-cli and then running in the workflow. Please take a look at that as well when considering implementation. I've now fully tested this in my own environment and I'm able to use my authentication with Feel free to use this work however your team needs. I'm happy to further test any implementation that you all make available as well. |
|
Hey @agreaves-ms, thanks for the update and apologies for the delay. I spent the past couple of days doing a refactor of how OSMO data operations work w.r.t to different credential strategies. I have a pending PR at #159. The tl;dr is that we are differentiating I believe this would give you the necessary abstractions/interface to add workload identity support for Azure. More specifically: Defining the behavior at OSMO/src/lib/data/storage/backends/azure.py Lines 274 to 287 in 682dbf3
And overriding this method on how to decide if workload identity should be available for a particular backend: OSMO/src/lib/data/storage/backends/common.py Lines 279 to 297 in 682dbf3
Hopefully, this frees you from having to update so many unrelated files just to get Azure workload identity working :) Please feel free to add any feedback/suggestions that would be helpful for you. I will keep you updated as things progress and can help you rebase this PR to absorb the new changes. |
Description
Adds Azure AKS Workload Identity support, allowing pods to authenticate to Azure Blob Storage without connection strings or managed secrets. Uses
DefaultAzureCredentialfor token-based auth and updates Helm charts to support workload identity configuration.Changes
Helm charts
serviceAccount.create- toggle chart-managed ServiceAccount creationserviceAccount.name- specify pre-provisioned SA nameserviceAccount.annotations- add workload identity annotations (e.g.,azure.workload.identity/client-id)extraPodLabelsto services for workload identity labels (azure.workload.identity/use: "true")imagePullSecretsoptional when using workload identityAzure storage backend
AzureBlobStorageClientsupports both connection string and token-based authDefaultAzureCredentialsupport for workload identityaccess_key_id,access_key) are now optionalCredentials
BasicDataCredentialfields are now optionalget_access_key_value()for safe credential retrievalPyInstaller
azure.identity,msal, andmsal_extensionsto Azure hooks for CLI workload identity supportTests
Usage
Checklist