Xuanwo opened a new pull request, #9433: URL: https://github.com/apache/opendal/pull/9433
# Which issue does this PR close? Closes #9429 # Rationale for this change The default `opendal` build pulls in Reqsign’s full RustCrypto backend even for applications that only use the filesystem. S3 uses HMAC for SigV4, yet an S3-only build also pays for RSA, P-256, and AES-GCM. This change lets Cargo select the signing dependencies for the services an application compiles in. # What changes are included in this PR? With facade defaults enabled, the service features determine which Reqsign backend and algorithms Cargo includes: | Enabled services | Reqsign crypto in the downstream build | | --- | --- | | FS only | The public Reqsign API is available. OpenDAL supplies no signing backend. | | S3 or R2 only | RustCrypto supplies SigV4 HMAC without pulling in RSA, P-256, or AES-GCM. | | GCS, GCS gRPC, or Azure Storage | Native builds also include RSA for Google service accounts or Azure certificate credentials. | | S3 and GCS together | Cargo unifies the requirements, so the same provider supports both HMAC and RSA. | The Ruby binding’s `Cargo.lock` tracks the updated Rust dependency resolution. Validation covered 27 downstream normal-dependency graphs. Offline native probes exercised filesystem I/O, S3 and R2 SigV4 presigning, GCS RSA presigning, and the Azure certificate credential flow. OpenSSL verified the signature on the Azure client assertion JWT. Separate probes exercised the full provider, process-wide overrides, and the missing-provider error. Wasm validation covered dependency resolution and compilation only. A separate local graph check combined this patch with #9431 for Google Drive. The Google Drive change belongs to #9431. # Are there any user-facing changes? Built-in signers get the algorithms their services need with facade defaults. Custom signers can still call `opendal::raw::reqsign_context()`, but code that relied on an implicit full provider can now fail at runtime. With only FS enabled, the context has no provider unless the application installs one. With only S3 enabled, the default provider lacks RSA, P-256, and AES-GCM. # Breaking changes Affected packages: core Migration: - If your custom signer relies on the previous full RustCrypto backend, add `"reqsign-rustcrypto"` to the feature list on your existing `opendal` dependency in `Cargo.toml`. Direct `opendal-core` consumers can enable the same feature on that dependency. This existing feature enables all of RustCrypto’s default algorithms for the target. - To use your own backend, install a provider that implements the algorithms your signer needs by calling `opendal::reqsign_core::crypto::install_default(provider)` once at startup, before creating a signing context or building an operator. The installed provider takes precedence even when `reqsign-rustcrypto` is enabled. # AI Usage Statement - Pi, `magpie/codex/gpt-6.2-sol`, `max` effort — implemented the change and validated the dependency graphs and signing behavior. - Pi, `magpie/codex/gpt-6.2-astra`, `high` effort — researched downstream dependencies and compatibility, and drafted the PR text. - Pi, `magpie/codex/gpt-6.2-astra`, `xhigh` effort — coordinated implementation and validation. -- 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]
