-
Notifications
You must be signed in to change notification settings - Fork 66
LetsEncrypt #54
Comments
I've just started going over all of this recently. For now, I was going to disable the ACME challenge in the vhost config until I could figure things out. I might look at that next while I wait for the Xenial release. |
Here's another relevant issue related to this. |
@carlalexander CertBot is just the official Let's Encrypt client with a changed name. The official Let's Encrypt way of handling things is not sufficient enough for what different applications require. With |
No, I wasn't sure how this fit in the overall picture lol |
Well, for super short explanation: when you add a host to If you enable Everything that you need is explained in the documentation linked above by @schrapel. If anything else is missing or not explained well enough, let me know. |
Ok, I'll look into all of that. Will the fact that we use these options cause an issue? pki_internal: False
pki_authorities: [] |
Well, that depends. First, the normal way to get to ACME certificates from Debian base install with a host with
The problem with PKI is that at the moment it's either enabled or not. If It's basically a chicken and egg situation. The current DebOps defaults are designed to avoid that problem. I would suggest that you try that on a development server first to see what happens. |
So having read through everything tonight, I'm still not 100% sure how to proceed. The first step would be to create a PKI realm with ACME enabled. Right now, we use the default Once that's done, I should just need to change I assume there'll be other snags, but this is a good starting point. |
Let's make a simple example case. You have a domain
The
This should be enough for the When
the role will check if |
This is exactly what I needed! Thank you! |
Started running some tests tonight. Ran into an issue with the Not sure if this is a valid |
The directories can be created automatically by the |
Alright, so the wordpress_pki_default_realm:
name: 'carlalexander.ca'
subdomains: [ 'dev' ]
acme_subdomains: [ 'dev' ] With this config, I'm just looking for a certificate for I get an Did I understand that wrong and the top level domain needs to be available at all times for challenges? |
The |
So I got it to work with a realm config like this: wordpress_pki_default_realm:
name: 'dev.carlalexander.ca'
acme_default_subdomains: []
default_subdomains: [] I'll try something like this later: wordpress_pki_default_realm:
name: 'carlalexander.ca'
acme_default_subdomains: [ 'dev' ]
default_subdomains: [ 'dev' ] But I have a bit of a chicken and the egg problem. I'm still getting the Shouldn't we get certificates first before the challenges? Are you assuming that self-signed certificates are present? Wondering if it's an issue because I set |
Yes, this is the chicken and egg issue with should be solved by self-signed certificates. You could also provide external certificates as files, or via a script, internal certificates just fix the problem automatically. |
I finally got Let's Encrypt to work (somewhat). I got it to work by hand, but there's still some issues left to address. I'll document them and work on them next. By default, nginx doesn't have access to the challenge folder. This was the cause of the redirects to the My workaround was to add There's also a possibility that the Thanks again for the help @drybjed! (Enjoy your vacation!) |
More testing today. I've created a I wasn't able to find a workaround to the file permission issue. There's an issue and a thread about it, but they all go modify the During testing, I realized that there's no way to update a PKI realm once we create it. That means that, if you configure a server with one SSL provider, there's no way to change it to another. Not sure if it goes against |
Why wait a few weeks? :-) For the file/directory permission issue - the
Another matter are the files created by The PKI realms managed by
As you can see, there's nothing to change in the PKI realm itself. A common way to update the PKI realm is to just remove the entire If by changing the SSL provider you mean switching from internal CA certificates to ACME certificates, |
This is what I did yesterday. As for the realm issue, I figured this what you wanted to do. The only issue is that let's say someone is using a I'm not sure how often it'll happen in practice. I did your workaround and it works fine. It's not a deal breaker anyhow. 😄 |
OK, I've looked at the Let's Encrypt thread, and the issue might be wiith the restrictive I'm not sure I understand the PKI realm issue. What's the |
|
Made changes to the old code for the |
@carlalexander You can try |
Great job on this everyone, any ETA about let's encrypt implementation? |
I'm 90% done, but I'm leaving on vacation Friday. Not sure, I'll have time to tackle it before then. |
Just pushed the reworked integration with Only thing left is to update all the documentation in the wiki. I'll try to tackle it this week. |
@carlalexander I'm getting |
Is DebOps up to date? It's supposed to be generated by pki/env on the
|
@carlalexander I ran |
Nope didn't work. This is in the response of the
|
Is it when you run |
@carlalexander it fails on
|
What version of Ansible are you using? |
2.0.1.0 |
Can you try updating it and seeing if it works? I'm at 2.0.2.0. Not sure if that's the issue. I committed everything so I'm not sure what's going on. |
That seems to have solved the issue. So many dependencies to keep updated. I lose track of it all haha |
I know sorry! |
@carlalexander how do you suggest handling www here? If it points to the same server the certificate is only valid for the non-www from the hosts file |
If ansible_domain matches wordpress_domain, www sub domain is added by
|
Thanks. I've added it myself |
I noticed DebOps has ACME integration. Is this something that can be integrated easily?
https://github.com/debops/ansible-pki/blob/master/docs/acme-integration.rst
https://github.com/debops/ansible-nginx/blob/master/docs/acme-support.rst
http://docs.debops.org/en/latest/ansible/roles/ansible-pki/docs/acme-integration.html
The text was updated successfully, but these errors were encountered: