-
Notifications
You must be signed in to change notification settings - Fork 25
Azure Storage Data-Plane Auth Modes (AAD Default) #940
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
… ones - Removed specific versions of `github.com/Azure/azure-pipeline-go`, `github.com/Azure/azure-sdk-for-go/sdk/azcore`, and `github.com/Azure/azure-sdk-for-go/sdk/azidentity`. - Added new dependencies for `github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache` and `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3`. - Updated `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources` to version 1.2.0. - Added new dependencies for `github.com/AzureAD/microsoft-authentication-extensions-for-go/cache` and `github.com/dgryski/go-rendezvous`. - Updated `github.com/golang-jwt/jwt/v5` to version 5.2.3. - Updated `github.com/stretchr/testify` to version 1.10.0. - Removed unused dependencies such as `github.com/mattn/go-ieproxy` and `golang.org/x/sys` versions 0.33.0.
…age data-plane authentication changes; implement Track 2 SDK for blobs and queues
…ved handling of nil values
…re Storage authentication
…ges and fallback to Shared Key
…adability and consistency
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 implements explicit Azure Storage data-plane authentication modes and migrates from the legacy Track 1 SDK to the modern Track 2 SDK while maintaining existing table schemas. It introduces Azure AD (OAuth) as the default authentication method with intelligent fallback to shared key authentication when needed.
Key changes include:
- Default to Azure AD authentication for storage data-plane operations with automatic fallback to shared key
- Migration from Track 1 (
azure-storage-blob-go) to Track 2 SDK (azblob,azqueue) - Introduction of configurable
data_plane_auth_modeparameter with options: auto, aad, shared_key
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates Azure SDK dependencies to Track 2 versions and removes legacy dependencies |
| azure/table_azure_storage_queue.go | Migrates queue operations to Track 2 SDK with new authentication modes |
| azure/table_azure_storage_blob.go | Migrates blob operations to Track 2 SDK with new authentication modes |
| azure/storage_data_plane.go | New centralized authentication logic for storage data-plane operations |
| azure/connection_config.go | Adds data_plane_auth_mode configuration parameter |
| README.md | Documents new storage authentication modes and Track 2 SDK adoption |
| CHANGELOG.md | Documents enhancements and dependency changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hello @dkuwcreator, I’ve reviewed the code changes in this PR — great work! The overall implementation looks solid. Based on my understanding, I’ve put together the following data flow diagram to reflect the current design: I do have a couple of suggestions for your consideration:
Proposed Behavior
Here’s a revised data flow diagram representing the proposed approach: Please let me know if this suggestion aligns with your goals or if you'd like to explore it further. Thanks again! |
|
Hey @ParthaI, Azure recommends using Azure AD (AAD) for data plane access to storage resources (see: https://learn.microsoft.com/en-us/azure/storage/common/authorize-data-access?tabs=blobs). The same pattern applies to other services such as Key Vault. So, where possible, prefer AAD as the default for all data plane operations, not just for blobs and queues. Adopting this will affect additional tables/entities. The proposed general auth mode configuration makes sense if you don't want to use one or the other auth method:
A major part of this change is also migrating from legacy Track 1 (blob, queue, etc) to Track 2 Azure Go SDK packages. Regarding shared keys: to obtain them you already need a client capable of checking whether keys are enabled. If keys are disabled, proceed with AAD. If enabled, you must still decide whether to prefer them; I recommend AAD by default, while acknowledging some performance or simplicity advantages of shared keys in certain cases. Because of this decision flow (establish connection, inspect key availability/state, choose auth method), introducing a dedicated service/component responsible for authentication strategy selection would improve clarity and reuse. |
|
Hi @dkuwcreator — thanks for the detailed write-up and for pushing the Track 2 SDK migration; that’s a solid step forward and aligns with Azure guidance to prefer AAD for data-plane access. Concern with a connection config arg Alternative: internal, policy-driven selection (no user config)
Implementation notes:
Benefits
If the community still wants an explicit override, we can add a single, optional plugin-level switch ( Please let me know if the above message finds you well. Thanks! |


Implements explicit Azure Storage data-plane authentication modes and migrates to Track 2 SDK's while retaining existing columns.
Integration test logs
Logs
Example query results
Old plugin
Shared Keys disabled in Azure
Shared Keys enabled in Azure
New plugin
With data_plane_auth_mode = "shared_key" and Shared Keys enabled in Azure
With data_plane_auth_mode = "shared_key" and Shared Keys disabled in Azure
With data_plane_auth_mode not set and Shared Keys disabled in Azure