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

   # Which issue does this PR close?
   
   This builds on OpenDAL's Reqsign integration in #9271 and migrates the Upyun 
service as part of apache/reqsign#685.
   
   # Rationale for this change
   
   Reqsign now provides Upyun request signing. Using it removes OpenDAL's 
second implementation of the signing algorithm and lets applications select the 
cryptographic provider used for Upyun requests.
   
   # What changes are included in this PR?
   
   The Upyun service passes the configured operator name and password to the 
static credential provider in `reqsign-upyun` 1.0.0. Buffered requests and 
streaming downloads use the same signer immediately before dispatch.
   
   An earlier offline comparison used a scripted transport on the private 
parent `746d66adaf` and candidate `f2b983638a`. It matched 26 requests across 
all 11 Upyun request constructors, including a ranged streaming download, and 
34 caller-visible outcomes. Each signature was checked against the previous 
algorithm using that request's actual `Date` header. On that candidate, a 
custom process-wide crypto provider supplied MD5 and HMAC-SHA1 in both default 
and Upyun-only builds. Wasm coverage was compile-only. Live Upyun behavior 
remains unverified.
   
   The rebased candidate `90705b9e62` on main `ccbba108a6` reproduces all five 
reviewed files byte for byte. It uses the existing `opendal-core/reqsign` 
feature. #9433 proposes `reqsign-service`. Whichever PR lands second needs to 
update the Upyun service's dependency feature on one line.
   
   # Are there any user-facing changes?
   
   - With `opendal` default features disabled and only `services-upyun` 
enabled, signing now requires a crypto provider. Without one, the first signing 
attempt returns a permanent `ConfigInvalid` before dispatch. The default 
feature set supplies RustCrypto.
   - A directly constructed `UpyunConfig` with `Some("")` for the operator 
name, password, or both still builds. Previously it sent a signed request. The 
first signing attempt now returns a permanent `ConfigInvalid` before dispatch. 
The builder setters treat empty strings as unset and still fail at construction 
if a required credential is missing.
   - In a synthetic capture, a malformed bucket name containing `?` produced 
the same request URI on both revisions. Reqsign included the query in the 
signature, whereas the previous signer signed only the path. The 26 supported 
requests had no query.
   
   # Breaking changes
   
   Affected packages: core
   
   Migration:
   
   - For an Upyun-only build with facade defaults disabled, enable 
`opendal/reqsign-rustcrypto` to restore the RustCrypto backend. To use a custom 
provider with either feature set, call 
`opendal::reqsign_core::crypto::install_default` with a provider that supports 
MD5 and HMAC-SHA1 **before constructing the `Operator`**. With facade defaults 
enabled, `reqsign_context()` binds the signer to RustCrypto at construction if 
no process-wide provider is installed.
   - Supply a nonempty operator name and password when constructing 
`UpyunConfig` directly. Use the Upyun bucket name without a query delimiter.
   
   # AI Usage Statement
   
   | Harness | Model | Effort | Role |
   | --- | --- | --- | --- |
   | Pi | `magpie/codex/gpt-6.2-sol` | `max` | Implemented, rebased, and 
validated the signer migration. |
   | Pi | `magpie/devin/swe-2-1` | Unset | Independently reviewed the change. |
   | Pi | `magpie/codex/gpt-6.2-astra` | `xhigh` | Coordinated the work and 
verified the comparison evidence. |
   | Pi | `magpie/codex/gpt-6.2-astra` | `high` | Checked both merge orders 
with #9433 and the resulting feature graphs. Drafted the PR title, description, 
and migration notes. |
   


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