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

Introduce the HTTP01 challenge #39

Merged
merged 5 commits into from
Jan 27, 2017
Merged

Conversation

davidknezic
Copy link
Contributor

@davidknezic davidknezic commented Oct 10, 2016

This pull request adds a new provider called HTTP to the list, allowing you to use this Rancher Letsencrypt integration with yet unsupported DNS providers or where you don't have API access to your DNS records. Fixes #28.

The only thing that needs to be considered is that you'll have to redirect all traffic to http://your-domain:80/.well-known/acme-challenge to your rancher-letsencrypt service, in order for it to be able to serve the challenge files. This can be done using the built-in Rancher load balancer.

screen shot 2016-10-10 at 23 53 00

If you want to test this, there are a couple of steps necessary:

  1. Make sure you have a working Go environment
  2. Clone the branch
  3. make build
  4. remove the -debugarg from Dockerfile.dev
  5. make image
  6. Use that image and make sure you set PROVIDER=HTTP

Or, if you trust me, use my image davidknezic/rancher-letsencrypt:dev-a13546f.

I don't consider this ready to merge, this is what's still missing:

@FKSI
Copy link

FKSI commented Oct 11, 2016

👍

@franciscocpg
Copy link

Just what I need.

@@ -46,39 +46,50 @@ type ProviderOpts struct {
OvhApplicationKey string
OvhApplicationSecret string
OvhConsumerKey string

// HTTP challenge options
HTTPWebrootPath string
Copy link
Owner

Choose a reason for hiding this comment

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

I guess we don't need this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, agree!

@janeczku
Copy link
Owner

janeczku commented Nov 2, 2016

Thanks for submitting the PR @davidknezic. Do you think it's feasible to make it so that it waits until traffic for the domains is forwarded to the container before trying to issue the certificate?

@DanielDent
Copy link

DanielDent commented Nov 6, 2016

Looking forward to seeing this merged. I just pushed out https://github.com/danieldent/rancher-lets-encrypt which does something very similar (along with some auto discovery).

Re "Do you think it's feasible to make it so that it waits until traffic for the domains is forwarded to the container before trying to issue the certificate?", one simple implementation idea:

I implemented that functionality by publishing something at /.well-known/acme-challenge/, verifying that what I published is what I get when I request that HTTP url, and then doing the standard ACME HTTP protocol after that succeeds.

@davidknezic
Copy link
Contributor Author

davidknezic commented Nov 7, 2016

I implemented that functionality by publishing something at /.well-known/acme-challenge/, verifying that what I published is what I get when I request that HTTP url, and then doing the standard ACME HTTP protocol after that succeeds.

@DanielDent Sounds like a great approach to me!

@janeczku
Copy link
Owner

@davidknezic this pr seems to be working for people (#28 (comment)). Do you want to update this before i merge it or is it good to go as it is?

@l-e-e-o
Copy link

l-e-e-o commented Dec 20, 2016

@davidknezic @janeczku Anything new? I would love to see this merged.

@l-e-e-o
Copy link

l-e-e-o commented Jan 23, 2017

@janeczku @davidknezic It has been two months now. Is there anything I can do to help? I think lots of people want this feature as it would resolve the DNS provider issues.

@janeczku
Copy link
Owner

@darkblinded i think whats still missing is some check to make sure that queries to the domain are forwarded to this service before requesting the certificate. Though we could probably merge this now and add that in later.

@davidknezic
Copy link
Contributor Author

Hi @darkblinded @janeczku I've just removed the obsolete line of code and extended the README. Since this seems to work pretty well for a couple of people (including me) I absolutely agree with you on merging this pr. It would be great for us too, to be able to switch to the official catalog version instead of my custom build.

The access check can be a nice addition for a future pr.

@janeczku
Copy link
Owner

Thanks everyone!

@janeczku janeczku merged commit 2777fcd into janeczku:master Jan 27, 2017
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.

Introduce the simple HTTP challenge
6 participants