Xuanwo opened a new issue, #8875:
URL: https://github.com/apache/opendal/issues/8875
## Problems
Auditing Azure Storage credential and presigning logic across `azblob`,
`azdls`, and `azfile` found concrete bugs in `azblob` presigning and
configuration drift across the three services:
### 1. `azblob` presign bugs
- **Hardcoded 3600s expiration ignoring `args.expire()`**:
- `AzblobBackend::presign` (`core/services/azblob/src/backend.rs:662-691`)
drops `args.expire()` and calls `self.core.sign_query(ctx, req)`.
- `AzblobCore::sign_query` (`core/services/azblob/src/core.rs:108-122`)
hardcodes `Some(Duration::from_secs(3600))`.
- **Capability mismatch blocks SharedKey Service SAS presigning**:
- `AzblobBuilder::build` (`core/services/azblob/src/backend.rs:426-430`)
already configures
`RequestSigner::new().with_service_sas_permissions("racwd")`, which enables
`reqsign-azure-storage` to generate Service SAS presigned URLs from SharedKey
credentials.
- However, `capability.presign` / `presign_stat` / `presign_read` /
`presign_write` (`core/services/azblob/src/backend.rs:470-473`) are gated
solely on `self.config.sas_token.is_some()`, rejecting SharedKey presign calls
as `Unsupported`.
- (For Entra ID Bearer Token presigning via
`RequestSigner::with_user_delegation_presign`, see #8104.)
### 2. Credential config parity across `azblob` / `azdls` / `azfile`
- `azure-common::AzureStorageConfig` already defines `client_id`,
`client_secret`, `tenant_id`, and `authority_host`, and `azdls` wires
`ClientSecretCredentialProvider`, whereas `azblob` (see #5126) and `azfile` do
not expose or wire these fields.
- `azfile` lacks `credential_provider_chain` and `skip_signature`, and
unconditionally requires `account_name` during `build()`
(`core/services/azfile/src/backend.rs:180-198`) even when authenticating solely
with `sas_token` or the default credential chain.
## Related issues & in-flight PRs
- #5126 (Entra ID authentication for `azblob`)
- #8104 (`presign_read` with service principal credentials on `azdls` and
`azblob`)
- #8438 (in-flight PR authorizing `azblob` copy source with configured SAS
token—coordinate edits to `azblob`)
---
*Drafted with AI assistance (Gemini 4 Neon) and verified against
`core/services/{azure-common,azblob,azdls,azfile}` and `reqsign-azure-storage`
`v0.20.9`.*
--
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]