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
2 changes: 2 additions & 0 deletions awscli/botocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,9 @@ def load(self):
if credential_process is None:
return

register_feature_id('CREDENTIALS_PROFILE_PROCESS')
creds_dict = self._retrieve_credentials_using(credential_process)
register_feature_id('CREDENTIALS_PROCESS')
if creds_dict.get('expiry_time') is not None:
return RefreshableCredentials.create_from_metadata(
creds_dict,
Expand Down
2 changes: 2 additions & 0 deletions awscli/botocore/useragent.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
'FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED': 'c',
'CREDENTIALS_CODE': 'e',
'CREDENTIALS_ENV_VARS': 'g',
'CREDENTIALS_PROFILE_PROCESS': 'v',
'CREDENTIALS_PROCESS': 'w',
'CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN': 'h',
'CREDENTIALS_STS_ASSUME_ROLE': 'i',
'CREDENTIALS_STS_ASSUME_ROLE_WEB_ID': 'k',
Expand Down
35 changes: 35 additions & 0 deletions tests/functional/botocore/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,41 @@ def add_credential_response(self, stubber):
[],
'e',
),
# Test case 6: Credentials set via process provider
(
{},
{},
[
patch(
"botocore.credentials.ProcessProvider._retrieve_credentials_using",
return_value={
'access_key': "FAKEACCESSKEY",
'secret_key': "FAKESECRETKEY",
'token': "FAKETOKEN",
},
),
patch(
"botocore.credentials.ProcessProvider._credential_process",
return_value="Mock_credential_process",
),
patch(
"botocore.credentials.ContainerProvider.load",
return_value=None,
),
patch(
"botocore.credentials.ConfigProvider.load",
return_value=None,
),
patch(
"botocore.credentials.SharedCredentialProvider.load",
return_value=None,
),
patch(
"botocore.credentials.EnvProvider.load", return_value=None
),
],
['v', 'w'],
),
],
)
def test_user_agent_feature_ids(
Expand Down
Loading