question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MFA does not function with STDIN password tools.

See original GitHub issue

running lpass show --password Google returns just the password as a string of characters. running aws-google-auth --no-cache allows me to type in my password and then MFA token running lpass show --password Google | aws-google-auth --no-cache results in the errors below.

Running the command with the --save-failure-html option does not generate HTML pages that I have been able to locate.

lpass show --password Google | aws-google-auth --no-cache
Google Password:
ERROR:root:EOF when reading a line
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/aws_google_auth/__init__.py", line 72, in cli
    process_auth(args, config)
  File "/usr/local/lib/python2.7/site-packages/aws_google_auth/__init__.py", line 212, in process_auth
    google_client.do_login()
  File "/usr/local/lib/python2.7/site-packages/aws_google_auth/google.py", line 250, in do_login
    sess = self.handle_totp(sess)
  File "/usr/local/lib/python2.7/site-packages/aws_google_auth/google.py", line 598, in handle_totp
    mfa_token = input("MFA token: ") or None
EOFError: EOF when reading a line
MFA token: ⏎

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
davidrjonascommented, Jun 17, 2019

The solution I use (replace the 0’s with the ID of your lastpass entry),

~/bin/start-aws

#!/usr/bin/expect -f

set pw [exec lpass show --password 000000000]

spawn aws-google-auth --save-failure-html
expect "Google Password:"
send "$pw\r"
expect "MFA token:"
interact
0reactions
chrisjaimon2012commented, Oct 19, 2020

the only MFA option i have configured is U2F, so is there any provision for me to default to a particular MFA method?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - MFA does not function with STDIN password tools. -
running lpass show --password Google returns just the password as a string of characters. running aws-google-auth --no-cache allows me to type in my ......
Read more >
Common problems with two-step verification for a work or ...
Two-step verification is more secure than just a password, because two-step ... wait until you can try again, or use a different MFA...
Read more >
Read password from stdin [duplicate] - python - Stack Overflow
Scenario: An interactive CLI Python program, that is in need for a password. That means also, there's no GUI solution possible.
Read more >
Vault Commands (CLI) - HashiCorp Developer
Note that when using the environment variable, only one credential can be supplied. If a MFA method expects multiple credential values, or if...
Read more >
windows - How to access a password-protected ssh server using ...
Now you have a session you can run anything you do in a shell ... Pseudo-terminal will not be allocated because stdin is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found