Repository navigation
Add Table user delegation key acquisition and SAS signing - #1443
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
XML error responses leave RequestFailedException.ErrorCode null, preventing callers from distinguishing service-specific authorization and configuration failures; XML parsing and ErrorCode test coverage are needed.
1 open issue
What changed in this PR
Adds an internal Table user delegation key helper to support migration SAS renewal using the storage provider’s Entra credential. Runtime callers and renewal wiring remain out of scope.
Changes:
- Acquires delegation keys through an independent authenticated pipeline using configured audience, transport, and retry settings.
- Signs table-scoped HTTPS SAS tokens using the 2025-07-05 format.
- Adds local-response tests for acquisition, failure handling, cancellation, key validation, and signature vectors.
| File | Description |
|---|---|
test/DurableTask.AzureStorage.Tests/TableUserDelegationKeyTests.cs |
Tests key acquisition and SAS signing without contacting Azure. |
src/DurableTask.AzureStorage/Storage/TableUserDelegationKey.cs |
Implements delegation key acquisition, validation, and Table SAS signing. |
Review effort: Balanced
halspang
reviewed
Nov 23, 2026
halspang
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Migration needs to acquire a Table user delegation key and sign short-lived SAS tokens using the same Entra credential as the storage provider. Add the internal
TableUserDelegationKeyhelper, using the configured token audience, HTTP transport, and retry options. Key acquisition uses its own authenticated pipeline so it does not depend on a still-valid workload SAS.The production helper is extracted unchanged from
stevosyan/storage-migration. It signs table-scoped HTTPS tokens using the 2025-07-05 Table SAS format. This PR adds no runtime caller or performance telemetry; SAS renewal and client wiring follow separately.Validation: 49 tests passed on each of .NET 8 and .NET Framework 4.8 (98 total). The 24 new cases cover request format and storage-clock timestamps, cloud/custom audiences, independent authentication, retries, cancellation, missing or wrong-service keys, and fixed signature vectors for table casing, account scope, and expiry. Tests use local HTTP responses without contacting Azure.