Use shared key auth for custom blob resource so we don't need RBAC#3719
Merged
Conversation
Contributor
Does the PR have any schema changes?Looking good! No breaking changes found. |
42abf44 to
7a9d7f8
Compare
danielrbradley
approved these changes
Nov 20, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3719 +/- ##
==========================================
+ Coverage 58.88% 58.97% +0.08%
==========================================
Files 74 74
Lines 11738 11811 +73
==========================================
+ Hits 6912 6965 +53
- Misses 4288 4302 +14
- Partials 538 544 +6 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Contributor
|
This PR has been shipped in release v2.73.1. |
This was referenced Sep 1, 2025
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.
This PR resolves #3709. Writing a blob failed with 403 Forbidden using the new azcore backend but succeeded using the old backend.
Both backends are based on Azure authentication tokens. However, for blob operations, the old implementation used the token only to get a shared access key for the storage account, then used the key for all other operations. The new implementation attempted to use the auth token directly for blob operations like create.
Using the token directly works if the user/principal has the correct RBAC role, which is "Storage Blob Data Owner" (and possibly others). That's how our CI test suite passed: our service principal had that role assigned.
RBAC is actually the preferred way of accessing Azure storage. But not all users of this provider have the required roles configured, and we cannot regress scenarios that used to work in the v2 major version, so we need to switch to using access keys even in the new backend.
Here is a full CI test suite run for this branch.
Here's the one with autorest enabled.