Skip to content

[core-client] Fix issue with Storage bearer challenges#28967

Merged
mpodwysocki merged 2 commits into
Azure:mainfrom
xirzec:fixStorageBearerChallenge
Mar 19, 2024
Merged

[core-client] Fix issue with Storage bearer challenges#28967
mpodwysocki merged 2 commits into
Azure:mainfrom
xirzec:fixStorageBearerChallenge

Conversation

@xirzec
Copy link
Copy Markdown
Member

@xirzec xirzec commented Mar 18, 2024

Packages impacted by this PR

@azure/core-client

Describe the problem that is addressed by this PR

When this logic was ported from a Storage-specific policy, it referenced a field in the challenge called resource_uri instead of the actual value which is resource_id.

You can see the working value in the storage/stable branch:

I suspect the reason for the confusion is because the documentation page that describes this feature incorrectly gives an example that has resource_uri even though the parameter description lists resource_id: https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory#sample-response-to-bearer-challenge

This wasn't caught previously as Storage had not migrated to CoreV2 and exercised this codepath.

@xirzec xirzec self-assigned this Mar 18, 2024
@xirzec xirzec added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Mar 18, 2024
@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

API changes are not detected in this pull request.

@mpodwysocki mpodwysocki merged commit e56c2d2 into Azure:main Mar 19, 2024
@xirzec xirzec deleted the fixStorageBearerChallenge branch March 19, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants