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

feat(config) default lua_ssl_trusted_certificate to system #8602

Merged
merged 13 commits into from
Apr 6, 2022

Conversation

ADD-SP
Copy link
Contributor

@ADD-SP ADD-SP commented Mar 29, 2022

Summary

Change the default of lua_ssl_trusted_certificate to system.

Full changelog

  • update kong/templates/kong_defaults.lua to change the default value of lua_ssl_trusted_certificate to system.
  • update spec/helpers.lua to add a register a new assert function has_value(table, value).
  • update spec/01-unit/03-conf_loader_spec.lua and spec/01-unit/04-prefix_handler_spec.lua to adjust this changes.
  • update changelog.

@ADD-SP ADD-SP changed the title feat(config) default lua_ssl_trusted_certificate to system feat(config) default lua_ssl_trusted_certificate to system Mar 29, 2022
@ADD-SP ADD-SP changed the title feat(config) default lua_ssl_trusted_certificate to system feat?(config) default lua_ssl_trusted_certificate to system Mar 29, 2022
@ADD-SP ADD-SP marked this pull request as ready for review March 29, 2022 08:52
@ADD-SP ADD-SP requested review from mayocream and fffonion March 29, 2022 09:32
spec/helpers.lua Outdated Show resolved Hide resolved
kikito
kikito previously requested changes Mar 30, 2022
spec/helpers.lua Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@ADD-SP ADD-SP requested review from dndx and kikito March 31, 2022 08:42
@ADD-SP ADD-SP changed the title feat?(config) default lua_ssl_trusted_certificate to system feat(config) default lua_ssl_trusted_certificate to system Apr 2, 2022
Copy link
Member

@bungle bungle left a 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.

@ADD-SP ADD-SP requested a review from bungle April 6, 2022 11:29
CHANGELOG.md Outdated
Comment on lines 100 to 102
[#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.
Copy link
Member

@dndx dndx Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[#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.

Copy link
Contributor Author

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>
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@dndx dndx left a 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.

@ADD-SP ADD-SP added pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes) and removed pr/do not merge labels Apr 6, 2022
@dndx dndx merged commit 3dad4a5 into master Apr 6, 2022
@dndx dndx deleted the add_sp/feat/default_trusted_cert branch April 6, 2022 12:38
kikito added a commit that referenced this pull request Apr 8, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/docs core/templates pr/ready This PR is considered ready and can be merged at anytime (given it received no subsequent changes) size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants