You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building config for client, Builder::credentials_provider does the following things:
/// Sets the credentials provider for this servicepubfncredentials_provider(mutself,credentials_provider:implcrate::config::ProvideCredentials + 'static,) -> Self{self.set_credentials_provider(::std::option::Option::Some(crate::config::SharedCredentialsProvider::new(credentials_provider),));self}/// Sets the credentials provider for this servicepubfnset_credentials_provider(&mutself,credentials_provider:::std::option::Option<crate::config::SharedCredentialsProvider>,) -> &mutSelf{ifletSome(credentials_provider) = credentials_provider {#[cfg(feature = "sigv4a")]{self.runtime_components.push_identity_resolver(::aws_runtime::auth::sigv4a::SCHEME_ID,
credentials_provider.clone(),);}self.runtime_components.push_identity_resolver(::aws_runtime::auth::sigv4::SCHEME_ID,
credentials_provider,);}self}
credientials_provider is set by runtime_components. But after build, Config::credientials_provider does this:
/// Returns the credentials provider for this servicepubfncredentials_provider(&self) -> Option<crate::config::SharedCredentialsProvider>{self.config.load::<crate::config::SharedCredentialsProvider>().cloned()}
It loads credentials provider from its config field not runtime_components. So it is always None. And I cannot make my hard-coded credentials for minio test env work.
Expected Behavior
Builder::credentials_provider set the right field or Config::credentials_provider get from the right field.
Current Behavior
Builder::credentials_provider set runtime_components but Config::credentials_provider get from config.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When building config for client,
Builder::credentials_provider
does the following things:credientials_provider
is set byruntime_components
. But after build,Config::credientials_provider
does this:It loads credentials provider from its
config
field notruntime_components
. So it is alwaysNone
. And I cannot make my hard-coded credentials for minio test env work.Expected Behavior
Builder::credentials_provider
set the right field orConfig::credentials_provider
get from the right field.Current Behavior
Builder::credentials_provider
setruntime_components
butConfig::credentials_provider
get fromconfig
.Reproduction Steps
Set any credentials provider and get, got
None
.Possible Solution
As mentioned.
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
Linux / Mac
Logs
No response
The text was updated successfully, but these errors were encountered: