-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add support for credential_process #44
Comments
Great suggestion. I'll see what I can do about implementing this. A few things I'll have to test, just to make sure I understand how this behaves:
Shouldn't be too hard for me to try out those scenarios, but it could add a few days to the effort. |
How is the name of the profile passed to the command specified in the config option? -> I think that in each profile, the
About the MFA, it should be tested how the question is asked when the command is called from a command using |
I was thinking along those same lines. I was sort of hoping that the profile name would be passed as an environment variable via the AWS SDK (I checked a few of the SDK sources, and that's not what happens), but this seems like the next best option. |
I had the chance to mess around with this a bit, and it seems like there's a few caveats for the implementation. The change for the tool was pretty straight forward, but the config file stuff wasn't as straight forward as we would hope, nothing I would consider a show stopper, but things to be aware of. It seems you can't have the
but this will (as long as the command you run references the my-role-cp profile):
Additionally, the handling of user input is variable across the AWS SDKs, which has implications for things like MFA. In the Python/boto SDK (which is used by the awscli), the command will just pause, but the prompt for MFA is not displayed because boto isn't piping stderr through (see boto/botocore#1348). That will cause some confusion, I'm sure, but if you know to expect the entry of an MFA code, you can just input the value and it works. The golang SDK does explicitly pass through stderr, so I would expect the MFA prompt to get displayed. FYI, for my test cases, I just did a simple |
I did some tests with another script that implements |
Giving aws-runas the ability to provide the credentials as a json object compatible with the |
As documented here https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html.
It should be easy; the command should return a JSON document with the already available variables.
The text was updated successfully, but these errors were encountered: