duosecurity / duo_client_python

Python library for interacting with the Duo Auth, Admin, and Accounts APIs
https://duo.com/docs/
Other
136 stars 136 forks source link

400 Bad Request response when trying to add a token for a yubikey #232

Open goulter opened 1 year ago

goulter commented 1 year ago

Description

We haven't had any issues up til about a month ago. We are on duo-client version 4.7.1. When a user attempts to add a yubikey to their account, we are getting a response, "400 Bad Request".

Expected Behavior

Yubikey successfully added to user account with the specified token.

Actual Behavior

400 Bad Request

Steps to Reproduce

  1. Get a yubikey
  2. Generate a base 32 encoded secret
  3. Add this yubikey to a user's profile
  4. Gets the error "400 Bad Request"

Workarounds

None at the moment.

AaronAtDuo commented 1 year ago

@goulter which API method are you calling to add the token? Are you calling it via one of the provided API call wrapper methods (such as add_yubikey_token), or directly calling the json_api_call method and hand-writing the call?

I'll attempt to reproduce this behavior and see what I can find.