-
Notifications
You must be signed in to change notification settings - Fork 105
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
[Bug]: tlsVerify
does not work for sync
#2557
Comments
Hi there! Right, I ran 1.2.0 with your patch applied:
Not quite sure what you mean by log, is this what you're looking for? |
Sorry, meant 2.1.0 - everything else still applies. |
@Jauchi the host above has an invalid certificate - the issuer is unknown and hence unsafe. Is this really what you want? |
Hi there! According to my understanding, the helm_values.txt should be set correctly, that's why I'm assuming it's a bug with zot. |
#2558 |
No, I don't think it does, doesn't seem to have any effect. Maybe I messed something up. Could you check whether or not you get an error with an invalid SSL certificate? https://untrusted-root.badssl.com/ as URL should work when skipping CA checks (but will fail because it's not a registry) |
I think the problem is. the http.client config for sync sets tls to disable, if tlsVerify is set to false. zot/pkg/extensions/sync/httpclient/client.go Lines 118 to 123 in f735680
|
@mariusbertram is right, I noticed the same thing. Lines 87 to 102 in f735680
I have proposed a fix in #2747, which will determine whether TLS should be enabled based on whether the upstream registry is a HTTPS URL. |
The option with the custom ca doesn Lines 11 to 33 in 51e779f
A better aproach would be to set a path to a I will try my best on an PR but go is not my best "friend" |
Should be fixed with #2628 |
Hi there! Thanks for fixing, have a great week! |
zot version
v2.1.0 (docker/helm)
Describe the bug
Hello!
It seems like the sync plugin does not respect the
tlsVerify
setting.To reproduce
docker pull
from the zot registry (goes to thep1nglink
registry){"level":"error","error":"Get \"https://registry.p1ng.link/v2/\": tls: failed to verify certificate: x509: certificate signed by unknown authority","url":"https://registry.p1ng.link/v2/","component":"sync","errorType":"*url.Error","goroutine":1,"caller":"zotregistry.dev/zot/pkg/extensions/sync/httpclient/client.go:272","time":"2024-07-21T14:47:22.930557924Z","message":"failed to make request"}
Expected behavior
Pull should succeed.
Screenshots
No response
Additional context
I also haven't been able to import the certificate into the container, any help in that direction would also be greatly appreciated (what file goes where)?
The text was updated successfully, but these errors were encountered: