-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[BUG]: AzureFileCopy task fails when using Workload Identity Federation #19207
Comments
Running into the same issue. Apparently it's the same issue for dacpacdeployment and it was fixed there: #18992 |
Running into the same issue. |
Having same issue. Reverted back from Workload Identity Federation and it worked fine |
azcopy itself does not yet support Workload identity federation, see issue in the azure-storage-azcopy repo. Once it does we will update the task as well. |
Has anyone got it working or any work around for this? |
We just switched back to the old authentication method for the time being. |
Hi, same for me. Thing is... I get that "WorkloadIdentityFederation" some kind of authentication is, but I do not know how this is setup and therefore how to revert. So "switching back to old authentication" does not apply just yet, because it was never there. What kind of authentication? With keys and such? Any specific keyword to ask google? (shared access signature?) |
Hi |
We are having same issue |
Workload Identity Federation is the recommended method to create a service connection. This task should be able to support it. |
Would love to see this updated. |
We've just been bitten by this as well. Workload identity federation is now the recommended way with prompts in the UI to upgrade so it was very much a surprise for us to see Microsoft maintained tasks still not supporting this on their newest task version. |
Yep, us too. Set up a new "Recommended" connection and our build script didn't run and copy. Back to the old connection until there is a path forward. |
I followed #2112 through to Azure/azure-storage-azcopy#2545. 2545 seems to have some good active updates -- keeping an eye on that. |
The latest update on that azcopy issue says it's not currently a priority. But Azure DevOps now only creates/renews the secrets for service principal service connections for 3 months (used to be 2 years). So Azure DevOps is pushing us to use workload identity federation to avoid frequent secret management, while azcopy (and by extension this task) don't support it. |
Policies are now being enforced which require workload identities, so the |
I was able to work around this by ditching AzureFileCopy in favor of the Azure CLI task (which properly supports workload identities) with the "az storage blob upload-batch" command:
|
@dfederm Same for us, it didn't allow me to update the service connection, so had to upgrade. Now this task is broken. I will give your fix a try, but the Create SAS Token and AzureFileCopy task now has become unusable for us |
We are getting the same issue and we use AzureFileCopy@3. As everyone else has mentioned this seems to be due to service connection supporting Workload Identity Federation but the task itself does not support it. Looking at the Support for AAD Workload Identity, they might not fix it anytime soon. |
I was able to solve it by using an AzureCLI task, maybe this will help some people:
This sets the two variables storageToken and storageUri to call the specific ARM template files I need |
v6 was released yesterday and resolves this issue for us :) |
The AzureFileCopyV6 task resolves this issue. It also uses Azure RBAC to access blob storage instead. This requires the identity of the service connection used to have the appropriate RBAC role e.g. Storage Blob Data Contributor. See Assign an Azure role for access to blob data. |
SASToken is not getting generated in this task. The options fields are missing |
#19867 |
Task name
AzureFileCopy
Task version
5
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
windows-2022
Task log
Relevant log output
##[error]Upload to container: 'redacted' in storage account: 'redacted' with blob prefix: '' failed with error: 'Unsupported authentication scheme 'WorkloadIdentityFederation' for endpoint.' For more info please refer to https://aka.ms/azurefilecopyreadme
Aditional info
The text was updated successfully, but these errors were encountered: