-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(response-ratelimiting) redis ssl #8595
feat(response-ratelimiting) redis ssl #8595
Conversation
@dominikkukacka could you add related tests? |
@mayocream I certainly would, but I am not sure where. I can't find any other test specifically for plugins. I also saw no tests added for the same change in the rate-limit plugging so I stopped looking :) My other problem is I can't compile Kong at all (I am on macOS but I also tried on Ubuntu) |
2a8e3b6
to
55aa0aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dominikkukacka I've updated the tests of the rate-limiting
plugin by #8617 , and now the SSL connection between it and Redis
can be tested. Would you mind referring to the test code of the rate-limiting
plugin to add the relevant tests to your PR?
For now, you need to update the tests in the following two files.
spec/03-plugins/24-response-rate-limiting/04-access_spec.lua
spec/03-plugins/24-response-rate-limiting/05-integration_spec.lua
ca279f0
to
422f39c
Compare
Basically copying over from the rate-limiting plugin change
fd040ea
to
d580cf2
Compare
@ADD-SP Hey, I tried my best to "copy over" the changes needed. I can't run the test suit locally so I hope there was no mistake. Will the test run in CI now? |
Is there anything I can help with? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes are needed.
limits = { video = { second = ITERATIONS } }, | ||
}, | ||
}) | ||
for redis_conf_name, redis_conf in pairs(redis_confs) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these were copied from the rate-limiting. I think we can add some test cases only for the SSL connection feature instead of doing a loop for every existing test. This will reduce running time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
The corresponding doc PR is here: Kong/docs.konghq.com#4681
@ADD-SP Could you please do another round of code review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🥳 🎉 |
Summary
Adds flags to the response-ratelimiter for redis_ssl along with server_name for sni support.
I basically copied over the changes from the rate-limiting plugin