containerd: Auth flow should not require scope in auth header
Description
containerd currently requires that a scope be returned in WWW-Authenticate
header, it is unclear to me why this is required, especially as docker authenticates correctly without it.
This is returned by the registry in the Unauthorized response:
Bearer realm="http://rt.local:80/artifactory/api/docker/dummy-docker-local/v2/token",service="rt.local:80"
When the check for zero length scope https://github.com/containerd/containerd/blob/c6da899e2fd5ec5f0863d4be5ff683ee785d155c/remotes/docker/authorizer.go#L199 is disabled we see a properly generated request URI including the added pull scope:
/artifactory/api/docker/dummy-docker-local/v2/token?scope=&scope=repository%3Adummy-docker-local%2Fbusybox%3Apull&service=rt.local%3A80
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 19 (6 by maintainers)
k3s is also affected, since it’s using
containerd
@btashton is my problem with Artifactory the same as yours?
Today I’ve tried Containerd 1.3.0-rc2 and I’m getting this message:
no scope specified for token auth challenge
Artifactory works together with earlier Containerd 1.2.8.
New debug log:
Old debug log:
https://www.jfrog.com/jira/browse/RTFACT-20170
Got in touch with JFrog, they say they will look into it.