You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2026/07/24 12:19:12 UTC
[I] reqsign-aws-v4: make explicit profile override AWS_PROFILE [opendal-reqsign]
Xuanwo opened a new issue, #790:
URL: https://github.com/apache/opendal-reqsign/issues/790
## Problem
`ProfileCredentialProvider::with_profile(...)` looks like an explicit per-provider selection, but `provide_credential` currently checks `AWS_PROFILE` first and only falls back to the configured value:
```rust
let profile = ctx
.env_var(AWS_PROFILE)
.unwrap_or_else(|| self.profile.clone());
```
This differs from `SSOCredentialProvider` and `ProcessCredentialProvider`, which both give their explicitly configured profile precedence over `AWS_PROFILE`.
As a result, a caller cannot reliably select different shared-config profiles for independent credential providers or operators in the same process. An ambient `AWS_PROFILE` silently overrides every `ProfileCredentialProvider::with_profile(...)` call.
This is also the inverse of the explicit-configuration contract needed by apache/opendal#7944.
## Expected behavior
Profile selection should use this precedence:
1. A profile explicitly configured through `with_profile(...)`.
2. The ambient `AWS_PROFILE` value.
3. The `default` profile.
When the caller does not configure a profile explicitly, the behavior established by #381 and #382 should remain unchanged: `AWS_PROFILE` is still respected before falling back to `default`.
## Proposed change
- Represent the configured profile as `Option<String>` so the provider can distinguish an explicit selection from its default state.
- Resolve the profile with explicit configuration first, then `AWS_PROFILE`, then `default`.
- Add tests covering explicit-over-environment precedence, environment fallback, and the final `default` fallback.
## Compatibility
This changes behavior only when a caller explicitly calls `with_profile(...)` while also exposing a conflicting `AWS_PROFILE`. In that case, honoring the explicit value is the intended behavior.
--
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: commits-unsubscribe@opendal.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] reqsign-aws-v4: make explicit profile override AWS_PROFILE [opendal-reqsign]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #790: reqsign-aws-v4: make explicit profile override AWS_PROFILE
URL: https://github.com/apache/opendal-reqsign/issues/790
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org