-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws/credential: Add credential_process provider (#2217)
Adds support for the shared configuration file's `credential_process` property. This property allows the application to execute a command in order to retrieve AWS credentials for AWS service API request. In order to use this feature your application must enable the SDK's support of the shared configuration file. See, https://docs.aws.amazon.com/sdk-for-go/api/aws/session/#hdr-Sessions_from_Shared_Config for more information on enabling shared config support. Fixes #1834
- Loading branch information
Showing
16 changed files
with
1,077 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"Version": 1, | ||
"AccessKeyId": "accessKey", | ||
"SecretAccessKey": "secret", | ||
"SessionToken": "tokenDefault", | ||
"Expiration": "2000-01-01T00:00:00-00:00" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"Version": 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"Version": 1, | ||
"AccessKeyId": "accesskey" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"Version": 1, | ||
"SecretAccessKey": "secretkey" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"Version": 1, | ||
"AccessKeyId": "accessKey", | ||
"SecretAccessKey": "secret", | ||
"SessionToken": "nonDefaultToken" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[default] | ||
credential_process = cat ./testdata/expired.json | ||
|
||
[profile non_expire] | ||
credential_process = cat ./testdata/nonexpire.json | ||
|
||
[profile not_alone] | ||
aws_access_key_id = notFromCredProcAccess | ||
aws_secret_access_key = notFromCredProcSecret | ||
credential_process = cat ./testdata/verybad.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[default] | ||
credential_process = type .\testdata\expired.json | ||
|
||
[profile non_expire] | ||
credential_process = type .\testdata\nonexpire.json | ||
|
||
[profile not_alone] | ||
aws_access_key_id = notFromCredProcAccess | ||
aws_secret_access_key = notFromCredProcSecret | ||
credential_process = type .\testdata\verybad.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[default] | ||
credential_process = cat ./testdata/expired.json | ||
|
||
[non_expire] | ||
credential_process = cat ./testdata/nonexpire.json | ||
|
||
[not_alone] | ||
aws_access_key_id = notFromCredProcAccess | ||
aws_secret_access_key = notFromCredProcSecret | ||
credential_process = cat ./testdata/verybad.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[default] | ||
credential_process = type .\testdata\expired.json | ||
|
||
[non_expire] | ||
credential_process = type .\testdata\nonexpire.json | ||
|
||
[not_alone] | ||
aws_access_key_id = notFromCredProcAccess | ||
aws_secret_access_key = notFromCredProcSecret | ||
credential_process = type .\testdata\verybad.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Version":1, | ||
"AccessKeyId":"accesskey", | ||
"SecretAccessKey":"secretkey" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Version":1, | ||
"AccessKeyId":"veryBadAccessKeyID", | ||
"SecretAccessKey":"veryBadSecretAccessKey" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Version": 2 | ||
} |
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