-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Should challenge.issued_at use unix time? #38
Comments
I think I did it this way for some security reasons: bad actors can succeed in changing the UNIX time (hacking NTP, changing the time on the OS...) and make an expired challenge valid again. Now, this is probably overstretched as an attack scenario, and the issue with different nodes is real. We probably need to change that as you suggest. Which issue do you have exactly? |
I have an implementation where the authenticator response is submitted with a POST request on a controller route. The challenge is stored in a session cookie. In a multi-node deployment, I cannot guarantee that this request is made on the same node that generated the session. |
Ok so this needs to be changed. Going to fix it this WE, check out for a new version on Monday. Until then, have a good WE! |
Feel free to check and comment #39 |
Thank you for the quick release! |
I noticed that the
issued_at
value inWax.Challenge
is set using:erlang.monotonic_time/1
. Is there a reason for this choice? It seems a bit problematic to me, since:Shouldn't the value be the unix time instead? Also, the timeouts in the WebAuthn specification are defined in milliseconds. I think it would be good to use millisecond values in the library as well, to avoid confusion. So in short,
DateTime.to_unix(DateTime.utc_now(), :millisecond)
.The text was updated successfully, but these errors were encountered: