ykman otp calculate
should allow providing the challenge on standard input
#350
Labels
ykman otp calculate
should allow providing the challenge on standard input
#350
ykman otp calculate
should allow providing the challenge on standard inputSteps to reproduce
ykman otp calculate --help
Expected result
There should be an option like
-s, --stdin: Read CHALLENGE from stdin, not as a parameter
Actual results and logs
ykman otp calculate
has no such option.Other info
While waiting for the YubiKey to respond to the challenge (which can be quite a long time if
--touch
is required on the slot), the challenge can be seen in the output ofps faux
and other tools, because it is provided on the command line (e.g.ykman otp calculate 2 1a2b3c4d5e6f
). Even ifykman
is run as root, normal users can still see the challenge.My use case is semi-automatic unlocking of an encrypted hard drive. One part of the drive passphrase is stored in a file that can be accessed only by root (generated by something like
openssl rand 16 -hex > /root/.unlock-secret
), the other part is the response of the YubiKey when you send it the contents of/root/.unlock-secret
as a challenge.While the machine is waiting for me to push the YubiKey’s button, every unprivileged user on the system can see the secret only root should know.
Let me know if you’d be interested in a pull request.
This issue is somewhat related to #335; maybe all operations that currently accept a secret or challenge on the command line should get a (standardized) option to read from stdin.
The text was updated successfully, but these errors were encountered: