awslabs / awsprocesscreds

Process credential providers for AWS SDKs and Tools
Apache License 2.0
132 stars 40 forks source link

--verbose parameter causes json parsing issue #25

Open tom-smith-okta opened 5 years ago

tom-smith-okta commented 5 years ago

When I use the --verbose (or -v) parameter, I can successfully authenticate and get a json object from the awsprocesscreds tool, but when this object is sent to the core cli tool I always get the following error:

Expecting value: line 1 column 1 (char 0)

I suspect that the --verbose flag is corrupting the STDOUT sent to the cli.

I am testing on a clean Ubuntu 18.04 image with Python 2.7.9. I've also tested with Python 3.6 and gotten the same result.

tom-smith-okta commented 5 years ago

the --verbose parameter works, but only when called directly from the command line. So, this works:

$ awsprocesscreds-saml -e {url} -u {user} -p {idp} -a {arn} --verbose

This does not work: ~/.aws/config

[profile joe]
credential_process = awsprocesscreds-saml -e {url} -u {user} -p {idp} -a {arn} --verbose

$ aws s3 ls --profile joe

In retrospect, this makes complete sense, but I suggest updating the docs and/or somehow ignoring the --verbose flag in the context of the cli.

JordonPhillips commented 5 years ago

Yeah the verbose bits should probably print to stderr