Skip to content
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

remote: avoid tls error if both key and cert are not set #1693

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

jedevc
Copy link
Collaborator

@jedevc jedevc commented Mar 23, 2023

🛠️ Fixes what appears to be an oversight I made in #1078.

Previously, we would explicitly error if all TLS parameters were not available. However, it is a perfectly valid use case to connect to a buildkit server that only serves TLS but which does not verify the client (which is possible today with buildctl) - see moby/buildkit#236 (comment):

  • Use a certificate and key on the server and a ca-certificate at the client
    • an ephemeral key exchange is performed
    • the client verifies the server certificate

To support this use case, we only need to error if only one of key or cert is set, and the other is not - if both are unspecified, the client will not present a certificate to the server.

Previously, we would explicitly error if all TLS parameters were not
available. However, it is a perfectly valid use case to connect to a
buildkit server that only provides TLS in one direction to verify the
server (which is possible today with buildctl).

To support this use case, we only need to error if only one of key or
cert is set, and the other is not - if both are unspecified, the client
will not present a certificate to the server.

Signed-off-by: Justin Chadwell <[email protected]>
@tonistiigi tonistiigi merged commit 948414e into docker:master Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants