Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions awscli/botocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,7 @@ def load(self):
access_key, secret_key = self._extract_creds_from_mapping(
credentials, self.ACCESS_KEY, self.SECRET_KEY
)
register_feature_id('CREDENTIALS_BOTO2_CONFIG_FILE')
return Credentials(
access_key, secret_key, method=self.METHOD
)
Expand Down
1 change: 1 addition & 0 deletions awscli/botocore/useragent.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
'CREDENTIALS_SSO': 's',
'CREDENTIALS_PROFILE_SSO_LEGACY': 't',
'CREDENTIALS_SSO_LEGACY': 'u',
'CREDENTIALS_BOTO2_CONFIG_FILE': 'x',
'CREDENTIALS_HTTP': 'z',
'CREDENTIALS_IMDS': '0',
'BEARER_SERVICE_ENV_VARS': '3',
Expand Down
28 changes: 28 additions & 0 deletions tests/functional/botocore/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,34 @@ def add_credential_response(self, stubber):
[],
'e',
),
# Test case 5: Credentials set with Boto2 config
(
{},
{},
[
patch(
"botocore.configloader.raw_config_parse",
return_value={
"Credentials": {
"aws_access_key_id": "FAKEACCESSKEY",
"aws_secret_access_key": "FAKESECRETKEY",
}
},
),
patch(
"botocore.credentials.ConfigProvider.load",
return_value=None,
),
patch(
"botocore.credentials.SharedCredentialProvider.load",
return_value=None,
),
patch(
"botocore.credentials.EnvProvider.load", return_value=None
),
],
'x',
),
# Test case 6: Credentials set via process provider
(
{},
Expand Down
Loading