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
{{ message }}
Repository navigation
Dockerhub returns 401 for newly granted token when load balancing to clock-skewed server #22158
Request a token from dockerhub (GET https://auth.docker.io/token?scope=repository%3Alibrary%2Fmysql%3Apull&service=registry.docker.io)
Immediately use the token to make an API request
Describe the results you received:
A 401 response is sometimes returned
Describe the results you expected:
Tokens are immediately usable
Additional information you deem important (e.g. issue happens only occasionally):
The JWT tokens returned from dockerhub have a nbf (not before) set to exactly the current timestamp of the granting server
If that token is immediately used against dockerhub and is load-balanced to a server with a clock skewed in the past, the token is rejected
@LiGgit can you report this through [email protected]? Docker Hub is handled by a different team, so unfortunately there's nothing we can do in this repo.
Activity
liggitt commentedon Apr 19, 2016
Either of the following fixes would work:
nbffar enough in the past to account for clock-skew between the servers in the auth domainnbfin a presented JWT.thaJeztah commentedon Apr 19, 2016
@LiGgit can you report this through [email protected]? Docker Hub is handled by a different team, so unfortunately there's nothing we can do in this repo.
Thanks for reporting though!
liggitt commentedon Apr 19, 2016
ok, will report there
thaJeztah commentedon Apr 19, 2016
Thanks @liggitt 👍