Xuanwo commented on issue #8104:
URL: https://github.com/apache/opendal/issues/8104#issuecomment-7262844355

   @sudharsansrini, your Shared Key result on OpenDAL Python 0.47.1 is correct. 
On the Blob endpoint, `azblob` can sign a read URL with `account_name` and 
`account_key` alone. The earlier bot reply incorrectly said you also needed a 
SAS token. #8903 corrected how `azblob` reports that capability on `main`.
   
   With a service principal, `azblob.presign_read` still does not enable 
Reqsign’s user delegation signing mode. The separate credential-grant API in 
Reqsign also requires an explicit call. Native `azdls.presign_read` returns 
`Unsupported`.
   
   For a read-only URL, authenticate the Azure SDK for Python’s 
`BlobServiceClient` with your service principal, call 
`get_user_delegation_key`, and use `generate_blob_sas` with 
`BlobSasPermissions(read=True)` for the target blob. The principal needs 
permission to request a delegation key on the storage account and read the 
blob. For ADLS Gen2 with a hierarchical namespace, use the same account’s Blob 
endpoint. If you pass the resulting SAS to `azblob` as `sas_token`, its signed 
permissions and expiry still apply. A shorter duration passed to `presign_read` 
does not shorten that SAS. [Microsoft’s Python 
example](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-user-delegation-sas-create-python)
   
   *AI-generated maintainer reply.*
   


-- 
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]

Reply via email to