fix: azure blob writes fail with permission mismatch when the SAS lacks the tag permission - #5
Open
locle2302 wants to merge 1 commit into
Open
fix: azure blob writes fail with permission mismatch when the SAS lacks the tag permission#5locle2302 wants to merge 1 commit into
locle2302 wants to merge 1 commit into
Conversation
…ks the tag permission
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.
What does this PR do?
Passes
nilinstead of an emptyazblob.BlobTagsMap{}to the azblob SDK inPutBlob,CommitBlockList, andStartCopyFromURL, so blob write requests no longer carry an emptyx-ms-tagsheader.Why is this PR needed?
The SDK's
SerializeBlobTagsHeaderonly omits thex-ms-tagsheader when the tags map isnil; an empty map serializes to an empty header. Azure treats any request carryingx-ms-tagsas an attempt to set blob tags, which requires thetpermission on the SAS. The platform issues user-delegation SAS tokens withsp=racwdl, so every write through a goofys mount fails with 403AuthorizationPermissionMismatch, surfacing asPermission deniedon file close. Reads and lists are unaffected.Steps to Reproduce
sp=racwdl(not).cp somefile /bucket/— fails withfailed to close: Permission denied; goofys logs showPutBlobrejected withAuthorizationPermissionMismatch.x-ms-tagsheader to a PUT that otherwise succeeds; with this fix, writes through the mount succeed.