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

Leaking authorizations #383

Closed
jsha opened this issue Apr 20, 2017 · 13 comments
Closed

Leaking authorizations #383

jsha opened this issue Apr 20, 2017 · 13 comments

Comments

@jsha
Copy link
Contributor

jsha commented Apr 20, 2017

Hi! We've gotten a couple of reports from hosting providers that integrate with Let's Encrypt that they are hitting the pending authz rate limit, and are using xenolf/acme. I suspect that this is because some code path in xenolf/acme can leak authorizations (i.e., neither fulfill nor deactivate them) when there are some forms of errors. I'm not sure in more detail what those conditions might look like, but would be able to attempt a repro? For instance, you could set up lego to issue a lot of certificates against staging, including some non-existent domains, and log the resulting authz URLs. You could then fetch each of the authz URLs and check if any of them are in "pending" state. If they are, that would indicate an authz leak.

Thanks for implementing this client, it's a very popular way to interact with Let's Encrypt!

@mholt
Copy link
Contributor

mholt commented Apr 20, 2017

What version of lego are they using?

Edit: They just posted it on the forum. 5dfe609

FWIW, I know of a server managing thousands of certificates that is not known (yet?) to have any problems...

@RBeaudoin
Copy link

We at Heroku are one of those providers that @jsha mentioned who are having issues with the pending authz limits. I'm hoping that #367 will address these issues as we suspect they are related to bad nonce leaving pending authz requests open, but we forked Lego to allow us to cancel pending authz and are pulling in the upstream change today.

@xenolf
Copy link
Member

xenolf commented Apr 26, 2017

I was able to repro leaks when the solver itself encountered an early error state. @RBeaudoin which challenge are you using?

@RBeaudoin
Copy link

@xenolf we are using acme.TLSSNI01

@xenolf
Copy link
Member

xenolf commented Apr 26, 2017

@RBeaudoin could you try the authz-cleanup branch against staging to see if it solves it for you?

@RBeaudoin
Copy link

@xenolf I can test today and let you know how things work. If it does, it would be a huge help thank you.

@jsha
Copy link
Contributor Author

jsha commented Apr 27, 2017

@xenolf thanks for working on this! out of curiosity, what are the types of early error state that could cause the solver to leak?

@RBeaudoin
Copy link

RBeaudoin commented Apr 28, 2017

Update: we haven't seen any pending authz issues yet after ~11 hours of running the branch in production. We also haven't seen any bad nonce issues which is very nice.

Unfortunately, we are still seeing the 429 Too Many Requests despite ee0018c and 45beff7 but I'm happy to open a different issue related to that

@xenolf
Copy link
Member

xenolf commented Apr 28, 2017

@RBeaudoin thanks for the update! I will merge the changes into master asap. As far as the 429 Too Many Requests issue goes... I don't really know what to do about it. We already do limit the requests per second to under the value boulder advertises. Maybe @jsha could give us more insight?

@trecloux
Copy link
Contributor

I tried to fix the 429 issue, with a dedicated RoundTripper because the current solution is scheduling the goroutines but not the http calls.... but it was a failure :-(

@jsha
Copy link
Contributor Author

jsha commented Apr 28, 2017

@RBeaudoin could you open a separate issue for the 429s you're seeing and I can provide feedback there?

@RBeaudoin
Copy link

Opened #390

@xenolf
Copy link
Member

xenolf commented May 3, 2017

Closed by eb711d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants