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

POC SSL Certificate #63

Closed
wants to merge 3 commits into from
Closed

POC SSL Certificate #63

wants to merge 3 commits into from

Conversation

chadlagore
Copy link
Contributor

βŒ› Status: WIP

🎟️ Ticket(s): #59


πŸ”¦ Testing Instructions

./gen-cert.sh  # lots of input - ideally pipe this script over ssh and fill in with defaults
sudo go run main.go  # port 443 requires sudo, bruno will be pissed

Elsewhere...

$ curl -sL https://localhost:443

Produces server-side error:

2018/01/18 21:00:43 http: TLS handshake error from [::1]:53606: remote error: tls: unknown certificate authority

@jordanschalm and I discuss:

... because we control both the client and the server, and we have to ssh pipe, we can just provide any identity that both sides can agree on. We don’t actually care about identities here, all we want is the encryption, so we can kind of fudge the identity part.

Discuss?

@chadlagore chadlagore added discussion pr: wip in progress but seeking feedback labels Jan 19, 2018
@chadlagore chadlagore changed the title POC first stab POC SSL Certificate Jan 19, 2018
@coveralls
Copy link

coveralls commented Jan 19, 2018

Coverage Status

Coverage decreased (-0.2%) to 21.486% when pulling c9f5e99 on chad/59-ssl-poc into 9b5c4ff on master.

Copy link
Member

@bfbachmann bfbachmann left a comment

Choose a reason for hiding this comment

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

Nice! The only problem I can see with the certificates not coming from a trusted authority is that you're still vulnerable to a man-in-the-middle you can't verify identity. I may well be wrong about that though - I'm not exactly a security expert. However, given our use case I don't think it's a big deal.

@jordanschalm
Copy link
Member

@bfbachmann I don't think that's a concern. Since the bootstrapping connection occurs over a secure channel we can inform the client of what cert the server has generated, so the client knows what it should trust.

The cert does come from a trusted authority (our code, running on the server), but the library doesn't know that without some extra work on our part. That's the hard part.

jordanschalm
jordanschalm previously approved these changes Jan 19, 2018
Copy link
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

Love it.

@@ -0,0 +1,6 @@
#!/bin/bash

openssl genrsa -out server.key 2048
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove the dependency on openssl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"net/http"
)

func HelloServer(w http.ResponseWriter, req *http.Request) {
Copy link
Member

Choose a reason for hiding this comment

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

Hahaha damn this is simple πŸ˜†

Copy link
Member

@bobheadxi bobheadxi left a comment

Choose a reason for hiding this comment

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

Does this mean the inertia [REMOTE] commands have to be sudo now, or only once?

@chadlagore
Copy link
Contributor Author

chadlagore commented Jan 19, 2018

No @bobheadxi, this will be handled over SSH prior to and during booting of the daemon container πŸ˜„

bobheadxi
bobheadxi previously approved these changes Jan 20, 2018
Unfortunately does not work for IP addresses.
@bobheadxi bobheadxi dismissed stale reviews from jordanschalm and themself via 7f7ab84 March 15, 2018 01:59
@bobheadxi bobheadxi closed this Mar 17, 2018
@bobheadxi bobheadxi deleted the chad/59-ssl-poc branch March 18, 2018 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: wip in progress but seeking feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants