Skip to content
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

Support Azure AD Workload Identity #1567

Closed
berndverst opened this issue Mar 10, 2022 · 13 comments · Fixed by #2655
Closed

Support Azure AD Workload Identity #1567

berndverst opened this issue Mar 10, 2022 · 13 comments · Fixed by #2655
Assignees
Labels
kind/enhancement New feature or request pinned Issue does not get stale
Milestone

Comments

@berndverst
Copy link
Member

This depends on Azure/azure-sdk-for-go#15615

Once the Azure SDK for Go azidentity library has this support we need to update our dependency and should get this feature for free.

I'd roughly estimate this to go into Dapr release 1.9, primarily because the azidentity team estimates this work to be done in May at the earliest.

@berndverst berndverst added the kind/enhancement New feature or request label Mar 10, 2022
@dapr-bot
Copy link
Collaborator

dapr-bot commented Apr 9, 2022

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

@dapr-bot dapr-bot added the stale label Apr 9, 2022
@berndverst berndverst added pinned Issue does not get stale and removed stale labels Apr 15, 2022
@berndverst
Copy link
Member Author

Currently the Azure Identity SDK will introduce Workload Identity support sometime in January (if this doesn't slip further). Given the Dapr 1.10 release early February it is unclear whether we can release Workload Identity support in 1.10. 1.11 is looking more likely, but we will certainly try.

FYI @ItalyPaleAle

@berndverst berndverst added this to the v1.11 milestone Nov 21, 2022
@karoldeland
Copy link

@berndverst Will it be for all components? Should we expect to have a progressive support starting in 1.11?

@ItalyPaleAle
Copy link
Contributor

@karoldeland we're waiting to see how the SDK team implements it, but my hope is that it will allow us to support all (or most) Azure components right away

@stuartleeks
Copy link
Contributor

stuartleeks commented Feb 7, 2023

Is there any update on the progress of this? Does this PR on the Go SDK add the support needed to add Workload Identity to Dapr?

It looks like azidentity v1.2.0 is the referenced version, which predates the Workload Identity PR being merged. Are there any plans to update to azidentity 1.2.1 for the 1.10 release?

Thanks!

@berndverst
Copy link
Member Author

berndverst commented Mar 9, 2023

Is there any update on the progress of this? Does this PR on the Go SDK add the support needed to add Workload Identity to Dapr?

It looks like azidentity v1.2.0 is the referenced version, which predates the Workload Identity PR being merged. Are there any plans to update to azidentity 1.2.1 for the 1.10 release?

Thanks!

I'm working on this now - but we will only releases this in a future Dapr release once AzIdentity (the Azure Go SDK we need) v1.3.0 is released - the first stable release containing this feature @stuartleeks. As of now that SDK is not released, but it should be released in time for Dapr 1.11 in May. In a few days this feature should be available in our nightly builds however (unsupported! -- For development purposes we are using v1.3.0-beta.3 now)

@berndverst
Copy link
Member Author

@berndverst Will it be for all components? Should we expect to have a progressive support starting in 1.11?

@karoldeland at this time we support all Azure AD authentication mechanisms for all Azure components. Once I complete the Workload identity implementation it will automatically be available for all Azure components.

@berndverst
Copy link
Member Author

To use this feature the following will be necessary.

Set up as outlined here:
https://learn.microsoft.com/azure/aks/workload-identity-deploy-cluster

Your pod / deployment must have the following label:
azure.workload.identity/use: "true"

That is all that needs to be done. Assuming the pod / deployment is associated with a Kubernetes service account which is workload identity configured, this should automatically inject everything required for Dapr to authenticate using workload identity.

One problem I can foresee (and I do not have the answer right now):
The assumption is that the Workload Identity Mutating Webhook will inject the required environment variables and values into all containers of the Pod (including the Dapr sidecar). However it is unclear at the moment whether the Sidecar Injector mutating webhook executes before or after the workload identity webhook. Kubernetes guarantees no ordering.

I opened an issue against the workload identity project to ensure they set the correct Kubernetes (reinvocationPolicy: IfNeeded) on their webhook.

Azure/azure-workload-identity#787

@berndverst
Copy link
Member Author

Quick update here:

I opened another bug Azure/azure-workload-identity#791

In my testing AKS Workload Identity was applied before the Dapr sidecar (or any sidecar for that matter) was injected. As a result the Dapr sidecar cannot get the information it needs to authenticate using Azure workload identity.

I spoke with the Engineering and PM team about my proposed solution in Azure/azure-workload-identity#787. The team is looking into this, but it will take some time.

With that in mind, even though the Dapr work to implement Workload Identity is complete - it is not yet usable.

Connecting to an Azure service using Workload Identity from an injected container (sidecar) is a bit uncommon after all 😄

@stuartleeks
Copy link
Contributor

Thanks for the updates @berndverst!

Would it be worth re-opening this issue as a clearer statement that workload identity isn't currently usable? (i.e. to prompt people to read down the comments rather than assuming that it's implemented and working)

@berndverst
Copy link
Member Author

berndverst commented Mar 16, 2023

@stuartleeks the attached milestone is an indication of which release has the feature. We use the issues as work items and close them when completed.

As an aside, technically you can already deploy workload identity manually via the OSS repo for workload identity and make this work. The nightly build of Dapr would support this.

That being said - I just learned that the AKS workload identity extension will become generally available in 2 weeks and will include my fix, so at that point anyone can test workload identity in AKS using the Dapr nightly builds.

Officially workload identity in Dapr is not supported until the Dapr 1.11 release however.

@stuartleeks
Copy link
Contributor

Thanks @berndverst - is there a guide to installing the Dapr nightly builds anywhere?

@manjitsinghh
Copy link

Is there any document to try out the workload identity in AKS using the Dapr.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request pinned Issue does not get stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants