Skip to content
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

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

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

xirzec
Copy link
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
Collaborator

API change check

API changes are not detected in this pull request.

@mpodwysocki mpodwysocki merged commit e56c2d2 into Azure:main Mar 19, 2024
18 checks passed
@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