-
Notifications
You must be signed in to change notification settings - Fork 87
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
Remove the CA certificate from bundle #111
Remove the CA certificate from bundle #111
Conversation
939f492
to
7826b82
Compare
hmmm....I wasn't able to get this PR working. Let me get some notes together for what I ran into. |
7826b82
to
f6755e9
Compare
Oh, the last commit had broken the build. It should work now. Can you please re-run it? |
Hey @rgl, thanks for the update. This branch and the existing mainline branch both behave the same for me in terms of pushing to the local container registry and I get the following output from both this PR and main. vagrant@ubuntu2004:~$ docker tag hello-world 192.168.50.4/hello-world
vagrant@ubuntu2004:~$ docker push 192.168.50.4/hello-world
Using default tag: latest
The push refers to repository [192.168.50.4/hello-world]
Get "https://192.168.50.4/v2/": x509: certificate signed by unknown authority
---
vagrant@ubuntu2004:~$ curl https://192.168.50.4/v2/_catalog
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
---
vagrant@ubuntu2004:~$ curl https://192.168.50.4/v2/_catalog -k
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"registry","Class":"","Name":"catalog","Action":"*"}]}]}
--- Also, for this PR the initial ==> provisioner: Running provisioner: Trust the Tinkerbell CA (shell)...
provisioner: Running: script: Trust the Tinkerbell CA
provisioner: /tmp/vagrant-shell: line 2: docker-compose: command not found
provisioner: Updating certificates in /etc/ssl/certs...
provisioner: 0 added, 0 removed; done.
provisioner: Running hooks in /etc/ca-certificates/update.d...
provisioner: done.
|
f6755e9
to
748246e
Compare
@jacobweinstock, I've now finally actually used sandbox for the first time, and was able to fix it. This now works: $ vagrant ssh provisioner
$ docker tag bash:4.4 192.168.50.4/hello-world
$ docker push 192.168.50.4/hello-world
Using default tag: latest
The push refers to repository [192.168.50.4/hello-world]
d0c293cc0edd: Pushed
9f708c6c10e5: Pushed
e2eb06d8af82: Pushed
latest: digest: sha256:f290434b66bde9a4155f882710dab774c557acca4b3faccad7c53327afaebd1a size: 946
$ curl https://192.168.50.4/v2/_catalog
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"registry","Class":"","Name":"catalog","Action":"*"}]}]} Let me known if it works for you. |
Hey @rgl, thanks! this is working for me. Would it be possible to move this setup out of the Vagrantfile so that other infrastructure providers like Terraform can consume it? Finding a way to allow docker-compose only consumers to use this would also be ideal. Maybe a new directory for host scripts? Just a brainstorming idea. I apologize that it's not well documented but the design philosophy here is: "Vagrant and Terraform are now only responsible for standing up infrastructure and then running docker-compose, not for running any glue scripts. The compose calls single-shot services to do all the glue required to get a fully functional Tinkerbell stack." ref: here |
You mean to move it to a script file at Note that the script will modify the host configuration using
Can |
@jacobweinstock, ping? :-) |
Hey @rgl, really sorry for the delayed response. You mean to move it to a script file at deploy/host/trust-tinkerbell-ca-and-restart-docker.sh?
I don't know if there's a clean way to handle this. The code added to the Vagrantfile isnt portable to Terraform right now. So Terraform users arent able to take advantage of this TLS update. |
a server certificate must not include its CA certificate. the CA certificate must already be installed/trusted by the clients. Signed-off-by: Rui Lopes <[email protected]>
this allows us to clearly identify the ca and server certificates Signed-off-by: Rui Lopes <[email protected]>
its equally safer and its generally faster Signed-off-by: Rui Lopes <[email protected]>
this simplifies the compose file Signed-off-by: Rui Lopes <[email protected]>
234c0dc
to
0b2d4c1
Compare
Signed-off-by: Rui Lopes <[email protected]>
0b2d4c1
to
78c7f94
Compare
@jacobweinstock, I've refactored the code into deploy/compose/tls/trust.sh which is now shared between Vagrant and Terraform. Please check it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience and pushing this through!
Remove the CA certificate from bundle
Description
See #105
I also took the opportunity to:
Why is this needed
See #105
Fixes: #105
How Has This Been Tested?
Tested locally by starting Tinkerbell with compose and vagrant.
How are existing users impacted? What migration steps/scripts do we need?
Should not be impacted.
Checklist:
I have: