Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

fix: Produce prompts on stderr #245

Merged
merged 1 commit into from
Nov 5, 2019
Merged

fix: Produce prompts on stderr #245

merged 1 commit into from
Nov 5, 2019

Conversation

asottile
Copy link
Contributor

@asottile asottile commented Nov 4, 2019

This enables scriptability of aws-okta, this appears to already be the case for some of the prompting things.

before

(it hangs forever at the end of the output, I found it is prompting for the Role here)

$ ./aws-okta exec "$ROLE" -- echo hi > log
INFO[0001] Requesting MFA. Please complete two-factor authentication with your second device 
INFO[0001] Select a MFA from the following list         
INFO[0001] 0: DUO (web)                                 
INFO[0001] 1: GOOGLE (token:software:totp)              
0
INFO[0004] Sending Push Notification...                 
INFO[0005] Device: phone1           

after

(output is doctored a bit to obfuscate our account ids / etc.)

$ ./aws-okta exec "$ROLE" -- echo hi > log
INFO[0001] Requesting MFA. Please complete two-factor authentication with your second device 
INFO[0001] Select a MFA from the following list         
INFO[0001] 0: DUO (web)                                 
INFO[0001] 1: GOOGLE (token:software:totp)              
Select MFA method: 0

INFO[0003] Sending Push Notification...                 
INFO[0004] Device: phone1                               

Account: 1234
   0 - bless-user

<< snip >>

Select Role to Assume: 0
$

Copy link
Contributor

@nickatsegment nickatsegment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it.

@nickatsegment nickatsegment changed the title Produce prompts on stderr fix: Produce prompts on stderr Nov 5, 2019
@nickatsegment nickatsegment merged commit fc734bb into segmentio:master Nov 5, 2019
@asottile
Copy link
Contributor Author

asottile commented Nov 5, 2019

thanks!

@asottile asottile deleted the prompt_on_stderr branch November 5, 2019 00:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants