Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Conversation

@delormejonathan
Copy link
Contributor

@delormejonathan delormejonathan commented Dec 16, 2020

Update http wrappers with a retry mecanism to avoid random API errors
Add new http wrappers (ACME.get() & ACME.postAsGet()) to comply with POST-as-GET directive

Tested in ACMEv2 staging and production environment.

Note : i'm not a LUA developer, any comments are welcome

@anezirovic
Copy link
Contributor

Hello, sorry for the delay, I'll review and test changes this week and probably merge it as is (the code looks fine to me).

Thank you for the contribution!

@anezirovic anezirovic self-assigned this Dec 28, 2020
@mdeneen
Copy link

mdeneen commented Jan 6, 2021

I have some certificates which will expire in about 20 days. I guess that I'll try this commit and see how things go.

@croaklumpish
Copy link

@mdeneen did it work for you?

I'm tried it and got the same result as with the current master version (ie. no pem, no output, just a 500 disconnect).

Please let me know. We also have certs that will expire soon-ish.

Thanks!

@mdeneen
Copy link

mdeneen commented Jan 8, 2021

@croaklumpish No, it did not. I ended up using certbot temporarily.

@delormejonathan
Copy link
Contributor Author

Did you restart HAProxy service ? a reload is not enough
Did you update your letsencrypt-x3-ca-chain.pem with the latest certs ? (see README)

I have a debug version of this script :
https://gist.github.com/delormejonathan/fe1abef007234e6f89e33318ac2d546f

Could you post the log output with this debug version ?

@nezirus
Copy link

nezirus commented Jan 8, 2021

Hey guys, it's nice to see the discussion going on. I've added ACME draft docs and diff in the latest commit, for easier comparison. If it easier for you, I'm available for chat today in the official slack channel.

@anezirovic anezirovic merged commit 5a74005 into haproxytech:master Jan 8, 2021
@anezirovic
Copy link
Contributor

anezirovic commented Jan 8, 2021

It took me a while to figure out that we might have some internal Lua API problems (applet:receive() doesn't work correctly) in later HAProxy versions (2.2 and later). I've only tested with Lua 5.4. Will retest the other Lua versions and submit necessary patches for HAProxy core Lua bindings.

However, the ACME Lua code works as is on HAProxy 2.0 and 2.1, tested it with Let's Encrypt staging and prod environments, real certs got issued. Hence, I've merge it.

Thanks again @delormejonathan, nice work! I've expected that major modifications were necessary for v2 ACME API, nice to be wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants