Xuanwo opened a new pull request, #8900: URL: https://github.com/apache/opendal/pull/8900
# Which issue does this PR close? Closes #8876. # Rationale for this change `TosConfig::disable_config_load` was public but unused: `TosBuilder` had no setter, and `build()` always installed the environment credential provider, so the documented switch could not disable environment credential loading. `TosCore::send` also kept the `Host` header that signing adds, unlike `sign_query` and `fetch`, so the HTTP client could not set the authority for the negotiated protocol. # What changes are included in this PR? - Add `TosBuilder::disable_config_load()`. - Build the credential chain with `DefaultCredentialProvider` and call `no_env()` when config load is disabled. `reqsign-volcengine-tos` 3.1.4 exposes only an environment slot on that builder, so this removes every config-load source. Explicit `access_key_id`/`secret_access_key`/`security_token` still take precedence when set. - Remove `Host` after signing in `TosCore::send`, matching `fetch` and `sign_query`. - Add unit tests that resolve credentials against `reqsign_core::StaticEnv` without mutating the process environment, and that record request headers through a mock `HttpTransport`. - Correct the `disable_config_load` docs, which named `TOS_ACCESS_KEY_ID`; `reqsign` reads `VOLCENGINE_ACCESS_KEY_ID`, `VOLCENGINE_SECRET_ACCESS_KEY` and `VOLCENGINE_SESSION_TOKEN`. # Are there any user-facing changes? Yes. `TosBuilder::disable_config_load()` now disables environment credential loading, and the TOS config docs name the environment variables that OpenDAL reads. Requests sent through `TosCore::send` no longer forward a `Host` header computed before signing. # Breaking changes # AI Usage Statement - Harness: T3 Code - Model: DeepSeek - Effort: max - Role: Implemented the fix, the unit tests, and local verification. Assumption: `reqsign-volcengine-tos` 3.1.4 exposes only an environment slot on `DefaultCredentialProviderBuilder`, so `no_env()` removes every config-load source while explicit static credentials keep working. No live TOS endpoint was used: the change is internal credential wiring and header cleanup, covered by tests against the built credential chain and the headers passed to the HTTP transport. -- 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]
