| chore(lint): fix some helpers-outside-of-setup warnings (#14410) This reduces the number of warnings reported by the 'helpers-outside-of-setup' ast-grep lint rule. The lint rule itself had some false positives. I've updated it to remove those. In order to keep the changes easy to review, I've limited fixes to cases that only require trivial edits--essentially just moving the offending function calls into a `setup()`/`lazy_setup()` scope. There are several files that require a little more refactoring to fix, so I've left them alone for now. I'll address them in a follow-up PR, at which point this lint rule could be converted from a warning to an error. ``` spec/02-integration/04-admin_api/21-admin-api-keys_spec.lua spec/02-integration/05-proxy/10-balancer/02-least-connections_spec.lua spec/02-integration/05-proxy/10-balancer/02-least-connections_spec.lua spec/02-integration/05-proxy/10-balancer/07-latency_spec.lua spec/02-integration/05-proxy/10-balancer/07-latency_spec.lua spec/02-integration/08-status_api/05-dns_client_spec.lua spec/02-integration/09-hybrid_mode/01-sync_spec.lua spec/03-plugins/23-rate-limiting/04-access_spec.lua spec/03-plugins/26-prometheus/04-status_api_spec.lua spec/03-plugins/26-prometheus/04-status_api_spec.lua spec/03-plugins/26-prometheus/04-status_api_spec.lua spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua ``` ``` $ ast-grep scan --filter helpers-outside-of-setup | grep -c '^warning' 60 ``` ``` ast-grep scan --filter helpers-outside-of-setup | grep -c '^warning' 12 ``` | 1 year ago |
| Fix devcontainer dependencies. Later stages of the dependency setup require curl | 2 years ago |
| chore(cd): amazonlinux-2 EOL (#14921) ### Summary Amazon Linux 2 has reached end-of-life, so this removes all `amazonlinux-2` entries from the CD build matrices (`.github/matrix-full.yml` and `.github/matrix-debug.yml`). Only the `amazonlinux-2` package/image/release targets are dropped; `amazonlinux-2023` targets are left untouched. ### Issues resolved KAG-9225 (https://konghq.atlassian.net/browse/KAG-9225) | 2 months ago |
| chore(scripts): remove unused autodoc scripts | 3 years ago |
| chore(test): don't duplicate work when launching busted (#14308) This refactors our busted CLI wrapper to minimize work that does not need to be performed on launch/re-launch. | 1 year ago |
| chore(cd): amazonlinux-2 EOL (#14921) ### Summary Amazon Linux 2 has reached end-of-life, so this removes all `amazonlinux-2` entries from the CD build matrices (`.github/matrix-full.yml` and `.github/matrix-debug.yml`). Only the `amazonlinux-2` package/image/release targets are dropped; `amazonlinux-2023` targets are left untouched. ### Issues resolved KAG-9225 (https://konghq.atlassian.net/browse/KAG-9225) | 2 months ago |
| fix(core): applied upstream nginx security patches for limiting the number of maximum headers See: CVE-2026-49975 | 2 months ago |
| chore(deps): bump atc-router from v1.6.2 to 1.7.1 (#14138) KAG-5873 | 1 year ago |
| refactor(pdk): remove duplicate rate limiting context check (#14815) | 6 months ago |
| fix(ci): fix upgrade-test failure caused by renamed rockspec file KAG-7370 | 1 year ago |
| tests(vault): fix mockbin.org issue (#14872) * tests(vault): remove external dependency on mockbin.org (#17194) * tests(vault): add HTTP request in mock vault get() to simulate (#17309) KAG-8720 --------- Co-authored-by: hanjian <hanjian.liu@konghq.com> | 3 months ago |
| refactor(patches): remove disable_h2_alpn as not needed anymore (#14782) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com> | 10 months ago |
| build(arm64): utilize self-hosted runner for Amazon Linux 2 arm64 (#4403) This PR introduces builds of Amazon Linux 2/2022 packages that occur "natively" within docker on both `ubuntu-22.04` (github hosted runners) and `ubuntu-22.04-arm64` (self-hosted runners) as well as all the changes that were required of our existing github actions and build infrastructure to accomplish those builds. Briefly summarized, theses changes include (but are not limited to): - expanding `matrix-full.yml` to include amazonlinux entries - adding a "bootstrap.sh" script that is responsible for installing `cmake`, `cargo`, `yq`, `rootlesskit`, and `bazel` (but not `git` because that already existed in the github action) - this approach was determined to be more desirable than either letting `rules_foreign_cc` installing and configure `cmake` or installing and configuring `cmake` via bazel itself (ala `nfpm`) - the bootstrap.sh script is meant to be extensible to other platforms and can do things like "parse" bazel files to determine `RPM_EXTRA` packages to install - adds `explain_manifest` manifest files for amazonlinux 2/2022 arm64 & amd64 KAG-346 | 3 years ago |
| chore(build): bump bazel to 7.x | 1 year ago |
| chore(build): bump bazel to 7.x | 1 year ago |
| tests(*): shutdown timerng instance after test completion (#14005) | 1 year ago |
| chore(development): add vim modelines to bin/* (#10183) This adds vim modelines to our lua scripts in bin/ to identify their filetypes and set the proper indentation settings. I wish this could be done without cluttering up files with comment strings, but .editorconfig does not have any notion of "treat this file as $filetype." I have updated .editorconfig with the proper settings for these files, however. | 3 years ago |
| refactor(pluginservers): code refactor & testing (#12858) Context ------- The overall goal of this commit is to refactor the external plugins implementation, with the following goals in mind: - Make plugin server code more approachable to unfamiliar engineers and easier to evolve with confidence - Harden configuration; ensure configuration defects are caught before Kong is started - Extend testing coverage This is related to ongoing work on the Go PDK, with similar goals in mind. Summary ------- This commit implements the following overall changes to plugin server code: - Move configuration related code into conf loader, so that configuration loading and validation happens at startup time, rather than lazily, when plugin data is loaded or pluginservers are started. Add tests for current behavior. - Move process-management code - for starting up plugin servers as well as querying external plugins info - into the `process.lua` module. - Introduce a `kong.runloop.plugin_servers.rpc` module that encapsulates RPC initialization and protocol-specific implementations. This further simplifies the main plugin server main module. - Factor exposed API and phase handlers bridging code into a new `plugin` module, which encapsulates an external plugin representation, including the expected fields for any Kong plugin, plus external plugin-specific bits, such as the RPC instance. Part of this external plugin-specific part is the instance life cycle management. With this structure, the `kong.runloop.plugin_servers` main module contains only general external plugin code, including a list of loaded external plugins, and associated start/stop functions for plugin servers. Testing ------- This commit also implements the following improvements to tests: - Restructure fixtures to accommodate new external plugin servers -- namely, targeting for now in the existing Python and Javascript - Add new test cases for external plugins: * External plugin configuration: add test cases for current behavior; in particular: - Fail if no `query_cmd` is provided; - Warn if no `start_cmd` is provided - this is by design, as external plugins servers can be managed outside of Kong * Plugin server start / stop - for both Go and Python plugins * External plugin info querying for both Go and Python plugins * External plugin execution - for both Go and Python plugins Internal flow ------------- `.plugin_servers.init:` loads all external plugins, by calling .plugin_servers.process and `.plugin_servers.plugin` `.plugin_servers.process`: queries external plugins info with the command specified in `_query_cmd` proeprties `.plugin_servers.plugin`: with info obtained as described above, `.plugin:new` returns a kong-compatible representation of an external plugin, with phase handlers, PRIORITY, and wrappers to the PDK. Calls `.plugin_servers.rpc` to create an RPC through which Kong communicates with the plugin process `.plugin_servers.rpc`: based on info contained in the plugin (protocol field), creates the correct RPC for the given external plugin `.plugin_servers.rpc.pb_rpc`: protobuf rpc implementation - used by Golang `.plugin_servers.rpc.mp.rpc`: messagepack rpc implementation - used by JS and Python `.plugin_servers.init`: calls `.plugin_servers.process` to start external plugin servers `.plugin_servers.process`: optionally starts all external plugin servers (if a `_start_cmd` is found) uses the resty pipe API to manage the external plugin process | 1 year ago |
| refactor(sandbox): improve sandbox (#10900) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com> | 1 year ago |
| tests(coverage): luacov includeuntestedfiles | 3 years ago |
| refactor(patches): remove disable_h2_alpn as not needed anymore (#14782) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com> | 10 months ago |
| chore(build): remove ngx_wasm_module from default builds (#14347) | 1 year ago |
| docs(changelog): add 2.8.2-2.8.5 changelog entries (#13392) * docs(changelog): add 2.8.2-2.8.5 changelog entries * remove release date | 2 years ago |
| docs(release): add 3.9.3 changelog to changelog.md (#14913) | 2 months ago |
| Pledge Grammar corrected (#6353) | 5 years ago |
| chore(docs): update contributor wording and support channel info (#11544) | 2 years ago |
| docs(contributing): fix broken link | 1 year ago |
| docs(COPYRIGHT): update copyright for 3.9.2 (#14885) (#14891) | 3 months ago |
| docs: add database migration step to `DEVELOPER.md` before starting Kong (#14728) Co-authored-by: Xumin <100666470+StarlightIbuki@users.noreply.github.com> | 11 months ago |
| docs(copyright): update copyright year (#14820) * docs(copyright): update copyright year * docs(copyright): update copyright year | 7 months ago |
| chore(build): bump bazel to 7.x | 1 year ago |
| chore(build): remove ngx_wasm_module from default builds (#14347) | 1 year ago |
| docs(readme): update copyright (#14819) | 7 months ago |
| docs: link to docs for reporting vulnerability (#9136) The link to the documentation is broken | 3 years ago |
| docs(upgrade): Fixes Typos, Spell errors and Other issues (#11037) * Update UPGRADE.md [Spell Incorrects ] * Update UPGRADE.md * Update UPGRADE.md * Update UPGRADE.md reduced type errors | 3 years ago |
| chore(build): refine the locking of Rust dependencies | 1 year ago |
| docs(admin-api): add filter chains to OpenAPI spec | 3 years ago |
| refactor(build): rename kong rockspec KAG-7370 | 1 year ago |
| fix(templates): add missing security headers for Admin GUI (#14287) This pull request adds Content-Security-Policy and Referrer-Policy headers while serving Admin GUI requests. Cherry-picking PR in EE was created manually. Please refer to the linked PR. Since the Content-Security-Policy has caused some issues with the Kong Manager before, we introduce a new configuration parameter admin_gui_csp_header which defaults to "off" to control the availability of this header. Users can opt in manually. As for the Referrer-Policy header, we will serve 'strict-origin-when-cross-origin' which seems to be the default value today: Note: This is the default policy if no policy is specified, or if the provided value is invalid (see spec revision November 2020). Previously the default was no-referrer-when-downgrade. MDN reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#strict-origin-when-cross-origin_2 FTI-4283 | 1 year ago |
| chore(lint): add ast-grep lint rules and CI workflow (#14364) | 1 year ago |