-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clairctl produces unauthorized URLs from private registries with s3 backend when generating a manifest #1264
Closed
hectorhuertas opened this issue
May 11, 2021
· 0 comments
· Fixed by #1266 · May be fixed by utilitywarehouse/clair#1
Closed
clairctl produces unauthorized URLs from private registries with s3 backend when generating a manifest #1264
hectorhuertas opened this issue
May 11, 2021
· 0 comments
· Fixed by #1266 · May be fixed by utilitywarehouse/clair#1
Comments
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 11, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264
This was referenced May 11, 2021
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 11, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 12, 2021
To avoid wrongly signed URLs, more info in quay#1264
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 12, 2021
To avoid wrongly signed URLs, more info in quay#1264
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 13, 2021
To avoid wrongly signed URLs, more info in quay#1264
This was referenced May 13, 2021
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 13, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 13, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hectorhuertas
added a commit
to utilitywarehouse/clair
that referenced
this issue
May 14, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hdonnay
pushed a commit
that referenced
this issue
May 14, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes #1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hdonnay
pushed a commit
to hdonnay/clair
that referenced
this issue
Jun 1, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
hdonnay
pushed a commit
to hdonnay/clair
that referenced
this issue
Jun 1, 2021
S3 signature V4 includes the http method on the signature. To create URLs that clair can use to fetch layers, clairctl needs to make GET calls instead of HEAD ones Fixes quay#1264 Signed-off-by: Hector Huertas <hectorhuertas@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Problem / Feature Request
When generating a manifest from an image in a private registry backed by s3, the URIs of the layers are wrongly signed and thus cannot be fetched from clair when generating a report.
The issue seems produced by the fact that clairctl does a HEAD request and then uses the generated URLs as valid to access the layers (https://github.com/quay/clair/blob/main/cmd/clairctl/manifest.go#L139-L154), but in the case of private s3 registries, the signed URLs generated are only valid for HEAD requests, and the GET requests done by clair later to fetch the layers result in
403 Forbidden
To confirm that this is the issue, I've built clairctl using
http.MethodGet
in https://github.com/quay/clair/blob/main/cmd/clairctl/manifest.go#L139z, and the generated URLs in this case do work later in clair, since they are signed for GET requestsExpected Outcome
clairctl manifest <repo>
's URIs can be used to fetch the layersclairctl report <repo>
ends with<repo> ok
Actual Outcome
clairctl manifest <repo>
's URIs produce (redacted):clairctl -D manifest <repo>
's URIs produce (redacted):Environment
uname -a
): 5.10.32-flatcarkubectl version
): v1.21.0The text was updated successfully, but these errors were encountered: