Skip to content

Add https cert and key options to docker#2186

Closed
c00w wants to merge 6 commits intomoby:masterfrom
c00w:1745_HTTPS_Remote_client_api
Closed

Add https cert and key options to docker#2186
c00w wants to merge 6 commits intomoby:masterfrom
c00w:1745_HTTPS_Remote_client_api

Conversation

@c00w
Copy link
Contributor

@c00w c00w commented Oct 13, 2013

This adds two new options to the docker daemon which pass in a ssl certificate and private key. When both of these are passed in, it uses https rather than http.

Partially fixes issue #1745

@wyaeld
Copy link

wyaeld commented Oct 15, 2013

Is it user-friendly to have 2 options, and if you don't supply both, nothing happens?

As an idea, if someone specifies 1 of them, does that indicate they are definately trying to activate the feature, and maybe the system should error and prompt them for the other option?

@c00w
Copy link
Contributor Author

c00w commented Oct 15, 2013

On 10/14/2013 08:51 PM, Brad Murray wrote:

Is it user-friendly to have 2 options, and if you don't supply both,
nothing happens?

As an idea, if someone specifies 1 of them, does that indicate they
are definately trying to activate the feature, and maybe the system
should error and prompt them for the other option?


Reply to this email directly or view it on GitHub
#2186 (comment).

That sounds like a smart addition. I'll make the commit and push it.

-Colin

@jpetazzo
Copy link
Contributor

+1. This is useful!

Pinging the core maintainers so this PR gets the review it deserves :-) /cc @creack @vieux @crosbymichael

Before merging, we will also need to:

  • add documentation for those new flags in the documentation;
  • possibly update Docker security information to mention those options;
  • maybe add some support in the CLI client to establish SSL connections as well;
  • allow the server to require a client-side cert;
  • allow the client to provide such a cert.

I believe that the first two points will be necessary to merge; the last three might require a more significant rehaul of the option parsing so maybe it can be left for later. The maintainers will tell!

@crosbymichael
Copy link
Contributor

@c00w

Please add documentation around this new feature and an example setup would be great.

server.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of storing both values on the Server struct why not create and store the tls.Config on the server when it is created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a better approach.

@c00w
Copy link
Contributor Author

c00w commented Oct 23, 2013

@crosbymichael
Add an example in docs/sources/examples and update commandline/cli.rst?

@crosbymichael
Copy link
Contributor

@c00w

Yes, I think both would be great.

@c00w
Copy link
Contributor Author

c00w commented Oct 24, 2013

@crosbymichael
I've added the documentation but am unsure how to build it and view it. Help?

@crosbymichael
Copy link
Contributor

@c00w

There should be a Dockerfile in the root of the docs folder that you can build and run to test the doc changes .

@c00w
Copy link
Contributor Author

c00w commented Oct 24, 2013

@crosbymichael Docs are updated. There didn't seem to be any server flag documentation so I added a basic segment. I'm not sure if its the right thing to do.

@crosbymichael
Copy link
Contributor

@c00w Can you please rebase these changes?

@c00w
Copy link
Contributor Author

c00w commented Nov 3, 2013

Rebasing isn't going to solve the problem, the structure of running in daemon mode changed completely and this code is going to have to be rewritten.

@jpetazzo
Copy link
Contributor

jpetazzo commented Nov 4, 2013

Ah, I'm sorry Colin, I know how it feels when that happens.
Do you still want to work on this? I believe that it would be very useful (especially as we ultimately get client-side and server-side cert authentication!)

@shykes
Copy link
Contributor

shykes commented Nov 4, 2013

Hey Colin, sorry about that. If you want to drop by irc (#docker-dev on freenode) we can walk you through the changes. It's not as bad as it looks. 90% of your code can probably stay the same, but moved around a little bit.

@solomonstre
@docker

On Mon, Nov 4, 2013 at 6:32 AM, Jérôme Petazzoni [email protected]
wrote:

Ah, I'm sorry Colin, I know how it feels when that happens.

Do you still want to work on this? I believe that it would be very useful (especially as we ultimately get client-side and server-side cert authentication!)

Reply to this email directly or view it on GitHub:
#2186 (comment)

@c00w
Copy link
Contributor Author

c00w commented Nov 4, 2013

I'm going to rewrite the patch but its probably going to take a bit
since I'm extremely busy with other things right now.

On 11/04/2013 09:59 AM, Solomon Hykes wrote:

Hey Colin, sorry about that. If you want to drop by irc (#docker-dev
on freenode) we can walk you through the changes. It's not as bad as
it looks. 90% of your code can probably stay the same, but moved
around a little bit.

@solomonstre
@docker

On Mon, Nov 4, 2013 at 6:32 AM, Jérôme Petazzoni
[email protected]
wrote:

Ah, I'm sorry Colin, I know how it feels when that happens.
Do you still want to work on this? I believe that it would be very
useful (especially as we ultimately get client-side and server-side

cert authentication!)

Reply to this email directly or view it on GitHub:
#2186 (comment)


Reply to this email directly or view it on GitHub
#2186 (comment).

@shykes
Copy link
Contributor

shykes commented Nov 11, 2013

Hi @c00w just a reminder that we are available to walk you through this on IRC.

I have one more request: could you add the same options to the client, so that there is still a way to use it when the daemon uses tls?

Thanks.

@GeoffreyPlitt
Copy link

+1

@denibertovic
Copy link
Contributor

this would be awesome 👍

@discordianfish
Copy link
Contributor

I've rebased this PR and solved merge conflicts here: https://github.com/discordianfish/docker/tree/1745_HTTPS_Remote_client_api
Will also look into client implementation and client cert authentication now.

@crosbymichael
Copy link
Contributor

Closing in favor if #2996

cpuguy83 pushed a commit to cpuguy83/docker that referenced this pull request May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants