Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CustomSSOCredentialsProvider to retain higher-level ClientConfiguration #3103

Closed

Conversation

bhavya2109sharma
Copy link

@bhavya2109sharma bhavya2109sharma commented Sep 5, 2024

Issue #, if available:

Description of changes:

The existing SSOCredentialsProvider class was overwriting the higher-level ClientConfiguration settings, which is leading to issue while authenticating through SSO.Added a new custom provider class called CustomSSOCredentialsProvider that inherits from SSOCredentialsProvider and allows the use of a custom ClientConfiguration.

In the Reload() method of CustomSSOCredentialsProvider, a new ClientConfiguration object is created using the provided m_clientConfig member variable, and the scheme and region properties are set before passing it to the SSOCredentialsClient constructor.

This will ensure that the higher-level ClientConfiguration is retained, and the SSOCredentialsClient is created with the correct configuration.

Check all that applies:

  • Did a review by yourself.
  • [] Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • [] Checked if this PR is a breaking (APIs have been changed) change.
  • [] Checked if this PR will not introduce cross-platform inconsistent behavior.
  • [] Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@teo-tsirpanis
Copy link
Contributor

Duplicate of #2860, which avoids manipulating the ClientConfiguration.

}

private:
Aws::Client::ClientConfiguration m_clientConfig;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a ClientConfiguration in the base SSO credentials provider. Is the duplication intentional?


namespace Aws {
namespace Auth {
class AWS_CORE_API CustomSSOCredentialsProvider : public SSOCredentialsProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this class isnt needed we should just be adding a constructor the SSOCredentialsProvider itself, no need to create a indirection.

@sbiscigl
Copy link
Contributor

Duplicate of #2860, which avoids manipulating the ClientConfiguration.

This is right we should be merging @teo-tsirpanis 's PR instead. Sorry @teo-tsirpanis for not getting to your PR sooner. going to a do a review of it today, from skimming it looks fine though and accomplishes what we want to do. Lets jump over to a conversation on that.

@bhavya2109sharma closing this one out and we can work on merging the original .

@sbiscigl sbiscigl closed this Sep 10, 2024
@sbiscigl
Copy link
Contributor

@teo-tsirpanis left a few comments on your PR, if addressed we can prioritize getting it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants