#7947 A lot of misses when using FreeOTP token on batcave01
Closed: Fixed 3 months ago by praiskup. Opened 7 months ago by praiskup.

It happens to me all the time:

[praiskup@batcave01 ~][PROD]$ sudo rbac-playbook -l copr-be-dev.cloud.fedoraproject.org groups/copr-backend.yml -t fedmsg/base
Password+Token: 
Sorry, try again.
Password+Token: 
Sorry, try again.
Password+Token: 
sudo: 3 incorrect password attempts

Feels like there's some synchronization problem, dunno. Ideas how to avoid this? @msuchy confirmed that it happens to him as well.


I assume time on your phone/device is ok? Does the Sorry, Try again return immediately? Or take a few seconds?

Metadata Update from @kevin:
- Issue priority set to: Waiting on Assignee (was: Needs Review)

7 months ago

I assume time on your phone/device is ok?

about 1s different from batcave01

Does the Sorry, Try again return immediately? Or take a few seconds?

it is fun, I can not reproduce it now :-( though if you mean a few seconds like 20-30, no ... if I remember correctly, there's some small delay like a second or so.

Metadata Update from @praiskup:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

7 months ago

I'll reopen once I can provide the info you need, that is after it happens again.

I usually run the playbooks in tmux, and concurrently. I now noticed that
the problem happens when I am trying to authenticate twice within relatively
short time period. Is there some server-side limit?

It still sometimes happens even on first auth attempt. May this be caused
by other user trying to authenticate at the same time?

Metadata Update from @praiskup:
- Issue status updated to: Open (was: Closed)

3 months ago

Please try again now, this I think was related to the other fas issues we were having. If so, it should be fixed now?

Hm, looks like it works now for the first attempt. But.
- when I try to use the same token twice (two tmux tabs), it never works, is this expected?
- when I try to use the very next token for second authentication, it isn't accepted as well for the few first seconds, ...

So, it looks like there's some delay between auth attempts, right? Something like 30+ seconds?

I mean, when I authenticate successfully - I need to wait some time before trying again.

Yes, that sounds right.

You can only use a token once, then you have to wait for the next one. Tokens are every 30 seconds, so that sounds right as well on attempts.

Is there anything more we can adjust here? Or shall we close this now?

Ok, it's OK then, thank you!

Metadata Update from @praiskup:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 months ago

Login to comment on this ticket.

Metadata