Unauthenticated desc = unable to parse jwt token:Token is expired

Moved from GitHub ratel/128

Posted by danielmai:

Ratel cannot run any operations that require authentication after the ACL access TTL expires.

Steps to reproduce:

  1. Run a Dgraph cluster with a short access TTL:

    dgraph alpha ...  --hmac_secret_file ./hmacsecret.txt --acl_access_ttl 3s
    
  2. Log in as groot in Ratel.

  3. Take a breather for 3 seconds to let the TTL expire.

  4. Try to add a user, which results in this error:

image

The dev tools network inspector shows the reason for the error for the /mutate request:

{"errors":[{"message":"rpc error: code = Unauthenticated desc = unable to parse jwt token:Token is expired","extensions":{"code":"ErrorInvalidRequest"}}],"data":null}

The refresh token should be used to re-authenticate the client after the TTL has expired.

danielmai commented :

Another way to reproduce this:

  1. Log in
  2. Periodically click on Refresh Schema in the Schema tab the TTL expires.