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

Feature/handle expire date #49

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

davidlibrera
Copy link

I copy the behaviour from certbot service.
Running the service with --keep-until-expire that renew the certificate only if it is due to expire.
Now it is possible to run the script daily.

@jalada
Copy link
Collaborator

jalada commented Mar 11, 2017

This is a good idea, thanks @davidlibrera, however rather than relying on ENV variables for configuration, why not use the Heroku platform API to check the existing certificate for expiry? https://github.com/jalada/platform-api/blob/master/schema.json#L10856

@davidlibrera
Copy link
Author

Yeah, off course. I use directly env variables without think about ask to heroku 😸 .
I change this ASAP

@jalada
Copy link
Collaborator

jalada commented Mar 15, 2017

@davidlibrera is there any point still having a configurable expiry window? Certbot renews any certificate that expires within 30 days, I think we should just use the same default and leave it at that.

@jalada
Copy link
Collaborator

jalada commented Mar 15, 2017

@davidlibrera rather than checking the certificate by hand, I meant using the Heroku API itself; does that make sense?

@davidlibrera
Copy link
Author

@jalada I think that renew window is useless. Using certbot daemon it consider 30 days, so we can use that value.

@davidlibrera
Copy link
Author

davidlibrera commented Mar 15, 2017

@jalada about checking the certificate by hand, I noticed that Platform-api json not provide expire_at value. Your fork of the gem do that.
I simply prefered that way in order to not force using a different version of platform-api gem.

@jalada
Copy link
Collaborator

jalada commented Mar 15, 2017

@davidlibrera it's already compulsory to use my fork of the gem until the upstream platform-api gem is updated, as per heroku/platform-api#49 and heroku/platform-api#56.

@jalada
Copy link
Collaborator

jalada commented Mar 15, 2017

Do we need the ability to force a renewal?

@davidlibrera
Copy link
Author

Yes, when I add a domain name to the heroku app.
The new domain is not certified but without a force renew I can't generate a new one until the previous is due to expiring.
Adding a new domain name is the ONLY reason I add that option

@davidlibrera
Copy link
Author

@jalada about the use of the endpoint, OK! I fix that ASAP

@jalada
Copy link
Collaborator

jalada commented Mar 16, 2017

@davidlibrera Ahh of course! That makes sense. In which case I suggest we swap the behaviour round. Instead of adding a --force option, let's add an --auto option which enables this new behaviour.

That way, this is a backwards compatible change, rather than a breaking change forcing everyone to redo their scheduled tasks.

Does that make sense?

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.

2 participants