-
Notifications
You must be signed in to change notification settings - Fork 35
feat(toolkit-lib): make base credentials configurable #388
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2402c67
to
35a471f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #388 +/- ##
==========================================
- Coverage 80.03% 79.76% -0.28%
==========================================
Files 66 66
Lines 6878 6879 +1
Branches 792 784 -8
==========================================
- Hits 5505 5487 -18
- Misses 1353 1371 +18
- Partials 20 21 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
35a471f
to
bf4ca0f
Compare
Previously, the Toolkit would always use AWS CLI-compatible base credentials. This is now configurable: ```ts const toolkit = new Toolkit({ sdkConfig: { baseCredentials: BaseCredentials.custom(...), }, }); ``` ## Design The `BaseCredentials` (abstract) class is responsible for producing the following 2 bits of information: - A credential provider - A default region These will be used to initialize an `SdkProvider`, which will then proceed to use that information: - To inform the CDK app about the desired target environment - After synthesis and during lookup: - use those credentials directly; or - use those credentials to assume roles; or - use available plugins to obtain credentials
02cdf7f
to
0af7e9b
Compare
iankhou
approved these changes
Apr 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the Toolkit would always use AWS CLI-compatible base credentials. This is now configurable:
Design
The
BaseCredentials
(abstract) class is responsible for producing the following 2 bits of information:These will be used to initialize an
SdkProvider
, which will then proceed to use that information:requestHandler
(the proxy agent plus some SDK settings) used to be produced by theSdkProvider
itself, but it is now produced by theToolkit
and part of the "services" that get passed in. That way, it is both available to theAwsCliCompatible
base credentials to initialize the STS client, as well as to theSdkProvider
class that now also gets instantiated by theToolkit
.Supporting changes
SdkProvider
have been grouped intoSdkProviderServices
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license