-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Lua OCSP stapling #5133
Lua OCSP stapling #5133
Conversation
Maybe it's worth to check how Nginx implements OCSP stapling. |
Codecov Report
@@ Coverage Diff @@
## master #5133 +/- ##
=======================================
Coverage 58.64% 58.64%
=======================================
Files 88 88
Lines 6913 6913
=======================================
Hits 4054 4054
Misses 2414 2414
Partials 445 445
Continue to review full report at Codecov.
|
@ElvinEfendi please rebase |
@ElvinEfendi: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, ElvinEfendi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I would like to reopen this: Today I wanted to switch certificates from RSA to ECC and revoked the RSA certs prior to installing the ECCs. My OCSP-responder clearly indicated that the cert was revoked, but the browser, curl and openssl were happy. So I looked at the logfiles and found the following line:
and openssl output was:
My system is:
|
I just read the comment @ElvinEfendi at https://github.com/kubernetes/ingress-nginx/blob/30809c066cd027079cbb32dccc8a101d6fbffdcb/rootfs/etc/nginx/lua/certificate.lua Well: "revoked" should be handled, as this is the purpose of OCSP in the first place :-( |
For #4758
In order to avoid Nginx reload we have moved to dynamically handling TLS certificate serving using Lua a while ago. That also meant things like
ssl_stapling
directives became useless. This PR implements alternative to Nginx'sssl_stapling
using Lua.This is bare minimum implementation, expect a lot of rough edges.
The implementation tries to follow advice from https://gist.github.com/sleevi/5efe9ef98961ecfb4da8, but it is not even close to all the best practices mentioned there.
Another important shortcoming of this implementation to keep in mind is that Lua OCSP API does not provide API for
thisUpdate
andnextUpdate
, therefore we are just caching responses for 3 days. This might and might not be acceptable by some users.Also keep in mind that our implementation deos its best at stapling, vs vanilla Nginx staples only when the response is "good".
With all these in consideration, give it a try and let us know what can be improved, even better improve it yourself - patches are always welcome.