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

Support passing ClientConfiguration to SSOCredentialsProvider. #2860

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

teo-tsirpanis
Copy link
Contributor

Issue #, if available:

Description of changes:

This PR adds a constructor overload to SSOCredentialsProvider that allows passing a pointer to a ClientConfiguration object. This is necessary for scenarios like specifying custom CA certificates or custom retry policies.

I also slightly restructured the code to not rely on the ClientConfig to pass options like the region or the scheme, passing them instead as separate parameters.

Let me know how I should test this.

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.

Copy link
Contributor

@sbiscigl sbiscigl left a comment

Choose a reason for hiding this comment

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

Sorry once again for missing this one. Looks good besides the two comments I left, if those are addressed we can prioritize getting this in.

Copy link
Contributor

@sbiscigl sbiscigl left a comment

Choose a reason for hiding this comment

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

should be good after you fix this for the msvc build

AWS_LOGSTREAM_INFO(SSO_CREDENTIALS_PROVIDER_LOG_TAG, "Setting sso credentials provider to read config from " << m_profileToUse);
}

SSOCredentialsProvider::SSOCredentialsProvider(const Aws::String& profile, std::shared_ptr<const Client::ClientConfiguration> config) :
Copy link
Contributor

@sbiscigl sbiscigl Sep 18, 2024

Choose a reason for hiding this comment

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

MSVC CI build isnt liking Client::ClientConfiguration

C:/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/SSOCredentialsProvider.cpp(39): error C2653: 'Client': is not a class or namespace name (compiling source file C:\aws-cpp-sdk-core\ub_core.cpp)
C:/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/bearer-token-provider/SSOBearerTokenProvider.cpp(38): error C2653: 'Client': is not a class or namespace name (compiling source file C:\aws-cpp-sdk-core\ub_core.cpp)

Gotta make it Aws:Client::ClientConfiguration in both SSOCredentialsProvider and SSOBearerTokenProvider

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@sbiscigl sbiscigl merged commit e9ec9c4 into aws:main Sep 19, 2024
2 of 3 checks passed
@teo-tsirpanis teo-tsirpanis deleted the sso-clientconfig branch September 19, 2024 16:27
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