1. Token issue

Token issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7437
    Yu Mi
    Participant

      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.
      #7440
      Komal Thareja
      Participant

        Hi 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

        #7442
        Yu Mi
        Participant

          Hi 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

          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!

          #7446
          Komal Thareja
          Participant

            Just 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

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.