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

   # Which issue does this PR close?
   
   No linked issue.
   
   # Rationale for this change
   
   Downstream applications need to obtain OSS temporary credentials from their 
own STS services. Injecting a reqsign credential provider chain lets them 
return expiring AK/SK/security-token credentials without forking reqsign or 
periodically rebuilding the OpenDAL `Operator`.
   
   # What changes are included in this PR?
   
   - Add `OssBuilder::credential_provider_chain` with the same replacement 
semantics as S3 and Azblob.
   - Keep the custom chain on the builder rather than in serializable 
`OssConfig`.
   - Replace the complete default Static/Env/OIDC/ECS/AssumeRole chain only 
when a custom chain is configured; preserve the existing default path otherwise.
   - Re-export `reqsign_aliyun_oss` so downstream providers use the same 
reqsign types as the OSS service.
   - Document replacement semantics, `expires_in`, and a custom provider 
example.
   - Add unit tests for default precedence, custom signing, default endpoint 
avoidance, Debug redaction, and credential refresh across signer clones.
   
   Validation completed locally:
   
   - `cargo fmt --all -- --check`
   - `cargo test -p opendal-service-oss` (11 unit tests and 3 doctests passed)
   - `cargo clippy -p opendal-service-oss --all-targets -- -D warnings`
   - `cargo check -p opendal --no-default-features --features=services-oss`
   - `RUSTDOCFLAGS="-D warnings" cargo doc -p opendal-service-oss --no-deps`
   - A separate downstream crate using only `opendal` facade re-exports 
compiled successfully.
   
   Tests use mock HTTP transports. No real OSS or custom STS integration test 
was performed.
   
   # Are there any user-facing changes?
   
   Users can now inject a `ProvideCredentialChain<Credential>` through 
`Oss::credential_provider_chain`. A custom chain replaces all built-in 
credential providers. Reqsign continues to cache credentials and refresh them 
based on `Credential::expires_in`.
   
   Existing authentication behavior is unchanged when no custom chain is 
configured.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: pi coding agent, including pi-subagents for independent 
standards/specification review.
   - Model: Kimi; the exact model identifier and version were not exposed by 
the harness.
   - Effort: The reasoning effort setting was not exposed by the harness.
   - Role: AI implemented the API, documentation, and tests; ran local 
validation; and performed the implementation review. A human directed the work, 
reviewed the resulting implementation, and explicitly requested publication. 
Validation used mocks rather than real OSS or a real custom STS service; 
downstream STS response handling remains application-specific.
   


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