Xuanwo opened a new pull request, #8902: URL: https://github.com/apache/opendal/pull/8902
# Which issue does this PR close? Closes #8873. # Rationale for this change `core/services/oss/src/backend.rs` overlaid `role_arn`, `oidc_provider_arn`, `oidc_token_file`, and bare-host `sts_endpoint` values into a `StaticEnv` snapshot of the whole process environment, because `AssumeRoleWithOidcCredentialProvider` was assumed to lack typed builder APIs. `reqsign-aliyun-oss` exposes all of them, so the snapshot is unnecessary. Its `DefaultCredentialProvider` also covers the OSS profile file, the Alibaba Cloud shared credentials and CLI config files, and `ALIBABA_CLOUD_CREDENTIALS_URI`, which OSS never loaded. # What changes are included in this PR? - Configure OIDC through `.with_role_arn()`, `.with_oidc_provider_arn()`, `.with_oidc_token_file()`, `.with_sts_endpoint()`, and `.with_role_session_name()`. The `StaticEnv` snapshot is gone and the signer context uses `OsEnv`, so unset options still fall back to their `ALIBABA_CLOUD_*` environment variables. - Build the base chain with `DefaultCredentialProvider::builder()`. Explicit access keys still come first, `role_arn` still wraps the chain in `AssumeRoleCredentialProvider`, and OIDC still takes precedence over ECS metadata (#8339), which is why both providers are appended after the default chain instead of using their default slots. - Add `OssConfig::disable_config_load` and `OssBuilder::disable_config_load()` to turn the ambient sources off, for parity with the other cloud services. Python, Java, .NET, and website data are regenerated. - Re-export `reqsign_aliyun_oss` so custom `credential_provider_chain` implementations can build providers against the exact crate the service signs with. # Are there any user-facing changes? Credential resolution now also reads `~/.oss/credentials`, `~/.alibabacloud/credentials.ini`, `~/.aliyun/credentials.ini`, `~/.aliyun/config.json`, and `ALIBABA_CLOUD_CREDENTIALS_URI`, after environment credentials and before OIDC. Set `disable_config_load` to stop reading those sources. ECS instance RAM role credentials keep loading from instance metadata, and an ambient `ALIBABA_CLOUD_ROLE_ARN` still only drives OIDC rather than an AK-based AssumeRole. # Breaking changes # AI Usage Statement - Harness: pi coding agent - Model: DeepSeek - Effort: max - Role: Implemented the refactor, the unit tests, the generated binding updates, and ran the local checks. Two scope decisions a reviewer should check: `disable_config_load` is included because this change adds ambient credential sources, and it deliberately leaves ECS instance metadata enabled, matching how the other services treat instance metadata. Verification used mocked STS, file reads, and environment contexts, so the changed credential resolution has not been exercised against a real Aliyun account; the OSS behavior test suite needs credentials that are unavailable in this environment. -- 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]
