-
Notifications
You must be signed in to change notification settings - Fork 594
feat(providers): Azure Federated Identity support #4728
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
Conversation
Add authentication support for Azure Federated Identity (AFI)
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.
Pull Request Overview
This PR adds Azure Federated Identity (AFI) authentication support to the Azure blob storage provider, enabling workload identity-based authentication for Azure resources.
- Adds Azure Federated Token file support as a new authentication method
- Implements workload identity credential initialization using the Azure Identity SDK
- Adds comprehensive test coverage for the new authentication method
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| repo/blob/azure/azure_options.go | Adds AzureFederatedTokenFile field to Options struct |
| repo/blob/azure/azure_storage.go | Implements Azure Federated Identity authentication logic and updates error messages |
| repo/blob/azure/azure_storage_test.go | Adds test constant and comprehensive test function for Azure Federated Identity |
| cli/storage_azure.go | Adds CLI flag support for Azure Federated Token file path |
| service, serviceErr = azblob.NewClient(fmt.Sprintf("https://%s/", storageHostname), cred, nil) | ||
| default: | ||
| return nil, errors.New("one of the storage key, SAS token, client secret or client certificate must be provided") | ||
| return nil, errors.New("one of the storage key, SAS token, client secret, client certificate, or Azure Federated Token must be provided") |
Copilot
AI
Jul 19, 2025
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.
The error message should use consistent terminology. The code uses 'AzureFederatedTokenFile' but the error message refers to 'Azure Federated Token'. Consider using 'Azure Federated Token file' for clarity.
| return nil, errors.New("one of the storage key, SAS token, client secret, client certificate, or Azure Federated Token must be provided") | |
| return nil, errors.New("one of the storage key, SAS token, client secret, client certificate, or Azure Federated Token file must be provided") |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4728 +/- ##
==========================================
+ Coverage 75.86% 76.39% +0.52%
==========================================
Files 470 530 +60
Lines 37301 40468 +3167
==========================================
+ Hits 28299 30914 +2615
- Misses 7071 7506 +435
- Partials 1931 2048 +117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
hii |
|
for linux tar file |
Add authentication support for Azure Federated Identity (AFI).
Authored by: @alisonb-veeam