-
Notifications
You must be signed in to change notification settings - Fork 564
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
deps(auth): remove dependence on deprecated and outdated @aws-sdk/*
packages.
#6474
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
548fb51
refactor: implement custom credentials provider
Hweinstock 96c7759
refactor: rename profile field to match expected
Hweinstock a4a2709
docs: add documentation link in implementation
Hweinstock 49195c3
deps: remove deprecated dependencies
Hweinstock d2f3c4f
refactor: add stronger typing
Hweinstock d7bede6
docs: remove documentation link since its already in the types
Hweinstock d7a9ca3
test: implement tests for behavior of credentials provider
Hweinstock d180291
Merge branch 'master' into auth/loadedConfigFile
Hweinstock c358a2a
refactor: avoid unnecessary type annotation
Hweinstock c5aa07f
deps: remove dependence on ini and add env
Hweinstock bf3af8f
merge: resolve package-lock conflicts
Hweinstock 20552b8
refactor: simplify conditional args
Hweinstock 21b8b31
docs: add section with links for shared credentials file
Hweinstock 4befa8c
fix: avoid importing from index.ts
Hweinstock c3ac3d8
Merge branch 'master' into auth/loadedConfigFile
Hweinstock 7a58a30
Merge branch 'master' into auth/loadedConfigFile
Hweinstock 62e241e
merge: resolve package-lock conflicts
Hweinstock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I know very little about auth but had a couple questions). It looks like you're asserting that
profile.aws_access_key_id
is not undefined. Is that for sure? Or just to satisfy the accessKeyId type? I'm wonder if it would make sense to warn if access key id/secret access key aren't defined?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that these fields are required. Authenticating from a config file can be done by directly using the access key and secret key, or using it to assume an IAM role for authentication. However, either way the access key and secret key is required in the current profile or the source profile.
To enforce this, we validate the config file here:
aws-toolkit-vscode/packages/core/src/auth/providers/sharedCredentialsProvider.ts
Lines 178 to 201 in c358a2a
makeSharedIniFileCredentialsProvider
) when we have the right conditions:aws-toolkit-vscode/packages/core/src/auth/providers/sharedCredentialsProvider.ts
Lines 300 to 350 in c358a2a
Its a little hard to understand because this code lives in two places, but I don't believes its possible this function is called without the necessary keys existing.