Skip to content
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

Disable terminal ECHO flag when prompting for auth token #428

Conversation

waynr
Copy link
Contributor

@waynr waynr commented Apr 18, 2019

This makes use of the ReadPassword function in golang.org/x/crypto/ssh/terminal to avoid forcing the user to expose their auth token when entering it on the command line in response to the doctl auth init prompt.

This does not yet address the issue of printing the auth token when running doctl auth init when one is already configured. I think I will file an issue to initiate discussion as to whether or not displaying the auth token is even a concern (I am accustomed to services like Github which more tightly control visibility of auth tokens).

@hilary
Copy link
Contributor

hilary commented Apr 23, 2019

@waynr Please rebase onto master and resubmit so it runs green so I can approve :)

@hilary
Copy link
Contributor

hilary commented Apr 23, 2019

w/re the question of displaying the auth token when one is configured: I think it is a concern, as making it visible presents an issue when recording a session, for example. Would welcome a PR addressing that issue as well!

@waynr waynr force-pushed the disable-terminal-echo-during-auth-token-prompt branch from 371f471 to cc09a51 Compare April 23, 2019 20:43
@waynr
Copy link
Contributor Author

waynr commented Apr 23, 2019

Please rebase onto master and resubmit so it runs green so I can approve :)

Done!

Would welcome a PR addressing that issue as well!

Excellent, thanks for letting me know! I guess I forgot to actually file an issue to discuss the other day but it sounds like it's unnecessary anyway.

Copy link
Contributor

@hilary hilary left a comment

Choose a reason for hiding this comment

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

Lovely!

@hilary
Copy link
Contributor

hilary commented Apr 25, 2019

Looking forward to the next PR :)

@hilary hilary merged commit c15aeeb into digitalocean:master Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants