Xuanwo opened a new pull request, #9407:
URL: https://github.com/apache/opendal/pull/9407

   # Which issue does this PR close?
   
   Refs #8104. This covers Azure Blob reads. The tracker's DFS endpoint remains 
outside this change.
   
   # Rationale for this change
   
   With PyPI `opendal==0.47.12`, `AsyncOperator.presign_read` resolved the 
service principal credentials from the environment but failed before the blob 
GET because Reqsign could not use a bearer token for query signing.
   
   On Azure, a development wheel from the prior revision 
`3b8e2bc178d03f44f42e50489af5c78488013789` used explicit builder parameters for 
the same principal. The same Python call returned a signed request for one 
private blob. The consumer checked the blob path, read-only blob scope (`sp=r`, 
`sr=b`), delegation signature fields, and absence of an Authorization header. 
Its HTTPS GET returned HTTP 200 and 52 bytes with the expected SHA-256. The 
principal held Storage Blob Data Contributor at account scope. The test 
requested a delegation key and read only that blob.
   
   # What changes are included in this PR?
   
   For an explicitly configured service principal, `azblob` uses Reqsign to 
obtain a user delegation key. The service reuses the access token and 
delegation key for reads on the same effective HTTP transport while they are 
valid. Each URL grants read permission for its requested blob. The capability 
catalog documents when `azblob` advertises `presign_read`.
   
   A local regression test on the proposed head 
`2b6593b59f8385e946189f23710e546b86b92273` presigned reads for two blobs and 
verified each signature against its blob path. Those reads required one token 
POST and one delegation key POST, down from two of each on the prior revision. 
A second transport on the same service made its own token and key requests and 
signed its URL with its own key.
   
   # Are there any user-facing changes?
   
   In Python, pass `tenant_id`, `client_id` and `client_secret` as keyword 
arguments to `AsyncOperator("azblob", ...)`. In Rust, set the same fields on 
the `Azblob` builder. Configure the container and a host-style HTTPS Blob 
endpoint whose first DNS label matches the account name. Leave signing enabled. 
The principal needs permission to request a user delegation key at storage 
account scope and permission to read the target blob.
   
   Call `presign_read` with a positive expiration of up to seven days. A 
response `Content-Disposition` override returns `Unsupported` because the 
delegation grant cannot sign that override.
   
   # Breaking changes
   
   # AI Usage Statement
   
   | Harness | Model | Effort | Role |
   | --- | --- | --- | --- |
   | Pi | `magpie/codex/gpt-6.2-sol` | max | Implementation and live Azure 
verification |
   | Pi | `magpie/codex/gpt-6.2-astra` | high | Design and PR drafting |
   | Pi | `magpie/kimi-code-cn/k3.1-pro` | high | Independent code review |
   | Pi | `magpie/codex/gpt-6.2-astra` | xhigh | Verification of the reported 
results |
   


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