-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(config) default lua_ssl_trusted_certificate
to system
#8602
Conversation
lua_ssl_trusted_certificate
to systemlua_ssl_trusted_certificate
to system
lua_ssl_trusted_certificate
to system
lua_ssl_trusted_certificate
to system
lua_ssl_trusted_certificate
to system
lua_ssl_trusted_certificate
to system
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.
@ADD-SP, please update this too:
https://github.com/Kong/kong/blob/master/kong.conf.default#L1382
To reflect that system
is default.
CHANGELOG.md
Outdated
[#8602](https://github.com/Kong/kong/pull/8602). If you are upgrading from 2.x and want this variable to keep | ||
working as before, please manually set it to empty | ||
(`lua_ssl_trusted_certificate = [nothing in here]`) before upgrading. |
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.
[#8602](https://github.com/Kong/kong/pull/8602). If you are upgrading from 2.x and want this variable to keep | |
working as before, please manually set it to empty | |
(`lua_ssl_trusted_certificate = [nothing in here]`) before upgrading. | |
[#8602](https://github.com/Kong/kong/pull/8602). |
Is probably enough.
We generally don't explain how to get it working like the 2.x in the CHANGELOG, plus in this case the behavior is not dangerous nor difficult for user to figure out by reading the kong.conf.default
docs.
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.
Where do we usually mention these things?
Co-authored-by: Datong Sun <datong.sun@konghq.com>
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, let's wait for the test to pass before merging.
When `system` was opt-in, it made sense to "fail noisily" if the current system didn't have certs in any of the usual places and the user had opted in to system. Now that we look for them by default, the noisy behavior is incorrect, because it makes kong unable to start in places with no system certs. Instead, the abstence of default certificates gets logged, but Kong can continue without them. Related with #8602
Summary
Change the default of
lua_ssl_trusted_certificate
tosystem
.Full changelog
kong/templates/kong_defaults.lua
to change the default value oflua_ssl_trusted_certificate
tosystem
.spec/helpers.lua
to add a register a new assert functionhas_value(table, value)
.spec/01-unit/03-conf_loader_spec.lua
andspec/01-unit/04-prefix_handler_spec.lua
to adjust this changes.