Yubico Forum https://forum.yubico.com/ |
|
V2 api and REPLAYED_OTP issues https://forum.yubico.com/viewtopic.php?f=3&t=701 |
Page 1 of 1 |
Author: | thobson [ Tue Aug 23, 2011 5:10 pm ] |
Post subject: | V2 api and REPLAYED_OTP issues |
Hi all I'm trying to understand the logic behind the new multi host setup for the validation api. Based on the Server 2 FAQ: Quote: Clients will query all servers in parallel and wait for answers. Servers will not respond positively until it has synchronized the new OTP counter with the other servers, and the client will wait until it has received one positive response (i.e., OTP is valid) or until it has received one negative response (i.e., OTP is replayed). My understanding is that I can fire off 5 simultaneous requests to the different servers (api, api2 etc) and pick the first nagative or positive response. However I am getting REPLAYED_OTP responses from the servers. Can someone explain why this is happening? I'm issuing requests like this: Code: https://api.yubico.com/wsapi/2.0/verify?id=123&otp=<<otp>>&nonce=563e2b2110e84aada3a07e3668e1c464 https://api2.yubico.com/wsapi/2.0/verify?id=123&otp=<<otp>>&nonce=98c10693f02a43178b3a334771b5cae4 etc Many thanks! Toby |
Author: | Simon [ Wed Sep 07, 2011 10:41 am ] |
Post subject: | Re: V2 api and REPLAYED_OTP issues |
thobson wrote: Hi all I'm trying to understand the logic behind the new multi host setup for the validation api. Based on the Server 2 FAQ: Quote: Clients will query all servers in parallel and wait for answers. Servers will not respond positively until it has synchronized the new OTP counter with the other servers, and the client will wait until it has received one positive response (i.e., OTP is valid) or until it has received one negative response (i.e., OTP is replayed). My understanding is that I can fire off 5 simultaneous requests to the different servers (api, api2 etc) and pick the first nagative or positive response. However I am getting REPLAYED_OTP responses from the servers. Can someone explain why this is happening? I'm issuing requests like this: Code: https://api.yubico.com/wsapi/2.0/verify?id=123&otp=<<otp>>&nonce=563e2b2110e84aada3a07e3668e1c464 https://api2.yubico.com/wsapi/2.0/verify?id=123&otp=<<otp>>&nonce=98c10693f02a43178b3a334771b5cae4 etc Hi Toby! That is expected, see the documentation here: https://code.google.com/p/yubikey-val-s ... ingClients https://code.google.com/p/yubikey-val-s ... rAlgorithm In brief, REPLAYED_REQUEST is an indication that the server already received the information about the request through another server. The client should ignore REPLAYED_REQUEST errors and wait for the first non-REPLAYED_REQUEST return value to be returned. If that is OK, then the OTP is OK, if that is something else or times out, then the OTP validation should fail. I hope this helps! /Simon |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |