gavinchou commented on code in PR #36829:
URL: https://github.com/apache/doris/pull/36829#discussion_r1653250551


##########
be/src/io/fs/azure_obj_storage_client.cpp:
##########
@@ -251,4 +256,21 @@ ObjectStorageResponse 
AzureObjStorageClient::delete_objects_recursively(
     }
     return {};
 }
+
+std::string AzureObjStorageClient::generate_presigned_url(const 
ObjectStoragePathOptions& opts,
+                                                          int64_t 
expiration_secs,
+                                                          const S3ClientConf& 
conf) {
+    Azure::Storage::Sas::BlobSasBuilder sas_builder;
+    sas_builder.ExpiresOn =
+            std::chrono::system_clock::now() + 
std::chrono::seconds(expiration_secs);
+    sas_builder.BlobContainerName = opts.bucket;
+    sas_builder.BlobName = opts.key;
+    sas_builder.Resource = Azure::Storage::Sas::BlobSasResource::Blob;
+    sas_builder.SetPermissions(Azure::Storage::Sas::BlobSasPermissions::Write);

Review Comment:
   We also need "Read" permission here.
   Make sure that this signature is constrained by the specific blob.
   
   And USE HTTPS only here
   ```
   sas_biulder.Protocol = SasProtocol.HttpsOnly;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to