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

Let's encrypt! #281

Merged
merged 1 commit into from
Apr 13, 2016
Merged

Let's encrypt! #281

merged 1 commit into from
Apr 13, 2016

Conversation

samgiles
Copy link
Contributor

Needs some tests + cleanup before landing - this is a first pass.

If you try this, the box needs to be restarted and then you'll have the cert loaded, it can be done on the fly, it just doesn't work right now.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 38.014% when pulling 8d9fa92 on samgiles:lets-encrypt into 7d4ea93 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 38.014% when pulling 33d1edb on samgiles:lets-encrypt into 7d4ea93 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 38.274% when pulling 8f18c4f on samgiles:lets-encrypt into 28b7a54 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 38.298% when pulling 6125cae on samgiles:lets-encrypt into 28b7a54 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 38.268% when pulling 3f3a9e2 on samgiles:lets-encrypt into cea4285 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 38.268% when pulling d6483c3 on samgiles:lets-encrypt into 101c669 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 38.131% when pulling 00321ee on samgiles:lets-encrypt into 101c669 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 38.072% when pulling b54cf67 on samgiles:lets-encrypt into 101c669 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 38.072% when pulling 1e1e491 on samgiles:lets-encrypt into 101c669 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.6%) to 36.464% when pulling 328f921 on samgiles:lets-encrypt into 101c669 on fxbox:master.

@samgiles
Copy link
Contributor Author

samgiles commented Apr 8, 2016

Ok, this works for the remote and local names at this point.

A couple things need to happen once this is merged,

  1. The app needs updating to the new registration server API
  2. The registration server on the knilxof.org needs to updated to master

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 36.464% when pulling cc00bb9 on samgiles:lets-encrypt into 71eb5f3 on fxbox:master.

@samgiles samgiles changed the title [WIP] Let's encrypt! Let's encrypt! Apr 8, 2016
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.005%) to 36.446% when pulling 184e5bf on samgiles:lets-encrypt into 71eb5f3 on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 35.593% when pulling e6b7a3a on samgiles:lets-encrypt into 39fda1f on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 35.689% when pulling aad8cf4 on samgiles:lets-encrypt into 39fda1f on fxbox:master.

@@ -45,13 +45,10 @@ pub struct FoxBox {
profile_service: Arc<ProfileService>,
}

const DEFAULT_HOSTNAME: &'static str = "::"; // ipv6 default.
const DEFAULT_DOMAIN: &'static str = ".local";

impl FoxBox {

Copy link
Member

Choose a reason for hiding this comment

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

uber-nit: let's take the chance and remove this extra line.

}
}
} else {
info!("Unable to send request to {}", self.registration_endpoint);
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@ferjm
Copy link
Member

ferjm commented Apr 12, 2016

As usual, this is an excellent work, Sam :)

I tested the patch locally and it works.

In general, the code looks good to me. I only added a bunch of comments about minor stuff.

It would be great if you could improve the documentation. The process is a bit complex and it's hard to get it just by reading the code.

Thanks for working on this!

I'm CCing @fabricedesre and @michielbdejong in case that they also want to take a look.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 34.163% when pulling 0b8a441 on samgiles:lets-encrypt into 39fda1f on fxbox:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 34.163% when pulling fb7e0cd on samgiles:lets-encrypt into 069c153 on fxbox:master.

- Include the scheme in the message posted to the registration server
- Generates LetsEncrypt certificate for the local domain on the fly
- Use a DnsRecord to decribe the entry to the DNS server
- Each box has a preset name that a self-signed certificate is created for.  This is then used as the identifier for that box, and is used in the creation of names that can be added to a SAN cert
- Register the remote tunnel name using the certificate fingerprint
- Fix the command line arguments to include the dns-api endpoint option
- Don't parameterise the CertificateManager by type implementation, instead use a Box (fat pointer) to an SslContextProvider
- Refactor registrar
@samgiles
Copy link
Contributor Author

Rebased and squashed!

@coveralls
Copy link

coveralls commented Apr 13, 2016

Coverage Status

Coverage increased (+49.0%) to 81.276% when pulling 9c1a5b8 on samgiles:lets-encrypt into 5f12f56 on fxbox:master.

@samgiles samgiles merged commit 3e758cc into fxbox:master Apr 13, 2016
@samgiles samgiles deleted the lets-encrypt branch April 13, 2016 13:10
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