Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 3:24 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Aug 23, 2011 5:10 pm 
Offline

Joined: Tue Aug 23, 2011 3:58 pm
Posts: 1
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


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Wed Sep 07, 2011 10:41 am 
Offline
Site Admin
Site Admin

Joined: Tue May 06, 2008 7:22 pm
Posts: 151
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group