You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AirbyteAPI uses clientcredentials when calling do_token_request in order to generate temporary token for requests.
Looking at your code, you assume the expiration time by adding expires_in to the current time:
However, the actuall expiration time encoded in the token (in exp) is different.
response_data['expires_in'] = 900 seconds -> expires_in = 1742088371 but exp field in the token is set to 1742087651 which makes for 720 seconds difference where the sdk will fail and token would remain invalid
Solution - you should derive expiration time from the decoded jwt, rather from the expires_in field, or adapt the expires_in to match what found in exp (set it to 180 seconds)
The text was updated successfully, but these errors were encountered:
sheinbergon
changed the title
Token Expiration exmination is broken, AirbyteAPI Fails is used after 3 minutes from creation
Token Expiration handling is broken, AirbyteAPI Fails is used after 3 minutes from creation
Mar 16, 2025
Sorry about this. The timeout was adjust on Friday, but it looks like the applications still have the old state. If you need to resolve this right now you can create a new application. Otherwise we will be fixing this ASAP.
It's fine. I could workaround it by introducing airflow retries. I'm pretty sure this issue have been with us for quite some time though (judging by my airflow logs). Please let me know when the issue has been resolved 🙏 @bgroff
airbyte-api-python-sdk/src/airbyte_api/_hooks/clientcredentials.py
Line 134 in ae27a67
AirbyteAPI uses
clientcredentials
when callingdo_token_request
in order to generate temporary token for requests.Looking at your code, you assume the expiration time by adding
expires_in
to the current time:airbyte-api-python-sdk/src/airbyte_api/_hooks/clientcredentials.py
Lines 130 to 132 in ae27a67
However, the actuall expiration time encoded in the token (in
exp
) is different.response_data['expires_in']
= 900 seconds ->expires_in
= 1742088371 butexp
field in the token is set to1742087651
which makes for 720 seconds difference where the sdk will fail and token would remain invalidSolution - you should derive expiration time from the decoded jwt, rather from the
expires_in
field, or adapt theexpires_in
to match what found inexp
(set it to 180 seconds)The text was updated successfully, but these errors were encountered: