Home › Forums › FABRIC General Questions and Discussion › Token issue
- This topic has 3 replies, 2 voices, and was last updated 3 months ago by Komal Thareja.
-
AuthorPosts
-
August 18, 2024 at 3:46 pm #7437
Hello, I am encountering token issues recently. I tried to generate a token from the credential manager, paste the token contents into a local file, and launch the fablib manager instance with token location pointed to that token file, but it always raises the error:
File ~/.local/lib/python3.10/site-packages/fabrictestbed/util/utils.py:81, in Utils.decode_token(cm_host, token) 79 code, token_or_exception = jwt_validator.validate_jwt(token=token, verify_exp=True) 80 if code is not ValidateCode.VALID: ---> 81 raise Exception(f"Unable to validate provided token: {code}/{token_or_exception}") 82 return token_or_exception Exception: Unable to validate provided token: ValidateCode.INVALID/The token is not yet valid (iat)
Furthermore, I tried to validate the token right after generating them on the credential manager. The credential manger said the token is invalid. Is there any way to resolve this? Or please let me know if more information is needed. Thanks in advance!
- This topic was modified 3 months ago by Yu Mi. Reason: Formatting error message
- This topic was modified 3 months ago by Yu Mi.
August 18, 2024 at 4:34 pm #7440Hi Yu,
I created a token and successfully validated it using the Credential Manager, but I am unable to reproduce the issue you’re experiencing. This error can sometimes occur due to stale cookies in the browser. Could you please try opening https://cm.fabric-testbed.net/ in an incognito window, then generate and validate the token? Let me know if the error persists.
Thanks,
Komal
- This reply was modified 3 months ago by Komal Thareja.
August 18, 2024 at 4:48 pm #7442Hi Yu,
I created a token and successfully validated it using the Credential Manager, but I am unable to reproduce the issue you’re experiencing. This error can sometimes occur due to stale cookies in the browser. Could you please try opening https://cm.fabric-testbed.net/ in an incognito window, then generate and validate the token? Let me know if the error persists.
Thanks,
Komal
- This reply was modified 3 months ago by Komal Thareja.
Hi Komal,
Thank you for your suggestion.
Unfortunately, I tried an incognito window, but the token is still invalid. I also tried deleting my all-time browsing history with cookies, but I still had no luck. I’m not sure how it comes.
But still, I appreciate your reply!
August 19, 2024 at 10:50 pm #7446Just closing the loop here as the issue was resolved over a short zoom call.
The error message “The token is not yet valid (iat)” indicates that the token’s “issued at” (
iat
) timestamp is set in the future compared to the current time. This can happen if there is a clock discrepancy between the system where the token was generated and the system validating the token.Time on the server was behind current time, synching the clock with NTP server resolved the error.
Thanks,
Komal
-
AuthorPosts
- You must be logged in to reply to this topic.