Azure / Azure/Azurite

Bearer Challenge Support for Azurite

Open
#2,360 3 comments 0 reactions 1 assignee Claimed by @blueww View on GitHub
blob-storage featureparity
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
Blob
### Which version of the Azurite was used?
v3.29.0
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
### What's the Node.js version?
20.11.0

This is a feature request.

I'm from Azure Archive Storage, and we have a feature where we obtain a token from dSTS (which is a token issuing authority), and one crucial step before obtaining the token is to perform a bearer challenge on the blob, so that we know which authority to call.

For Azurite to be integrated into our functional tests, we need to be able to perform the bearer challenge on Azurite blobs as well.

For more context, if we want to be able to get a token so that we can perform Blob API calls on the blob, then first we need to perform a bearer challenge on the blob. Bearer challenge is basically a HTTP request made to the blob, with some special headers, in order to discover the authority which we should obtain the token from, and the scope that the token should contain.

If suppose we have a blob, say "https://account1.blob.core.windows.net/blob1", and we want to get the bearer challenge response for this blob. Suppose the authority from where we should get the DSTS Token is say "https://region1-dsts.dsts.core.windows.net", and the scope included in the token should be "https://stamp1.stamp-fe.store.preprod.core.windows.net/"

Then, following is the contract for bearer challenge:

RequestUrl: https://account1.blob.core.windows.net/blob1
Headers for request (additional ones):
Authorization-dSTS=Challenge
x-ms-version=2021-08-06

Response Status Code: 401 Unauthorized
Response Headers (additional ones):
WWW-Authenticate-dSTS="Bearer authorization_uri=https://region1-dsts.dsts.core.windows.net/[/dstsv2/7a433bfc-2514-4697-b467-e0933190487f](https://uswest-passive-dsts.dsts.core.windows.net/dstsv2/7a433bfc-2514-4697-b467-e0933190487f) resource_id=https://stamp1.stamp-fe.store.preprod.core.windows.net/"

Is there a way for this contract to be implemented in Azurite?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.