Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Add SharedKeyLite auth support to blob service

Open giggio opened this issue 3 years ago • 4 comments

My use case is the same as previous users, I'm using a JClouds app, which still uses SharedKeyLite. More specifically, https://github.com/gaul/s3proxy. The idea is to use the S3 api to save blobs to Azure Storage. I took the work from #402 and updated it to the latest changes. I haven't found test cases, but I have manually tested it with Azure Storage Explorer and and a s3proxy. It was not working on s3proxy, and now it is.

Superseedes #402. Closes #378.

giggio avatar Nov 16 '22 06:11 giggio

The pipeline is failing for reasons not related to this PR. All recent PRs are failing with the same problem. I sent another PR (#1755) to fix it.

giggio avatar Nov 17 '22 02:11 giggio

Thanks for contribution! Can you help add BlobSharedKeyLiteAuthenticator.ts for SharedKeyLite logic instead of modifying BlobSharedKeyAuthenticator.

BTW, we need coverage and test cases for the new SharedKeyLite.

Sure! Can you point me to similar tests, so I can move forward?

giggio avatar Nov 24 '22 18:11 giggio

@giggio

You can reference this test case, it use a pipeline policy to set header "Origin" on the request just before it send to server. You can also write your own pipeline policy to set the header "Authorization" to sharedkeylite and its signature, just before the request is sent to server. https://github.com/Azure/Azurite/blob/73ed83c2dd07a4fc97f21b9d50450bef8b5c26b0/tests/blob/blobCorsRequest.test.ts#L594

blueww avatar Nov 25 '22 05:11 blueww

@giggio, @shivangag

The PR has pending for a long time. Would you please help to add test case for the change and fix the conflict? Then we can continue the review process of this PR.

blueww avatar Oct 19 '23 05:10 blueww

Any news on this PR? We recently had code fail and lost a couple of hours until we realized Azurite is not implementing SharedKeyLite auth (which is easier to implement on custom clients like small IoT devices than the full auth).

derSchtefan avatar Jul 01 '24 07:07 derSchtefan

No, the requested refactoring is too large for me to be able to take it over right now. I'm closing it.

giggio avatar Jul 01 '24 18:07 giggio