Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is allow_domain used/needed for renewal? #101

Closed
brianlund opened this issue Oct 19, 2017 · 6 comments · Fixed by #176
Closed

Is allow_domain used/needed for renewal? #101

brianlund opened this issue Oct 19, 2017 · 6 comments · Fixed by #176

Comments

@brianlund
Copy link
Contributor

brianlund commented Oct 19, 2017

As I understand it, a renewal is basically a new certificate request with the same subject.
We have domains that leave us over time, so I am wondering if renewal uses the allow_domain function to ensure it only tries to renew domains that are still valid and won't result in a failed attempt counting towards the let's encrypt limits or if it's not needed.

Edit: from reading the renewal code, I see it's not called before a renewal. There must be others that have domains that are no longer valid for certificate issuance at renewal time, how do you handle this?

@oronoa
Copy link

oronoa commented Nov 7, 2017

As far as I can see, Just delete the domain keys from Redis, it will not renew.

@gohai
Copy link
Contributor

gohai commented Nov 21, 2017

We'd be interested in having lua-resty-auto-ssl call allow_domain at renewal time, and deleting the domain keys from Redis if it returns false. I might try to prototype this myself if nobody beats me to it.

@luto
Copy link
Collaborator

luto commented Nov 21, 2017

@gohai that sounds like a nice addition! :)

@brianlund
Copy link
Contributor Author

@gohai I found this fork: https://github.com/ryokdy/lua-resty-auto-ssl which deletes expired certificates fromm storage. I forked it myself to https://github.com/simplesite/lua-resty-auto-ssl and changed it to use the normal allow_domain function instead of a custom http check that ryokdy uses.

@gohai
Copy link
Contributor

gohai commented Nov 21, 2017

@brianlund Thank you!
@GUI Any chance a similar change could be incorporated into your tree?

@gohai
Copy link
Contributor

gohai commented Apr 18, 2018

I submitted a PR that does something to the same effect, yet without invoking allow_domain: #125

The reason the plain allow_domain does not well for us is that we wouldn't be getting the extra information out of storage that the function is normally able to use (such as the port the request was received).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants