...
Testing on
qecp1
with an Access Token TTL of 3 minutes showed that records beginning import failed with a 401 Unauthorized status after this time. This indicates that the import process fails when the access token expires without being refreshed.Reproduced Reproducible on
evr2
Possible solutions
Refreshing the client token by backend modules making the request (seems like the best approach).
Drawbacks: Right after the start of the import, a new AT+RT pair needs to be obtained to avoid situations where the RT is invalidated due to the user logging out or obtaining a new token.Obtaining a #SYS Token that does not expire: (Refer to comment). The ticket linked to this comment is currently in the OPEN state, so it's uncertain how well this approach works.
Drawbacks: The data import process relies on user permissions, which is why a client token is required.Handling this token at the gateway:
Drawbacks: The gateway must recognize the token used to start the data import (DI) as special and allow requests from data import with the old AT+RT pair.