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

timeout #25

Closed
roidelapluie opened this issue Oct 29, 2015 · 4 comments
Closed

timeout #25

roidelapluie opened this issue Oct 29, 2015 · 4 comments

Comments

@roidelapluie
Copy link

It would be great if this module could take 2 timeouts options:

  • timeout for the user to plug a key (with a message "Please insert your U2F dongle")
  • timeout for the user to press the button
@a-dma
Copy link
Member

a-dma commented Oct 29, 2015

The first one can be done, even though exchanging messages in PAM is kind of painful.

The touch timeout is a feature of the authenticator/token itself and can not be configured.

@roidelapluie
Copy link
Author

You mean that with my yubikey plugged in, it will timeout at a certain time already?

@a-dma
Copy link
Member

a-dma commented Oct 29, 2015

No because the protocol mandates for requests to be sent continuously to the device and each requests resets the internal timeout.

Although, it would be possible for libu2f-host to stop listening for responses after x seconds...

@a-dma a-dma closed this as completed Sep 27, 2016
@joelpurra
Copy link

joelpurra commented Oct 15, 2022

Am, too, missing presence/touch timeout functionality, in particular because neither Esc, Ctrl+D, nor Ctrl+C(#108) works to cancel a sudo prompt while the Yubikey is blinking.

Workaround: use timeout 1m sudo as a 1-minute (configurable) presence/touch timeout.

# NOTE: for testing, request/validate sudo privileges without calling a command.
timeout 1m sudo --validate

# NOTE: for faster testing, drop sudo privileges.
sudo --reset-timestamp

GNU timeout man page. Interestingly, the default signal SIGTERM doesn't completely kill sudo -- instead it "advances" authentication from pam_u2f.so to regular password input. (Only applies to the first attempt though, not if the password prompt failed too.)

Using a Yubikey 4 on Ubuntu 22.04 with libpam-u2f v1.1.0-1.1build1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants