Skip to content
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

Process Provider does not honor 'use_aws_shared_config_files' boolean similar to ini provider #2171

Closed
cuppett opened this issue Dec 14, 2020 · 3 comments · Fixed by #2172
Closed

Comments

@cuppett
Copy link
Contributor

cuppett commented Dec 14, 2020

It appears there is a conditional against the iniProvider here:

if (
!isset($config['use_aws_shared_config_files'])
|| $config['use_aws_shared_config_files'] !== false
) {
$defaultChain['sso'] = self::sso(
'profile default',
self::getHomeDir() . '/.aws/config',
$config
);
$defaultChain['ini'] = self::ini();
$defaultChain['ini_config'] = self::ini(
'profile default',
self::getHomeDir() . '/.aws/config'
);
}

And it is not honored in the same way when evaluating for processes:

$defaultChain['process_credentials'] = self::process();
$defaultChain['process_config'] = self::process(
'profile default',
self::getHomeDir() . '/.aws/config'
);

It is not clear why the ecsProvider is nestled between the two.

I'll file a PR to add the conditional to both stanzas. I can amend it if somebody feels the process method should be adjacent to the iniProvider method.

@SamRemis
Copy link
Member

Hi @cuppett,
The PR looks good to me and I can merge soon- I just want to make sure your original issue with the Process Provider has been resolved, since merging it will close this issue

@SamRemis SamRemis added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 16, 2020
@cuppett
Copy link
Contributor Author

cuppett commented Dec 16, 2020

Yes. That will resolve it. It puts all the logic which considers ~/.aws/credentials and ~/.aws/config underneath the 'use_aws_shared_config_files' boolean check.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 17, 2020
SamRemis pushed a commit that referenced this issue Dec 17, 2020
* Resolves #2171: Honor 'use_aws_shared_config_files' for the process-based CredentialProvider
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants