-
Notifications
You must be signed in to change notification settings - Fork 821
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
Adding credential helper #300
Conversation
Signed-off-by: Noel Georgi <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
yeaaah, really cool :)) thanks for getting on that so quickly!! |
Any chance to get this merged? |
I was hoping for a review from @lox as he's most familiar with that code |
NoSession bool | ||
} | ||
|
||
type AwsCredentialHelperData struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get a code comment explaining what this is for future generations?
cli/exec.go
Outdated
@@ -53,6 +64,10 @@ func ConfigureExecCommand(app *kingpin.Application) { | |||
Short('m'). | |||
StringVar(&input.MfaToken) | |||
|
|||
cmd.Flag("json", "AWS credential helper"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.google.com/search?hl=en&q=%22aws%20credential%20helper%22 yields nothing of use, might there be a clearer way to describe this?
This looks like super straight forward code, but would be good to help folks figure out it's there and how it works. Perhaps also a README addition @teeberg? |
Signed-off-by: Noel Georgi <[email protected]>
@lox I have updated the PR. |
Is there anything still missing here? |
I see a lot of whitespace changes in here, is that an issue with your |
I'm going to merge this and give it a cleanup in master. Thnaks @frezbo! |
Do you think we can add some more info about how to use this? like an example |
@pecigonzalo this:
|
and then instead of manually calling
|
Yeah, that is what I did, but I get access denied. I'll put my config in a
moment, as I'm using roles and MFA, it might be that it gets in the way,
altho I tried a few combos.
…On Thu, Jan 24, 2019, 5:08 PM Jonas Trappenberg ***@***.*** wrote:
and then instead of manually calling aws-vault, you only need to make
sure that you have AWS_PROFILE=product in your environment, e.g. with the
above config, call
AWS_PROFILE=product aws sts get-caller-identity
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#300 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJcvieraCbfC7eCMa1MxwWUzsPdAEQA3ks5vGdqYgaJpZM4XVXk_>
.
|
Agreed some more docs would be really helpful for folks! |
Here are my list of keys:
Here is my config:
I tried doing:
and many combinations of putting the |
@pecigonzalo I wonder if its the periods |
I can successfully use the For instance I get this error:
This is with an
The shim bash script is just this:
AWS Support says:
[1] https://docs.aws.amazon.com/cli/latest/topic/config-vars.html So it looks like in a single profile, you could use |
@StevenACoffman yeh that makes sense, I mostly use |
AWS support says:
[1] https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/ |
This appears to work:
This is with an
The
I do not think the shim that supplies MFA is necessary, but haven't tested it. |
BTW, I tried without the |
@pecigonzalo
Then test with:
|
@StevenACoffman That works for me except it's eating the prompt. For example if I hit enter when it hangs (I didn't see the prompt) then I see: "Error when retrieving credentials from custom-process: Enter token for arn:xxxxxxxxx: " |
Ah, I see there's a --prompt
|
Enable aws-okta to be a invoked as an external process via the AWS CLI "credential_process" option. Adapted from 99designs/aws-vault#300 Reference: https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes
So for this to work we need two profiles for every assume_role profile?
|
That's not how I have it working.
|
Hmmm, interesting, I can't think of a reason why creds couldn't be stored in the default, that said, I've never done that. I have |
Could this be added to the main documentation somewhere? This looks like just what I was looking for but I only found it via a colleague |
I was hung up on this so adding my notes here for anyone else.
This allows one to switch profiles by just setting the |
Yes absolutely that would be great @glenjamin, please feel free to submit a PR |
Enhances #299
Signed-off-by: Noel Georgi [email protected]