├── .bazelignore ├── .bazelrc ├── .bazelversion ├── .busted ├── .ci ├── luacov-stats-aggregator.lua └── test_suites.json ├── .devcontainer ├── Dockerfile ├── devcontainer.json └── docker-compose.yml ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md ├── actions │ ├── build-cache-key │ │ └── action.yml │ └── build-wasm-test-filters │ │ └── action.yml ├── dependabot.yml ├── labeler.yml ├── matrix-commitly.yml ├── matrix-full.yml └── workflows │ ├── auto-assignee.yml │ ├── autodocs.yml │ ├── backport-fail-bot.yml │ ├── backport.yml │ ├── build.yml │ ├── build_and_test.yml │ ├── buildifier.yml │ ├── changelog-requirement.yml │ ├── changelog-validation.yml │ ├── cherry-picks.yml │ ├── community-stale.yml │ ├── label-check.yml │ ├── label-community-pr.yml │ ├── label-schema.yml │ ├── labeler.yml │ ├── openresty-patches-companion.yml │ ├── perf.yml │ ├── release-and-tests-fail-bot.yml │ ├── release.yml │ ├── update-ngx-wasm-module.yml │ ├── update-test-runtime-statistics.yml │ └── upgrade-tests.yml ├── .gitignore ├── .luacheckrc ├── .luacov ├── .requirements ├── BUILD.bazel ├── CHANGELOG-OLD.md ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── COMMUNITY_PLEDGE.md ├── CONTRIBUTING.md ├── COPYRIGHT ├── DEVELOPER.md ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── UPGRADE.md ├── WORKSPACE ├── autodoc ├── README.md ├── cli │ ├── data.lua │ └── generate.lua └── pdk │ ├── generate.lua │ └── ldoc │ ├── config.ld │ ├── filters.lua │ ├── json.ltp │ ├── ldoc.ltp │ └── nav_yml.ltp ├── bin ├── busted ├── kong └── kong-health ├── build ├── BUILD.bazel ├── Makefile ├── README.md ├── build_system.bzl ├── cross_deps │ ├── BUILD.bazel │ ├── libxcrypt │ │ ├── BUILD.bazel │ │ ├── BUILD.libxcrypt.bazel │ │ └── repositories.bzl │ ├── libyaml │ │ ├── BUILD.bazel │ │ ├── BUILD.libyaml.bazel │ │ └── repositories.bzl │ ├── repositories.bzl │ └── zlib │ │ ├── BUILD.bazel │ │ ├── BUILD.zlib.bazel │ │ └── repositories.bzl ├── dockerfiles │ ├── apk.Dockerfile │ ├── deb.Dockerfile │ ├── entrypoint.sh │ └── rpm.Dockerfile ├── kong_bindings.bzl ├── libexpat │ ├── BUILD.bazel │ ├── BUILD.libexpat.bazel │ └── repositories.bzl ├── luarocks │ ├── BUILD.bazel │ ├── BUILD.luarocks.bazel │ ├── luarocks_repositories.bzl │ ├── luarocks_wrap_script.lua │ └── templates │ │ ├── luarocks_exec.sh │ │ ├── luarocks_make.sh │ │ └── luarocks_target.sh ├── nfpm │ ├── BUILD.bazel │ ├── BUILD.nfpm.bazel │ ├── repositories.bzl │ └── rules.bzl ├── openresty │ ├── BUILD.bazel │ ├── BUILD.openresty.bazel │ ├── atc_router │ │ ├── BUILD.bazel │ │ └── atc_router_repositories.bzl │ ├── brotli │ │ ├── BUILD.bazel │ │ └── brotli_repositories.bzl │ ├── lua-resty-lmdb-cross.patch │ ├── openssl │ │ ├── BUILD.bazel │ │ ├── README.md │ │ ├── openssl.bzl │ │ └── openssl_repositories.bzl │ ├── patches │ │ ├── LuaJIT-2.1-20231117_01_patch_macro_luajit_version.patch │ │ ├── LuaJIT-2.1-20231117_02_pass_cc_env.patch │ │ ├── lua-cjson-2.1.0.13_01-error-on-t_end.patch │ │ ├── lua-resty-core-0.1.28_01-dyn_upstream_keepalive.patch │ │ ├── nginx-1.25.3_01-upstream_client_certificate_and_ssl_verify.patch │ │ ├── nginx-1.25.3_02-remove-server-tokens-from-special-responses-output.patch │ │ ├── nginx-1.25.3_03-http_revert_req_body_hardcode_limitation.patch │ │ ├── nginx-1.25.3_03-stream_upstream_client_certificate_and_ssl_verify.patch │ │ ├── nginx-1.25.3_04-grpc_authority_override.patch │ │ ├── nginx-1.25.3_05-remove-server-headers-from-ngx-header-filter-module.patch │ │ ├── nginx-1.25.3_06-dynamic_log_level.patch │ │ ├── nginx-1.25.3_07-cross.patch │ │ ├── nginx-1.25.3_08-cross-endianness-fix.patch │ │ ├── ngx_lua-0.10.26_01-dyn_upstream_keepalive.patch │ │ ├── ngx_lua-0.10.26_02-dynamic_log_level.patch │ │ ├── ngx_lua-0.10.26_03-regex-memory-corruption.patch │ │ ├── ngx_lua-0.10.26_04-head-request-smuggling.patch │ │ ├── ngx_lua-0.10.26_05-setkeepalive-data-integrity.patch │ │ ├── ngx_lua-0.10.26_06-ngx-arg-connection-close.patch │ │ ├── ngx_stream_lua-0.0.14_01-expose_request_struct.patch │ │ ├── ngx_stream_lua-0.0.14_02-remove-useless-pcre-config.patch │ │ ├── ngx_stream_lua-0.0.14_03-regex-memory-corruption.patch │ │ ├── ngx_stream_lua-0.0.14_04-setkeepalive-data-integrity.patch │ │ ├── ngx_stream_lua-0.0.14_05-ssl-context.patch │ │ ├── openresty_01-custom_prefix_and_cc.patch │ │ └── openresty_02-pcre2.patch │ ├── pcre │ │ ├── BUILD.bazel │ │ ├── BUILD.pcre.bazel │ │ ├── README.md │ │ └── pcre_repositories.bzl │ ├── repositories.bzl │ ├── snappy │ │ ├── BUILD.bazel │ │ └── snappy_repositories.bzl │ └── wasmx │ │ ├── BUILD.bazel │ │ ├── filters │ │ ├── BUILD.bazel │ │ ├── repositories.bzl │ │ └── variables.bzl │ │ ├── rules.bzl │ │ └── wasmx_repositories.bzl ├── package │ ├── kong.logrotate │ ├── kong.service │ ├── nfpm.yaml │ └── postinstall.sh ├── platforms │ └── distro │ │ └── BUILD ├── repositories.bzl ├── templates │ ├── venv-commons │ ├── venv.fish │ └── venv.sh └── toolchain │ ├── .gitignore │ ├── BUILD │ ├── bindings.bzl │ ├── cc_toolchain_config.bzl │ ├── generate_wrappers.sh │ ├── managed_toolchain.bzl │ └── repositories.bzl ├── changelog ├── 3.5.0 │ ├── 3.5.0.md │ └── kong │ │ ├── .gitkeep │ │ ├── 10570.yml │ │ ├── 11360-1.yml │ │ ├── 11360-2.yml │ │ ├── 11402.yml │ │ ├── 11424.yml │ │ ├── 11442.yml │ │ ├── 11464.yml │ │ ├── 11468.yml │ │ ├── 11480.yml │ │ ├── 11484.yml │ │ ├── 11502.yml │ │ ├── 11515.yml │ │ ├── 11518.yml │ │ ├── 11523.yml │ │ ├── 11532.yml │ │ ├── 11538.yml │ │ ├── 11551-1.yml │ │ ├── 11551-2.yml │ │ ├── 11553.yml │ │ ├── 11566.yml │ │ ├── 11578.yml │ │ ├── 11599.yml │ │ ├── 11613.yml │ │ ├── 11638.yml │ │ ├── 11639.yml │ │ ├── 11727.yml │ │ ├── aws_lambda_service_cache.yml │ │ ├── bump_openssl_3.1.4.yml │ │ ├── dedicated_config_processing.yml │ │ ├── fix-cve-2023-44487.yml │ │ ├── fix-opentelemetry-parent-id.yml │ │ ├── fix-tcp-log-sslhandshake.yml │ │ ├── fix_dns_enable_dns_no_sync.yml │ │ ├── fix_patch_order.yml │ │ ├── lapis_version_bump.yml │ │ ├── lua_kong_nginx_module_bump.yml │ │ ├── luajit_ldp_stp_fusion.yml │ │ ├── ngx_wasm_module_bump.yml │ │ ├── on_prem_dp_metadata.yml │ │ ├── per_reqeuest_deubgging.yml │ │ ├── plugin-configure-phase.yml │ │ ├── request-aware-table.yml │ │ ├── request_id.yml │ │ ├── session_do_not_read_body_by_default.yml │ │ ├── vault-declarative.yml │ │ ├── vault-init-warmup.yml │ │ ├── vault-resurrect.yml │ │ ├── wasm-filter-config-schemas.yml │ │ ├── wasm-filter-json-config.yml │ │ └── wasmtime_version_bump.yml ├── 3.6.0 │ ├── 3.6.0.md │ ├── kong-manager │ │ ├── entity_form_preview.yml │ │ ├── redesigned_basic_components.yml │ │ ├── standardized_notification_format.yml │ │ └── unified_plugin_pages.yml │ └── kong │ │ ├── .gitkeep │ │ ├── add-ai-prompt-decorator-plugin.yml │ │ ├── add-ai-prompt-guard-plugin.yml │ │ ├── add-ai-prompt-template-plugin.yml │ │ ├── add-ai-proxy-plugin.yml │ │ ├── add-ai-proxy-telemetry.yml │ │ ├── add-ai-request-transformer-plugin.yml │ │ ├── add-ai-response-transformer-plugin.yml │ │ ├── add-gateway-edition-to-root-endpoint-admin-api.yml │ │ ├── add_ngx_brotli_module.yml │ │ ├── atc_reuse_context.yml │ │ ├── basic_www_authenticate.yml │ │ ├── bump-atc-router.yml │ │ ├── bump-cocurrency-limit-of-timer-ng.yml │ │ ├── bump-lapis-1.16.0.1.yml │ │ ├── bump-lpeg-1.1.0.yml │ │ ├── bump-lua-messagepack-0.5.3.yml │ │ ├── bump-lua-messagepack-0.5.4.yml │ │ ├── bump-lua-resty-aws-1.3.6.yml │ │ ├── bump-lua-resty-healthcheck-3.0.1.yml │ │ ├── bump-lua-resty-lmdb-1.4.1.yml │ │ ├── bump-lua-resty-timer-ng-to-0.2.6.yml │ │ ├── bump-ngx-wasm-module.yml │ │ ├── bump-openresty.yml │ │ ├── bump-openssl.yml │ │ ├── bump-resty-openssl.yml │ │ ├── bump-wasmtime.yml │ │ ├── bump_dns_stale_ttl.yml │ │ ├── bump_ngx_brotli.yml │ │ ├── bump_openssl_from_3_1_4_to_3_2_0.yml │ │ ├── ca_certificates_reference_check.yml │ │ ├── clustering-empty-data-plane-hash-fix.yml │ │ ├── cookie-name-validator.yml │ │ ├── cp-expose-dp-cert-details.yml │ │ ├── dao-pk-as-entity.yml │ │ ├── debian-12-support.yml │ │ ├── declarative_config_fix.yml │ │ ├── default_status_port.yml │ │ ├── deps_bump_lua_resty_healthcheck.yml │ │ ├── display-warning-message-for-km-misconfig.yml │ │ ├── enhance_admin_api_auth_error_response.yml │ │ ├── error_handler_494.yml │ │ ├── expression_http_headers_sensitive.yml │ │ ├── expressions_not_operator.yml │ │ ├── feat-add-cipher-to-the-intermediate.yml │ │ ├── fix-declarative-config-flattened-data-loss.yml │ │ ├── fix-error-message-print.yml │ │ ├── fix-ldoc-intermittent-fail.yml │ │ ├── fix-pdk-response-set-header-with-table.yml │ │ ├── fix-upstream-uri-azure-function-plugin.yml │ │ ├── fix-wasm-module-branch.yml │ │ ├── fix_dns_blocking.yml │ │ ├── fix_dns_disable_dns_no_sync.yml │ │ ├── fix_dns_instrument_error_handling.yml │ │ ├── inject-nginx-directives-location.yml │ │ ├── introduce_lmdb_validation_tag.yml │ │ ├── log-serializer-source-property.yml │ │ ├── optimize_keepalive_parameters.yml │ │ ├── pdk-json-encoding-numbers-precision.yml │ │ ├── pdk-response-send-remove-transfer-encoding.yml │ │ ├── perf-tracing-from-timers.yml │ │ ├── plugin-server-instance-leak.yml │ │ ├── postremove.yml │ │ ├── prometheus_expose_no_service_metrics.yml │ │ ├── rate-limiting-fix-redis-sync-rate.yml │ │ ├── respect-custom-proxy_access_log.yml │ │ ├── rl-shared-sync-timer.yml │ │ ├── router-report-yield.yml │ │ ├── serviceless-routes-still-trigger-datalog-plugin.yml │ │ ├── standardize-redis-conifguration-acme.yml │ │ ├── standardize-redis-conifguration-rate-limiting.yml │ │ ├── standardize-redis-conifguration-response-rl.yml │ │ ├── subsystems_do_not_share_router_schemas.yml │ │ ├── support_http_path_segments_field.yml │ │ ├── support_net_src_dst_field_in_expression.yml │ │ ├── tracing-dns-query-patch.yml │ │ ├── tracing-sampling-rate-scope.yml │ │ ├── validate_private_key.yml │ │ ├── wasm-attach.yml │ │ ├── wasm-dynamic-properties.yml │ │ └── wasm-injected-shm-kv.yml ├── Makefile ├── README.md ├── changelog-template.yaml ├── create_pr ├── unreleased │ ├── kong-manager │ │ └── .gitkeep │ ├── kong │ │ ├── .gitkeep │ │ ├── add-ai-data-report.yml │ │ ├── add-messages-api-to-anthropic.yml │ │ ├── add_tzdata.yml │ │ ├── ai-proxy-client-params.yml │ │ ├── ai-proxy-preserve-mode.yml │ │ ├── analytics-for-anthropic.yml │ │ ├── bump-atc-router.yml │ │ ├── bump-libexpat.yml │ │ ├── bump-lua-kong-nginx-module.yml │ │ ├── bump-lua-protobuf.yml │ │ ├── bump-lua-resty-acme.yml │ │ ├── bump-lua-resty-aws.yml │ │ ├── bump-lua-resty-healthcheck.yml │ │ ├── bump-lua-resty-http-0.17.2.yml │ │ ├── bump-lua-resty-lmdb.yml │ │ ├── bump-lua-resty-openssl.yml │ │ ├── bump-lua-resty-timer-ng.yml │ │ ├── bump-luarocks.yml │ │ ├── bump-ngx-wasm-module.yml │ │ ├── bump-pcre.yml │ │ ├── bump-penlight.yml │ │ ├── bump-v8.yml │ │ ├── bump-wasmtime.yml │ │ ├── cleanup_ai.yml │ │ ├── decrease-cocurrency-limit-of-timer-ng.yml │ │ ├── disable-TLSv1_1-in-openssl3.yml │ │ ├── feat-add-workspace-label-to-prometheus.yml │ │ ├── feat-ai-proxy-add-streaming.yml │ │ ├── feat-dont-allow-priority-with-others.yml │ │ ├── feat-emmy-debugger.yml │ │ ├── feat-hybrid-sync-mixed-route-policy.yml │ │ ├── feat-increase-ai-anthropic-regex-expression-length.yml │ │ ├── feat-jwt-eddsa.yml │ │ ├── feat-jwt-es512.yml │ │ ├── feat-wasm-general-shm-kv.yml │ │ ├── fix-acme-renewal-bug.yml │ │ ├── fix-age-header.yml │ │ ├── fix-aws-lambda-gateway-compat-version-field.yml │ │ ├── fix-aws-lambda-kong-latency.yml │ │ ├── fix-cjson-t-end.yml │ │ ├── fix-cli-db-timeout-overrides.yml │ │ ├── fix-ctx-host-port.yml │ │ ├── fix-dbless-duplicate-target-error.yml │ │ ├── fix-default-value-of-upstream-keepalive-max-requests.yml │ │ ├── fix-dns-ignore-records-with-non-matching-types.yml │ │ ├── fix-dns-resolv-timeout-zero.yml │ │ ├── fix-external-plugin-instance.yml │ │ ├── fix-file-permission-of-logrotate.yml │ │ ├── fix-grpc-gateway-json-decode-bug.yml │ │ ├── fix-hybrid-dp-certificate-with-vault-not-refresh.yml │ │ ├── fix-jwt-plugin-check.yml │ │ ├── fix-migrations-for-redis-plugins-acme.yml │ │ ├── fix-migrations-for-redis-plugins-response-rl.yml │ │ ├── fix-migrations-for-redis-plugins-rl.yml │ │ ├── fix-missing-router-section-of-request-debugging.yml │ │ ├── fix-mlcache-renew-lock-leaks.yml │ │ ├── fix-request-transformer-uri-replace.yml │ │ ├── fix-router-rebuing-flag.yml │ │ ├── fix-snis-tls-passthrough-in-trad-compat.yml │ │ ├── fix-upstream-status-unset.yml │ │ ├── fix-vault-init-worker.yml │ │ ├── fix-vault-secret-update-without-ttl.yml │ │ ├── fix-vault-workspaces.yml │ │ ├── fix-wasm-disable-pwm-lua-resolver.yml │ │ ├── fix_api_405_vaults_validate_endpoint.yml │ │ ├── fix_balancer_healthecker_unexpected_panic.yml │ │ ├── fix_privileged_agent_id_1.yml │ │ ├── flavor-expressions-supports-traditional-fields.yml │ │ ├── force-no_sync-noip.yml │ │ ├── key_auth_www_authenticate.yml │ │ ├── log-serializer-kong-latency.yml │ │ ├── log-serializer-receive-latency.yml │ │ ├── otel-increase-queue-max-batch-size.yml │ │ ├── otel-sampling-panic-when-header-trace-id-enable.yml │ │ ├── plugin-schema-deprecation-record.yml │ │ ├── plugin_server_restart.yml │ │ ├── plugins-add-standard-webhooks.yml │ │ ├── pluginsocket-proto-wrong-type.yml │ │ ├── propagation-module-rework.yml │ │ ├── revert-req-body-limitation-patch.yml │ │ ├── separate_kong_cache_invalidation_cluster_event_channel.yml │ │ ├── set_grpc_tls_seclevel.yml │ │ ├── speed_up_internal_hooking_mechanism.yml │ │ ├── speed_up_router.yml │ │ ├── tracing-pdk-short-trace-ids.yml │ │ ├── update-ai-proxy-telemetry.yml │ │ └── wasm-bundled-filters.yml │ └── migration_of_ai_proxy_plugin.yml └── verify-prs ├── kong-3.8.0-0.rockspec ├── kong-admin-api.yml ├── kong.conf.default ├── kong ├── admin_gui │ ├── init.lua │ └── utils.lua ├── api │ ├── api_helpers.lua │ ├── arguments.lua │ ├── endpoints.lua │ ├── init.lua │ └── routes │ │ ├── cache.lua │ │ ├── certificates.lua │ │ ├── clustering.lua │ │ ├── config.lua │ │ ├── consumers.lua │ │ ├── debug.lua │ │ ├── filter_chains.lua │ │ ├── health.lua │ │ ├── kong.lua │ │ ├── plugins.lua │ │ ├── snis.lua │ │ ├── tags.lua │ │ ├── targets.lua │ │ └── upstreams.lua ├── cache │ ├── init.lua │ └── warmup.lua ├── cluster_events │ ├── init.lua │ └── strategies │ │ ├── off.lua │ │ └── postgres.lua ├── clustering │ ├── compat │ │ ├── checkers.lua │ │ ├── init.lua │ │ ├── removed_fields.lua │ │ └── version.lua │ ├── config_helper.lua │ ├── control_plane.lua │ ├── data_plane.lua │ ├── events.lua │ ├── init.lua │ ├── rpc │ │ ├── callbacks.lua │ │ ├── concentrator.lua │ │ ├── future.lua │ │ ├── json_rpc_v2.lua │ │ ├── manager.lua │ │ ├── queue.lua │ │ ├── socket.lua │ │ └── utils.lua │ ├── services │ │ └── debug.lua │ ├── tls.lua │ └── utils.lua ├── cmd │ ├── check.lua │ ├── config.lua │ ├── health.lua │ ├── hybrid.lua │ ├── init.lua │ ├── migrations.lua │ ├── prepare.lua │ ├── quit.lua │ ├── reload.lua │ ├── restart.lua │ ├── roar.lua │ ├── start.lua │ ├── stop.lua │ ├── utils │ │ ├── env.lua │ │ ├── inject_confs.lua │ │ ├── kill.lua │ │ ├── log.lua │ │ ├── migrations.lua │ │ ├── nginx_signals.lua │ │ ├── prefix_handler.lua │ │ ├── process_secrets.lua │ │ └── tty.lua │ ├── vault.lua │ └── version.lua ├── concurrency.lua ├── conf_loader │ ├── constants.lua │ ├── init.lua │ ├── listeners.lua │ └── parse.lua ├── constants.lua ├── db │ ├── dao │ │ ├── ca_certificates.lua │ │ ├── certificates.lua │ │ ├── init.lua │ │ ├── key_sets.lua │ │ ├── keys.lua │ │ ├── plugins.lua │ │ ├── services.lua │ │ ├── snis.lua │ │ ├── tags.lua │ │ ├── targets.lua │ │ ├── vaults.lua │ │ └── workspaces.lua │ ├── declarative │ │ ├── export.lua │ │ ├── import.lua │ │ ├── init.lua │ │ ├── marshaller.lua │ │ └── migrations │ │ │ ├── init.lua │ │ │ └── route_path.lua │ ├── errors.lua │ ├── init.lua │ ├── iteration.lua │ ├── migrations │ │ ├── core │ │ │ ├── 000_base.lua │ │ │ ├── 003_100_to_110.lua │ │ │ ├── 004_110_to_120.lua │ │ │ ├── 005_120_to_130.lua │ │ │ ├── 006_130_to_140.lua │ │ │ ├── 007_140_to_150.lua │ │ │ ├── 008_150_to_200.lua │ │ │ ├── 009_200_to_210.lua │ │ │ ├── 010_210_to_211.lua │ │ │ ├── 011_212_to_213.lua │ │ │ ├── 012_213_to_220.lua │ │ │ ├── 013_220_to_230.lua │ │ │ ├── 014_230_to_270.lua │ │ │ ├── 015_270_to_280.lua │ │ │ ├── 016_280_to_300.lua │ │ │ ├── 017_300_to_310.lua │ │ │ ├── 018_310_to_320.lua │ │ │ ├── 019_320_to_330.lua │ │ │ ├── 020_330_to_340.lua │ │ │ ├── 021_340_to_350.lua │ │ │ ├── 022_350_to_360.lua │ │ │ ├── 023_360_to_370.lua │ │ │ └── init.lua │ │ ├── migrate_path_280_300.lua │ │ ├── operations │ │ │ ├── 200_to_210.lua │ │ │ ├── 212_to_213.lua │ │ │ ├── 280_to_300.lua │ │ │ └── 331_to_332.lua │ │ ├── state.lua │ │ └── subsystems.lua │ ├── schema │ │ ├── entities │ │ │ ├── ca_certificates.lua │ │ │ ├── certificates.lua │ │ │ ├── clustering_data_planes.lua │ │ │ ├── consumers.lua │ │ │ ├── filter_chains.lua │ │ │ ├── key_sets.lua │ │ │ ├── keys.lua │ │ │ ├── parameters.lua │ │ │ ├── plugins.lua │ │ │ ├── routes.lua │ │ │ ├── routes_subschemas.lua │ │ │ ├── services.lua │ │ │ ├── snis.lua │ │ │ ├── tags.lua │ │ │ ├── targets.lua │ │ │ ├── upstreams.lua │ │ │ ├── vaults.lua │ │ │ └── workspaces.lua │ │ ├── entity.lua │ │ ├── init.lua │ │ ├── json.lua │ │ ├── metaschema.lua │ │ ├── others │ │ │ ├── declarative_config.lua │ │ │ └── migrations.lua │ │ ├── plugin_loader.lua │ │ ├── topological_sort.lua │ │ ├── typedefs.lua │ │ └── vault_loader.lua │ ├── strategies │ │ ├── connector.lua │ │ ├── init.lua │ │ ├── off │ │ │ ├── connector.lua │ │ │ ├── init.lua │ │ │ └── tags.lua │ │ └── postgres │ │ │ ├── connector.lua │ │ │ ├── init.lua │ │ │ ├── plugins.lua │ │ │ ├── services.lua │ │ │ └── tags.lua │ └── utils.lua ├── deprecation.lua ├── dynamic_hook │ ├── README.md │ └── init.lua ├── error_handlers.lua ├── global.lua ├── globalpatches.lua ├── hooks.lua ├── include │ ├── kong │ │ ├── model │ │ │ ├── ca_certificate.proto │ │ │ ├── certificate.proto │ │ │ ├── config.proto │ │ │ ├── consumer.proto │ │ │ ├── parameter.proto │ │ │ ├── plugin.proto │ │ │ ├── plugin_entities.proto │ │ │ ├── route.proto │ │ │ ├── service.proto │ │ │ ├── sni.proto │ │ │ ├── target.proto │ │ │ ├── upstream.proto │ │ │ └── workspace.proto │ │ └── pluginsocket.proto │ └── opentelemetry │ │ └── proto │ │ ├── collector │ │ └── trace │ │ │ └── v1 │ │ │ └── trace_service.proto │ │ ├── common │ │ └── v1 │ │ │ └── common.proto │ │ ├── resource │ │ └── v1 │ │ │ └── resource.proto │ │ └── trace │ │ └── v1 │ │ └── trace.proto ├── init.lua ├── llm │ ├── drivers │ │ ├── anthropic.lua │ │ ├── azure.lua │ │ ├── cohere.lua │ │ ├── llama2.lua │ │ ├── mistral.lua │ │ ├── openai.lua │ │ └── shared.lua │ └── init.lua ├── meta.lua ├── pdk │ ├── client.lua │ ├── client │ │ └── tls.lua │ ├── cluster.lua │ ├── ctx.lua │ ├── init.lua │ ├── ip.lua │ ├── log.lua │ ├── nginx.lua │ ├── node.lua │ ├── plugin.lua │ ├── private │ │ ├── checks.lua │ │ ├── node.lua │ │ └── phases.lua │ ├── request.lua │ ├── response.lua │ ├── router.lua │ ├── service.lua │ ├── service │ │ ├── request.lua │ │ └── response.lua │ ├── table.lua │ ├── tracing.lua │ └── vault.lua ├── plugins │ ├── acl │ │ ├── acls.lua │ │ ├── api.lua │ │ ├── daos.lua │ │ ├── groups.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_acl.lua │ │ │ ├── 002_130_to_140.lua │ │ │ ├── 003_200_to_210.lua │ │ │ ├── 004_212_to_213.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── acme │ │ ├── api.lua │ │ ├── client.lua │ │ ├── clustering │ │ │ └── compat │ │ │ │ └── redis_translation.lua │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_acme.lua │ │ │ ├── 001_280_to_300.lua │ │ │ ├── 002_320_to_330.lua │ │ │ ├── 003_350_to_360.lua │ │ │ └── init.lua │ │ ├── reserved_words.lua │ │ ├── schema.lua │ │ └── storage │ │ │ ├── config_adapters │ │ │ ├── init.lua │ │ │ └── redis.lua │ │ │ └── kong.lua │ ├── ai-prompt-decorator │ │ ├── handler.lua │ │ └── schema.lua │ ├── ai-prompt-guard │ │ ├── handler.lua │ │ └── schema.lua │ ├── ai-prompt-template │ │ ├── handler.lua │ │ ├── schema.lua │ │ └── templater.lua │ ├── ai-proxy │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_360_to_370.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── ai-request-transformer │ │ ├── handler.lua │ │ └── schema.lua │ ├── ai-response-transformer │ │ ├── handler.lua │ │ └── schema.lua │ ├── aws-lambda │ │ ├── handler.lua │ │ ├── request-util.lua │ │ └── schema.lua │ ├── azure-functions │ │ ├── handler.lua │ │ └── schema.lua │ ├── basic-auth │ │ ├── access.lua │ │ ├── crypto.lua │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_basic_auth.lua │ │ │ ├── 002_130_to_140.lua │ │ │ ├── 003_200_to_210.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── bot-detection │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_200_to_210.lua │ │ │ └── init.lua │ │ ├── rules.lua │ │ └── schema.lua │ ├── correlation-id │ │ ├── handler.lua │ │ └── schema.lua │ ├── cors │ │ ├── handler.lua │ │ └── schema.lua │ ├── datadog │ │ ├── handler.lua │ │ ├── schema.lua │ │ └── statsd_logger.lua │ ├── file-log │ │ ├── handler.lua │ │ └── schema.lua │ ├── grpc-gateway │ │ ├── deco.lua │ │ ├── handler.lua │ │ └── schema.lua │ ├── grpc-web │ │ ├── deco.lua │ │ ├── handler.lua │ │ └── schema.lua │ ├── hmac-auth │ │ ├── access.lua │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_hmac_auth.lua │ │ │ ├── 002_130_to_140.lua │ │ │ ├── 003_200_to_210.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── http-log │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_280_to_300.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── ip-restriction │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_200_to_210.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── jwt │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── jwt_parser.lua │ │ ├── migrations │ │ │ ├── 000_base_jwt.lua │ │ │ ├── 002_130_to_140.lua │ │ │ ├── 003_200_to_210.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── key-auth │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_key_auth.lua │ │ │ ├── 002_130_to_140.lua │ │ │ ├── 003_200_to_210.lua │ │ │ ├── 004_320_to_330.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── ldap-auth │ │ ├── access.lua │ │ ├── asn1.lua │ │ ├── handler.lua │ │ ├── ldap.lua │ │ └── schema.lua │ ├── loggly │ │ ├── handler.lua │ │ └── schema.lua │ ├── oauth2 │ │ ├── access.lua │ │ ├── daos.lua │ │ ├── daos │ │ │ └── oauth2_tokens.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_oauth2.lua │ │ │ ├── 003_130_to_140.lua │ │ │ ├── 004_200_to_210.lua │ │ │ ├── 005_210_to_211.lua │ │ │ ├── 006_320_to_330.lua │ │ │ ├── 007_320_to_330.lua │ │ │ └── init.lua │ │ ├── schema.lua │ │ └── secret.lua │ ├── opentelemetry │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_331_to_332.lua │ │ │ └── init.lua │ │ ├── otlp.lua │ │ ├── proto.lua │ │ └── schema.lua │ ├── post-function │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_280_to_300.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── pre-function │ │ ├── _handler.lua │ │ ├── _schema.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 001_280_to_300.lua │ │ │ ├── _001_280_to_300.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── prometheus │ │ ├── api.lua │ │ ├── exporter.lua │ │ ├── grafana │ │ │ ├── README.md │ │ │ └── kong-official.json │ │ ├── handler.lua │ │ ├── prometheus.lua │ │ ├── schema.lua │ │ ├── serve.lua │ │ └── status_api.lua │ ├── proxy-cache │ │ ├── api.lua │ │ ├── cache_key.lua │ │ ├── clustering │ │ │ └── compat │ │ │ │ └── response_headers_translation.lua │ │ ├── handler.lua │ │ ├── schema.lua │ │ └── strategies │ │ │ ├── init.lua │ │ │ └── memory.lua │ ├── rate-limiting │ │ ├── clustering │ │ │ └── compat │ │ │ │ └── redis_translation.lua │ │ ├── daos.lua │ │ ├── expiration.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── 000_base_rate_limiting.lua │ │ │ ├── 003_10_to_112.lua │ │ │ ├── 004_200_to_210.lua │ │ │ ├── 005_320_to_330.lua │ │ │ ├── 006_350_to_360.lua │ │ │ └── init.lua │ │ ├── policies │ │ │ ├── cluster.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── request-size-limiting │ │ ├── handler.lua │ │ └── schema.lua │ ├── request-termination │ │ ├── handler.lua │ │ └── schema.lua │ ├── request-transformer │ │ ├── access.lua │ │ ├── handler.lua │ │ ├── migrations │ │ │ ├── common.lua │ │ │ └── postgres.lua │ │ └── schema.lua │ ├── response-ratelimiting │ │ ├── access.lua │ │ ├── clustering │ │ │ └── compat │ │ │ │ └── redis_translation.lua │ │ ├── handler.lua │ │ ├── header_filter.lua │ │ ├── log.lua │ │ ├── migrations │ │ │ ├── 000_base_response_rate_limiting.lua │ │ │ ├── 001_350_to_360.lua │ │ │ └── init.lua │ │ ├── policies │ │ │ ├── cluster.lua │ │ │ └── init.lua │ │ └── schema.lua │ ├── response-transformer │ │ ├── body_transformer.lua │ │ ├── handler.lua │ │ ├── header_transformer.lua │ │ └── schema.lua │ ├── session │ │ ├── access.lua │ │ ├── daos.lua │ │ ├── handler.lua │ │ ├── header_filter.lua │ │ ├── migrations │ │ │ ├── 000_base_session.lua │ │ │ ├── 001_add_ttl_index.lua │ │ │ ├── 002_320_to_330.lua │ │ │ └── init.lua │ │ ├── schema.lua │ │ ├── session.lua │ │ └── storage │ │ │ └── kong.lua │ ├── standard-webhooks │ │ ├── handler.lua │ │ ├── internal.lua │ │ └── schema.lua │ ├── statsd │ │ ├── constants.lua │ │ ├── handler.lua │ │ ├── log.lua │ │ ├── schema.lua │ │ └── statsd_logger.lua │ ├── syslog │ │ ├── handler.lua │ │ └── schema.lua │ ├── tcp-log │ │ ├── handler.lua │ │ └── schema.lua │ ├── udp-log │ │ ├── handler.lua │ │ └── schema.lua │ └── zipkin │ │ ├── README.md │ │ ├── handler.lua │ │ ├── reporter.lua │ │ ├── request_tags.lua │ │ ├── schema.lua │ │ └── span.lua ├── reports.lua ├── resty │ ├── ctx.lua │ ├── dns │ │ ├── client.lua │ │ └── utils.lua │ └── mlcache │ │ ├── init.lua │ │ └── ipc.lua ├── router │ ├── atc.lua │ ├── compat.lua │ ├── expressions.lua │ ├── fields.lua │ ├── init.lua │ ├── traditional.lua │ ├── transform.lua │ └── utils.lua ├── runloop │ ├── balancer │ │ ├── balancers.lua │ │ ├── consistent_hashing.lua │ │ ├── healthcheckers.lua │ │ ├── init.lua │ │ ├── latency.lua │ │ ├── least_connections.lua │ │ ├── round_robin.lua │ │ ├── targets.lua │ │ └── upstreams.lua │ ├── certificate.lua │ ├── events.lua │ ├── handler.lua │ ├── log_level.lua │ ├── plugin_servers │ │ ├── init.lua │ │ ├── mp_rpc.lua │ │ ├── pb_rpc.lua │ │ └── process.lua │ ├── plugins_iterator.lua │ ├── upstream_ssl.lua │ ├── wasm.lua │ └── wasm │ │ └── properties.lua ├── status │ ├── init.lua │ └── ready.lua ├── templates │ ├── kong_defaults.lua │ ├── kong_yml.lua │ ├── nginx.lua │ ├── nginx_inject.lua │ ├── nginx_kong.lua │ ├── nginx_kong_gui_include.lua │ ├── nginx_kong_inject.lua │ ├── nginx_kong_stream.lua │ └── nginx_kong_stream_inject.lua ├── timing │ ├── context.lua │ ├── hooks │ │ ├── dns.lua │ │ ├── http.lua │ │ ├── init.lua │ │ ├── redis.lua │ │ └── socket.lua │ └── init.lua ├── tools │ ├── cjson.lua │ ├── dns.lua │ ├── emmy_debugger.lua │ ├── grpc.lua │ ├── gzip.lua │ ├── http.lua │ ├── ip.lua │ ├── kong-lua-sandbox.lua │ ├── mime_type.lua │ ├── module.lua │ ├── protobuf.lua │ ├── queue.lua │ ├── queue_schema.lua │ ├── rand.lua │ ├── redis │ │ └── schema.lua │ ├── request_aware_table.lua │ ├── sandbox.lua │ ├── sha256.lua │ ├── stream_api.lua │ ├── string.lua │ ├── system.lua │ ├── table.lua │ ├── time.lua │ ├── timestamp.lua │ ├── uri.lua │ ├── utils.lua │ ├── uuid.lua │ └── yield.lua ├── tracing │ ├── instrumentation.lua │ ├── propagation │ │ ├── extractors │ │ │ ├── _base.lua │ │ │ ├── aws.lua │ │ │ ├── b3.lua │ │ │ ├── datadog.lua │ │ │ ├── gcp.lua │ │ │ ├── jaeger.lua │ │ │ ├── ot.lua │ │ │ └── w3c.lua │ │ ├── init.lua │ │ ├── injectors │ │ │ ├── _base.lua │ │ │ ├── aws.lua │ │ │ ├── b3-single.lua │ │ │ ├── b3.lua │ │ │ ├── datadog.lua │ │ │ ├── gcp.lua │ │ │ ├── jaeger.lua │ │ │ ├── ot.lua │ │ │ └── w3c.lua │ │ ├── schema.lua │ │ └── utils.lua │ ├── request_id.lua │ └── tracing_context.lua ├── vaults │ └── env │ │ ├── init.lua │ │ └── schema.lua └── workspaces │ └── init.lua ├── scripts ├── autodoc ├── build-wasm-test-filters.sh ├── changelog-helper.lua ├── check-labeler.pl ├── check_spec_files_spelling.sh ├── dependency_services │ ├── 00-create-pg-db.sh │ ├── common.sh │ ├── docker-compose-test-services.yml │ ├── up.fish │ └── up.sh ├── explain_manifest │ ├── .gitignore │ ├── config.py │ ├── docker_image_filelist.txt │ ├── expect.py │ ├── explain.py │ ├── filelist.txt │ ├── fixtures │ │ ├── amazonlinux-2-amd64.txt │ │ ├── amazonlinux-2023-amd64.txt │ │ ├── amazonlinux-2023-arm64.txt │ │ ├── debian-10-amd64.txt │ │ ├── debian-11-amd64.txt │ │ ├── debian-12-amd64.txt │ │ ├── el7-amd64.txt │ │ ├── el8-amd64.txt │ │ ├── el9-amd64.txt │ │ ├── el9-arm64.txt │ │ ├── ubuntu-20.04-amd64.txt │ │ ├── ubuntu-22.04-amd64.txt │ │ └── ubuntu-22.04-arm64.txt │ ├── main.py │ ├── requirements.txt │ └── suites.py ├── grep-kong-version.sh ├── make-release ├── release-kong.sh ├── release-lib.sh ├── update-copyright ├── upgrade-tests │ ├── docker-compose.yml │ ├── source-versions │ └── test-upgrade-path.sh └── validate-rockspec ├── spec ├── 01-unit │ ├── 01-db │ │ ├── 01-schema │ │ │ ├── 01-schema_spec.lua │ │ │ ├── 02-metaschema_spec.lua │ │ │ ├── 03-typedefs_spec.lua │ │ │ ├── 04-entities_schema_spec.lua │ │ │ ├── 05-services_spec.lua │ │ │ ├── 06-routes_spec.lua │ │ │ ├── 07-plugins_spec.lua │ │ │ ├── 08-targets_spec.lua │ │ │ ├── 09-upstreams_spec.lua │ │ │ ├── 10-migrations_spec.lua │ │ │ ├── 11-declarative_config │ │ │ │ ├── 01-validate_spec.lua │ │ │ │ ├── 02-process_auto_fields_spec.lua │ │ │ │ ├── 03-flatten_spec.lua │ │ │ │ └── 04-on-the-fly-migration_spec.lua │ │ │ ├── 11-snis_spec.lua │ │ │ ├── 12-topological_sort_spec.lua │ │ │ ├── 13-cluster_status_spec.lua │ │ │ ├── 14-consumers_spec.lua │ │ │ └── 15-workspaces_spec.lua │ │ ├── 02-db-errors_spec.lua │ │ ├── 03-arguments_spec.lua │ │ ├── 04-dao_spec.lua │ │ ├── 06-postgres_spec.lua │ │ ├── 07-dao │ │ │ ├── 01-plugins_spec.lua │ │ │ └── 02-tags_spec.lua │ │ ├── 07-db_spec.lua │ │ ├── 08-cache_warmup_spec.lua │ │ ├── 09-no_broadcast_crud_event_spec.lua │ │ ├── 10-declarative_spec.lua │ │ └── 11-declarative_lmdb_spec.lua │ ├── 02-rockspec_meta_spec.lua │ ├── 03-conf_loader_spec.lua │ ├── 04-prefix_handler_spec.lua │ ├── 05-utils_spec.lua │ ├── 06-timestamp_spec.lua │ ├── 07-api_helpers_spec.lua │ ├── 08-router_spec.lua │ ├── 09-balancer │ │ ├── 01-generic_spec.lua │ │ ├── 02-least_connections_spec.lua │ │ ├── 03-consistent_hashing_spec.lua │ │ ├── 04-round_robin_spec.lua │ │ ├── 05-worker_consistency_spec.lua │ │ └── 06-latency_spec.lua │ ├── 10-log_serializer_spec.lua │ ├── 11-reports_spec.lua │ ├── 12-plugins_order_spec.lua │ ├── 13-plugins_version_spec.lua │ ├── 14-dns_spec.lua │ ├── 16-runloop_handler_spec.lua │ ├── 17-concurrency_spec.lua │ ├── 18-tools_uri_spec.lua │ ├── 19-hooks_spec.lua │ ├── 19-hybrid │ │ ├── 02-clustering_spec.lua │ │ └── 03-compat_spec.lua │ ├── 20-sandbox_spec.lua │ ├── 21-dns-client │ │ ├── 01-utils_spec.lua │ │ ├── 02-client_spec.lua │ │ └── 03-client_cache_spec.lua │ ├── 22-grpc-utils_spec.lua │ ├── 23-vaults_spec.lua │ ├── 24-runloop_certificate_spec.lua │ ├── 25-msgpack_rpc_spec.lua │ ├── 26-mime-type_spec.lua │ ├── 26-tracing │ │ ├── 01-tracer_pdk_spec.lua │ │ ├── 02-propagation_strategies_spec.lua │ │ ├── 03-propagation_module_spec.lua │ │ └── 04-request-id_spec.lua │ ├── 27-queue_spec.lua │ ├── 28-inject_confs_spec.lua │ ├── 28-plugins-iterator │ │ ├── 01-compound_key_spec.lua │ │ └── 02-lookup_cfg_spec.lua │ ├── 29-admin_gui │ │ ├── 01-admin_gui_spec.lua │ │ └── 02-admin_gui_template_spec.lua │ ├── 29-lua_cjson_large_str_spec.lua │ └── 30-standardized_redis_config_spec.lua ├── 02-integration │ ├── 01-helpers │ │ ├── 01-helpers_spec.lua │ │ ├── 02-blueprints_spec.lua │ │ ├── 03-http_mock_spec.lua │ │ └── 04-redis_helper_spec.lua │ ├── 02-cmd │ │ ├── 01-cmds_spec.lua │ │ ├── 02-start_stop_spec.lua │ │ ├── 03-reload_spec.lua │ │ ├── 04-version_spec.lua │ │ ├── 05-check_spec.lua │ │ ├── 06-restart_spec.lua │ │ ├── 07-health_spec.lua │ │ ├── 08-quit_spec.lua │ │ ├── 09-prepare_spec.lua │ │ ├── 10-migrations_spec.lua │ │ ├── 11-config_spec.lua │ │ ├── 12-hybrid_spec.lua │ │ ├── 13-signals_spec.lua │ │ ├── 14-vault_spec.lua │ │ └── 15-utils_spec.lua │ ├── 03-db │ │ ├── 01-db_spec.lua │ │ ├── 02-db_core_entities_spec.lua │ │ ├── 03-plugins_spec.lua │ │ ├── 04-db_cluster_mutex_spec.lua │ │ ├── 06-migrations_state_spec.lua │ │ ├── 07-tags_spec.lua │ │ ├── 08-declarative_spec.lua │ │ ├── 09-query-semaphore_spec.lua │ │ ├── 10-db_unique_foreign_spec.lua │ │ ├── 11-db_transformations_spec.lua │ │ ├── 11-postgres-ro_spec.lua │ │ ├── 12-dao_hooks_spec.lua │ │ ├── 13-cluster_status_spec.lua │ │ ├── 14-dao_spec.lua │ │ ├── 15-connection_pool_spec.lua │ │ ├── 18-keys_spec.lua │ │ ├── 19-key-sets_spec.lua │ │ ├── 20-ttl-cleanup_spec.lua │ │ ├── 21-services_spec.lua │ │ └── 22-ca_certificates_spec.lua │ ├── 04-admin_api │ │ ├── 01-admin_api_spec.lua │ │ ├── 02-kong_routes_spec.lua │ │ ├── 03-consumers_routes_spec.lua │ │ ├── 04-plugins_routes_spec.lua │ │ ├── 05-cache_routes_spec.lua │ │ ├── 06-certificates_routes_spec.lua │ │ ├── 07-upstreams_routes_spec.lua │ │ ├── 08-targets_routes_spec.lua │ │ ├── 09-routes_routes_spec.lua │ │ ├── 10-services_routes_spec.lua │ │ ├── 11-reports_spec.lua │ │ ├── 12-plugins-conf_spec.lua │ │ ├── 13-plugin-endpoints_spec.lua │ │ ├── 14-tags_spec.lua │ │ ├── 15-off_spec.lua │ │ ├── 16-ca_certificates_routes_spec.lua │ │ ├── 17-foreign-entity_spec.lua │ │ ├── 19-vaults_spec.lua │ │ ├── 20-timers_spec.lua │ │ ├── 21-admin-api-keys_spec.lua │ │ ├── 21-truncated_arguments_spec.lua │ │ ├── 22-debug_spec.lua │ │ ├── 23-cors_spec.lua │ │ ├── 25-max_safe_integer_spec.lua │ │ └── 25-workspaces_spec.lua │ ├── 05-proxy │ │ ├── 01-proxy_spec.lua │ │ ├── 02-router_spec.lua │ │ ├── 03-upstream_headers_spec.lua │ │ ├── 04-plugins_triggering_spec.lua │ │ ├── 05-dns_spec.lua │ │ ├── 06-ssl_spec.lua │ │ ├── 07-upstream_timeouts_spec.lua │ │ ├── 08-uri_encoding_spec.lua │ │ ├── 09-websockets_spec.lua │ │ ├── 10-balancer │ │ │ ├── 01-healthchecks_spec.lua │ │ │ ├── 02-least-connections_spec.lua │ │ │ ├── 03-consistent-hashing_spec.lua │ │ │ ├── 04-round-robin_spec.lua │ │ │ ├── 05-recreate-request_spec.lua │ │ │ ├── 05-stress.lua │ │ │ ├── 06-stream_spec.lua │ │ │ └── 07-latency_spec.lua │ │ ├── 11-handler_spec.lua │ │ ├── 12-error_default_type_spec.lua │ │ ├── 13-error_handlers_spec.lua │ │ ├── 14-server_tokens_spec.lua │ │ ├── 15-upstream-status-header_spec.lua │ │ ├── 16-custom_nginx_directive_spec.lua │ │ ├── 18-upstream_tls_spec.lua │ │ ├── 19-grpc_proxy_spec.lua │ │ ├── 21-grpc_plugins_triggering_spec.lua │ │ ├── 22-reports_spec.lua │ │ ├── 23-context_spec.lua │ │ ├── 24-buffered_spec.lua │ │ ├── 25-upstream_keepalive_spec.lua │ │ ├── 26-udp_spec.lua │ │ ├── 27-lua-ssl-trusted-cert_spec.lua │ │ ├── 27-unbuffered_spec.lua │ │ ├── 28-stream_plugins_triggering_spec.lua │ │ ├── 29-collect-plugin-errors_spec.lua │ │ ├── 30-max-args_spec.lua │ │ ├── 31-stream_tls_spec.lua │ │ ├── 32-query-params_spec.lua │ │ ├── 33-request-aware-table_spec.lua │ │ ├── 33-request-id-header_spec.lua │ │ └── 34-proxy_with_compress_spec.lua │ ├── 06-invalidations │ │ ├── 01-cluster_events_spec.lua │ │ ├── 02-core_entities_invalidations_spec.lua │ │ ├── 03-plugins_iterator_invalidation_spec.lua │ │ └── 04-balancer_cache_correctness_spec.lua │ ├── 07-sdk │ │ ├── 01-ctx_spec.lua │ │ ├── 02-log_spec.lua │ │ ├── 03-cluster_spec.lua │ │ ├── 04-plugin-config_spec.lua │ │ ├── 05-pdk_spec.lua │ │ └── 06-worker_events_spec.lua │ ├── 08-status_api │ │ ├── 01-core_routes_spec.lua │ │ ├── 02-targets_routes_spec.lua │ │ ├── 03-readiness_endpoint_spec.lua │ │ └── 04-config_spec.lua │ ├── 09-hybrid_mode │ │ ├── 01-sync_spec.lua │ │ ├── 02-start_stop_spec.lua │ │ ├── 03-pki_spec.lua │ │ ├── 04-cp_cluster_sync_spec.lua │ │ ├── 05-ocsp_spec.lua │ │ ├── 08-lazy_export_spec.lua │ │ ├── 09-config-compat_spec.lua │ │ ├── 09-node-id-persistence_spec.lua │ │ ├── 10-forward-proxy_spec.lua │ │ ├── 11-status_spec.lua │ │ └── 12-errors_spec.lua │ ├── 10-go_plugins │ │ └── 01-reports_spec.lua │ ├── 11-dbless │ │ ├── 01-respawn_spec.lua │ │ ├── 02-workers_spec.lua │ │ └── 03-config_persistence_spec.lua │ ├── 12-stream_api │ │ └── 01-stream_api_endpoint_spec.lua │ ├── 13-vaults │ │ ├── 01-vault_spec.lua │ │ ├── 02-env_vault_spec.lua │ │ ├── 03-mock_spec.lua │ │ ├── 04-echo_spec.lua │ │ ├── 05-ttl_spec.lua │ │ ├── 06-refresh-secrets_spec.lua │ │ └── 07-resurrect_spec.lua │ ├── 14-tracing │ │ ├── 01-instrumentations_spec.lua │ │ ├── 02-propagation_spec.lua │ │ ├── 03-tracer-pdk_spec.lua │ │ └── 04-trace-ids-log_spec.lua │ ├── 15-plugins-iterator │ │ ├── 01-precedence_spec.lua │ │ └── 02-correctness_spec.lua │ ├── 16-queues │ │ └── 01-shutdown_spec.lua │ ├── 17-admin_gui │ │ ├── 01-admin-gui-path_spec.lua │ │ ├── 02-log_spec.lua │ │ └── 03-reports_spec.lua │ ├── 18-hybrid_rpc │ │ ├── 01-rpc_spec.lua │ │ ├── 02-log-level_spec.lua │ │ ├── 03-inert_spec.lua │ │ └── 04-concentrator_spec.lua │ ├── 20-wasm │ │ ├── 01-admin-api_spec.lua │ │ ├── 02-db_spec.lua │ │ ├── 03-runtime_spec.lua │ │ ├── 04-proxy-wasm_spec.lua │ │ ├── 05-cache-invalidation_spec.lua │ │ ├── 06-clustering_spec.lua │ │ ├── 07-reports_spec.lua │ │ ├── 08-declarative_spec.lua │ │ └── 09-filter-meta_spec.lua │ ├── 21-request-debug │ │ └── 01-request-debug_spec.lua │ └── 22-ai_plugins │ │ └── 01-reports_spec.lua ├── 03-plugins │ ├── 01-legacy_queue_parameter_warning_spec.lua │ ├── 01-tcp-log │ │ └── 01-tcp-log_spec.lua │ ├── 02-legacy_propagation_parameter_warning_spec.lua │ ├── 02-udp-log │ │ └── 01-udp-log_spec.lua │ ├── 03-http-log │ │ ├── 01-log_spec.lua │ │ ├── 02-schema_spec.lua │ │ ├── 03-schem-vault_spec.lua │ │ └── 04-legacy_queue_sharing_spec.lua │ ├── 04-file-log │ │ ├── 01-log_spec.lua │ │ └── 02-schema_spec.lua │ ├── 05-syslog │ │ └── 01-log_spec.lua │ ├── 06-statsd │ │ ├── 01-log_spec.lua │ │ ├── 02-schema_spec.lua │ │ └── 03-allow_status_codes_spec.lua │ ├── 07-loggly │ │ └── 01-log_spec.lua │ ├── 08-datadog │ │ ├── 01-log_spec.lua │ │ └── 02-schema_spec.lua │ ├── 09-key-auth │ │ ├── 01-api_spec.lua │ │ ├── 02-access_spec.lua │ │ ├── 03-invalidations_spec.lua │ │ └── 04-hybrid_mode_spec.lua │ ├── 10-basic-auth │ │ ├── 01-crypto_spec.lua │ │ ├── 02-api_spec.lua │ │ ├── 03-access_spec.lua │ │ ├── 04-invalidations_spec.lua │ │ └── 05-declarative_spec.lua │ ├── 11-correlation-id │ │ └── 01-access_spec.lua │ ├── 12-request-size-limiting │ │ └── 01-access_spec.lua │ ├── 13-cors │ │ ├── 01-access_spec.lua │ │ └── 02-schema_spec.lua │ ├── 14-request-termination │ │ ├── 01-schema_spec.lua │ │ ├── 02-access_spec.lua │ │ └── 03-integration_spec.lua │ ├── 15-response-transformer │ │ ├── 01-header_transformer_spec.lua │ │ ├── 02-body_transformer_spec.lua │ │ ├── 03-api_spec.lua │ │ ├── 04-filter_spec.lua │ │ └── 05-big_response_body_spec.lua │ ├── 16-jwt │ │ ├── 01-jwt_parser_spec.lua │ │ ├── 02-api_spec.lua │ │ ├── 03-access_spec.lua │ │ ├── 04-invalidations_spec.lua │ │ ├── 06-schema_spec.lua │ │ └── fixtures.lua │ ├── 17-ip-restriction │ │ ├── 01-schema_spec.lua │ │ └── 02-access_spec.lua │ ├── 18-acl │ │ ├── 01-api_spec.lua │ │ ├── 02-access_spec.lua │ │ └── 03-invalidations_spec.lua │ ├── 19-hmac-auth │ │ ├── 01-schema_spec.lua │ │ ├── 02-api_spec.lua │ │ ├── 03-access_spec.lua │ │ └── 04-invalidations_spec.lua │ ├── 20-ldap-auth │ │ ├── 01-access_spec.lua │ │ ├── 02-invalidations_spec.lua │ │ ├── 02-schema_spec.lua │ │ └── 03-decode_spec.lua │ ├── 21-bot-detection │ │ ├── 01-access_spec.lua │ │ ├── 02-invalidations_spec.lua │ │ └── 03-api_spec.lua │ ├── 23-rate-limiting │ │ ├── 01-schema_spec.lua │ │ ├── 02-policies_spec.lua │ │ ├── 03-api_spec.lua │ │ ├── 04-access_spec.lua │ │ ├── 05-integration_spec.lua │ │ └── 06-shorthand_fields_spec.lua │ ├── 24-response-rate-limiting │ │ ├── 01-schema_spec.lua │ │ ├── 02-policies_spec.lua │ │ ├── 03-api_spec.lua │ │ ├── 04-access_spec.lua │ │ ├── 05-integration_spec.lua │ │ └── 06-shorthand_fields_spec.lua │ ├── 25-oauth2 │ │ ├── 01-schema_spec.lua │ │ ├── 02-api_spec.lua │ │ ├── 03-access_spec.lua │ │ ├── 04-invalidations_spec.lua │ │ └── 05-kdf_spec.lua │ ├── 26-prometheus │ │ ├── 01-api_spec.lua │ │ ├── 02-access_spec.lua │ │ ├── 03-custom-serve_spec.lua │ │ ├── 04-status_api_spec.lua │ │ ├── 05-metrics_spec.lua │ │ ├── 06-hybrid-mode_metrics_spec.lua │ │ ├── 07-optional_fields_spec.lua │ │ └── 08-unit_spec.lua │ ├── 27-aws-lambda │ │ ├── 02-schema_spec.lua │ │ ├── 05-aws-serializer_spec.lua │ │ ├── 06-request-util_spec.lua │ │ ├── 08-sam-integration_spec.lua │ │ └── 99-access_spec.lua │ ├── 28-grpc-gateway │ │ └── 01-proxy_spec.lua │ ├── 29-acme │ │ ├── 01-client_spec.lua │ │ ├── 02-kong_storage_spec.lua │ │ ├── 03-access_spec.lua │ │ ├── 04-schema_spec.lua │ │ ├── 05-redis_storage_spec.lua │ │ ├── 06-hybrid_mode_spec.lua │ │ └── 07-shorthand_fields_spec.lua │ ├── 30-session │ │ ├── 01-access_spec.lua │ │ ├── 02-kong_storage_adapter_spec.lua │ │ └── 03-session_spec.lua │ ├── 31-proxy-cache │ │ ├── 01-schema_spec.lua │ │ ├── 02-access_spec.lua │ │ ├── 03-api_spec.lua │ │ ├── 04-invalidations_spec.lua │ │ └── 05-cache_key_spec.lua │ ├── 32-grpc-web │ │ └── 01-proxy_spec.lua │ ├── 33-serverless-functions │ │ ├── 01-schema_spec.lua │ │ ├── 02-access_spec.lua │ │ ├── 03-dbless_spec.lua │ │ └── 04-phases_spec.lua │ ├── 34-zipkin │ │ ├── request_tags_spec.lua │ │ ├── schema_spec.lua │ │ ├── zipkin_no_endpoint_spec.lua │ │ ├── zipkin_queue_spec.lua │ │ └── zipkin_spec.lua │ ├── 35-azure-functions │ │ └── 01-access_spec.lua │ ├── 36-request-transformer │ │ ├── 01-schema_spec.lua │ │ ├── 02-access_spec.lua │ │ └── 03-api_spec.lua │ ├── 37-opentelemetry │ │ ├── 01-otlp_spec.lua │ │ ├── 02-schema_spec.lua │ │ ├── 03-propagation_spec.lua │ │ ├── 04-exporter_spec.lua │ │ ├── 05-otelcol_spec.lua │ │ └── 06-regression_spec.lua │ ├── 38-ai-proxy │ │ ├── 00-config_spec.lua │ │ ├── 01-unit_spec.lua │ │ ├── 02-openai_integration_spec.lua │ │ ├── 03-anthropic_integration_spec.lua │ │ ├── 04-cohere_integration_spec.lua │ │ ├── 05-azure_integration_spec.lua │ │ ├── 06-mistral_integration_spec.lua │ │ ├── 07-llama2_integration_spec.lua │ │ ├── 08-encoding_integration_spec.lua │ │ ├── 09-streaming_integration_spec.lua │ │ ├── json-schema.json │ │ └── oas.yaml │ ├── 39-ai-request-transformer │ │ ├── 00-config_spec.lua │ │ ├── 01-transformer_spec.lua │ │ └── 02-integration_spec.lua │ ├── 39-reconfiguration-completion │ │ ├── 01-access_spec.lua │ │ └── 02-helper_spec.lua │ ├── 40-ai-response-transformer │ │ ├── 00-config_spec.lua │ │ ├── 01-transformer_spec.lua │ │ └── 02-integration_spec.lua │ ├── 41-ai-prompt-decorator │ │ ├── 00-config_spec.lua │ │ ├── 01-unit_spec.lua │ │ └── 02-integration_spec.lua │ ├── 42-ai-prompt-guard │ │ ├── 00-config_spec.lua │ │ ├── 01-unit_spec.lua │ │ └── 02-integration_spec.lua │ ├── 43-ai-prompt-template │ │ ├── 01-unit_spec.lua │ │ └── 02-integration_spec.lua │ └── 44-standard-webhooks │ │ ├── 01-unit_spec.lua │ │ └── 02-integration_spec.lua ├── 04-perf │ ├── 01-rps │ │ ├── 01-simple_spec.lua │ │ ├── 02-balancer_spec.lua │ │ ├── 03-plugin_iterator_spec.lua │ │ ├── 04-simple_hybrid_spec.lua │ │ ├── 05-prometheus.lua │ │ ├── 06-core_entities_crud_spec.lua │ │ └── 07-upstream_lock_regression_spec.lua │ ├── 02-flamegraph │ │ ├── 01-simple_spec.lua │ │ ├── 03-plugin_iterator_spec.lua │ │ ├── 05-prometheus.lua │ │ └── 07-upstream_lock_regression_spec.lua │ └── 99-teardown │ │ └── 01-teardown_spec.lua ├── 05-migration │ ├── db │ │ └── migrations │ │ │ └── core │ │ │ ├── 016_280_to_300_spec.lua │ │ │ ├── 017_300_to_310_spec.lua │ │ │ ├── 018_310_to_320_spec.lua │ │ │ ├── 019_320_to_330_spec.lua │ │ │ ├── 020_330_to_340_spec.lua │ │ │ ├── 021_340_to_350_spec.lua │ │ │ ├── 022_350_to_360_spec.lua │ │ │ └── 023_360_to_370_spec.lua │ └── plugins │ │ ├── acme │ │ └── migrations │ │ │ ├── 001_280_to_300_spec.lua │ │ │ ├── 002_320_to_330_spec.lua │ │ │ └── 003_350_to_360_spec.lua │ │ ├── ai-proxy │ │ └── migrations │ │ │ └── 001_360_to_370_spec.lua │ │ ├── http-log │ │ └── migrations │ │ │ └── 001_280_to_300_spec.lua │ │ ├── key-auth │ │ └── migrations │ │ │ └── 004_320_to_330_spec.lua │ │ ├── oauth2 │ │ └── migrations │ │ │ ├── 006_320_to_330_spec.lua │ │ │ └── 007_320_to_330_spec.lua │ │ ├── opentelemetry │ │ └── migrations │ │ │ └── 001_331_to_332_spec.lua │ │ ├── post-function │ │ └── migrations │ │ │ └── 001_280_to_300_spec.lua │ │ ├── pre-function │ │ └── migrations │ │ │ └── 001_280_to_300_spec.lua │ │ ├── rate-limiting │ │ └── migrations │ │ │ ├── 005_320_to_330_spec.lua │ │ │ └── 006_350_to_360_spec.lua │ │ ├── response-ratelimiting │ │ └── migrations │ │ │ └── 001_350_to_360_spec.lua │ │ └── session │ │ └── migrations │ │ └── 002_320_to_330_spec.lua ├── README.md ├── busted-ci-helper.lua ├── config.ld ├── fixtures │ ├── 1.2_custom_nginx.template │ ├── admin_api.lua │ ├── ai-proxy │ │ ├── anthropic │ │ │ ├── llm-v1-chat │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good-stream.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── good_own_model.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── bad_upstream_response.json │ │ │ │ │ ├── good.json │ │ │ │ │ ├── internal_server_error.html │ │ │ │ │ ├── malformed_usage_response.json │ │ │ │ │ ├── no_usage_response.json │ │ │ │ │ └── unauthorized.json │ │ │ ├── llm-v1-completions │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ └── good.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── unauthorized.json │ │ │ └── request-transformer │ │ │ │ └── response-in-json.json │ │ ├── azure │ │ │ └── request-transformer │ │ │ │ └── response-in-json.json │ │ ├── cohere │ │ │ ├── llm-v1-chat │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good-stream.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── good_own_model.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── bad_upstream_response.json │ │ │ │ │ ├── good.json │ │ │ │ │ ├── internal_server_error.html │ │ │ │ │ └── unauthorized.json │ │ │ ├── llm-v1-completions │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ └── good.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── unauthorized.json │ │ │ └── request-transformer │ │ │ │ └── response-in-json.json │ │ ├── json-schema.json │ │ ├── llama2 │ │ │ ├── ollama │ │ │ │ └── chat-stream.json │ │ │ ├── raw │ │ │ │ ├── requests │ │ │ │ │ ├── good-chat.json │ │ │ │ │ └── good-completions.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── unauthorized.json │ │ │ └── request-transformer │ │ │ │ └── response-in-json.json │ │ ├── mistral │ │ │ ├── llm-v1-chat │ │ │ │ └── responses │ │ │ │ │ └── good.json │ │ │ ├── llm-v1-completions │ │ │ │ └── responses │ │ │ │ │ └── good.json │ │ │ └── request-transformer │ │ │ │ └── response-in-json.json │ │ ├── oas.yaml │ │ ├── openai │ │ │ ├── llm-v1-chat │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good-stream.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── good_own_model.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── bad_upstream_response.json │ │ │ │ │ ├── good.json │ │ │ │ │ ├── internal_server_error.html │ │ │ │ │ └── unauthorized.json │ │ │ ├── llm-v1-completions │ │ │ │ ├── requests │ │ │ │ │ ├── bad_request.json │ │ │ │ │ └── good.json │ │ │ │ └── responses │ │ │ │ │ ├── bad_request.json │ │ │ │ │ ├── good.json │ │ │ │ │ └── unauthorized.json │ │ │ └── request-transformer │ │ │ │ ├── response-in-json.json │ │ │ │ ├── response-not-json.json │ │ │ │ ├── response-with-bad-instructions.json │ │ │ │ └── response-with-instructions.json │ │ └── unit │ │ │ ├── expected-requests │ │ │ ├── anthropic │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── azure │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── cohere │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── llama2 │ │ │ │ ├── ollama │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ │ └── raw │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ ├── mistral │ │ │ │ ├── ollama │ │ │ │ │ └── llm-v1-chat.json │ │ │ │ └── openai │ │ │ │ │ └── llm-v1-chat.json │ │ │ └── openai │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── expected-responses │ │ │ ├── anthropic │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── azure │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── cohere │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── llama2 │ │ │ │ ├── ollama │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ │ └── raw │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ ├── mistral │ │ │ │ ├── ollama │ │ │ │ │ └── llm-v1-chat.json │ │ │ │ └── openai │ │ │ │ │ └── llm-v1-chat.json │ │ │ └── openai │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── real-responses │ │ │ ├── anthropic │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── azure │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── cohere │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── llama2 │ │ │ │ ├── ollama │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ │ └── raw │ │ │ │ │ ├── llm-v1-chat.json │ │ │ │ │ └── llm-v1-completions.json │ │ │ ├── mistral │ │ │ │ ├── ollama │ │ │ │ │ └── llm-v1-chat.json │ │ │ │ └── openai │ │ │ │ │ └── llm-v1-chat.json │ │ │ └── openai │ │ │ │ ├── llm-v1-chat.json │ │ │ │ └── llm-v1-completions.json │ │ │ ├── real-stream-frames │ │ │ ├── cohere │ │ │ │ ├── llm-v1-chat.txt │ │ │ │ └── llm-v1-completions.txt │ │ │ └── openai │ │ │ │ ├── llm-v1-chat.txt │ │ │ │ └── llm-v1-completions.txt │ │ │ └── requests │ │ │ ├── llm-v1-chat.json │ │ │ ├── llm-v1-completion-template.json │ │ │ └── llm-v1-completions.json │ ├── aws-lambda.lua │ ├── aws-sam.lua │ ├── balancer_utils.lua │ ├── blueprints.lua │ ├── burst.yml │ ├── custom_nginx.template │ ├── custom_plugins │ │ └── kong │ │ │ └── plugins │ │ │ ├── admin-api-method │ │ │ ├── api.lua │ │ │ ├── handler.lua │ │ │ ├── schema.lua │ │ │ └── status_api.lua │ │ │ ├── api-override │ │ │ ├── api.lua │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── cache-key-vs-endpoint-key │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── migrations │ │ │ │ ├── 000_base_cache_key_vs_endpoint_key.lua │ │ │ │ └── init.lua │ │ │ └── schema.lua │ │ │ ├── cache │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── cluster-error-reporting │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── ctx-checker-last │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── ctx-checker │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── ctx-tests-response │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── ctx-tests │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── dummy │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── enable-buffering-response │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── enable-buffering │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── error-generator-last │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── error-generator │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── error-handler-log │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── fail-once-auth │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── foreign-entity │ │ │ ├── api.lua │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── migrations │ │ │ │ ├── 000_base_foreign_entity.lua │ │ │ │ └── init.lua │ │ │ └── schema.lua │ │ │ ├── get-plugin-id │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── init-worker-lua-error │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── invalid-schema │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── invalidations │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── logger-last │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── logger │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── max-args │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── muti-external-http-calls │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── plugin-config-dump │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── plugin-with-custom-dao │ │ │ ├── custom_dao.lua │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── schema.lua │ │ │ └── strategies │ │ │ │ └── postgres │ │ │ │ └── custom_dao.lua │ │ │ ├── preserve-nulls │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── reconfiguration-completion │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── redis-dummy │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── reference-ca-cert │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── reports-api │ │ │ ├── api.lua │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── request-aware-table │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── response-phase │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── rewriter │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── secret-response │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── short-circuit │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── slow-query │ │ │ ├── api.lua │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── stream-api-echo │ │ │ ├── api.lua │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── tcp-trace-exporter │ │ │ ├── handler.lua │ │ │ └── schema.lua │ │ │ ├── transformations │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── migrations │ │ │ │ ├── 000_base_transformations.lua │ │ │ │ └── init.lua │ │ │ └── schema.lua │ │ │ ├── unique-foreign │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── migrations │ │ │ │ ├── 000_base_unique_foreign.lua │ │ │ │ └── init.lua │ │ │ └── schema.lua │ │ │ ├── with-migrations │ │ │ ├── daos.lua │ │ │ ├── handler.lua │ │ │ ├── migrations │ │ │ │ ├── 000_base_with_migrations.lua │ │ │ │ ├── 001_14_to_15.lua │ │ │ │ └── init.lua │ │ │ └── schema.lua │ │ │ └── worker-events │ │ │ ├── handler.lua │ │ │ └── schema.lua │ ├── custom_vaults │ │ └── kong │ │ │ └── vaults │ │ │ ├── echo │ │ │ ├── init.lua │ │ │ └── schema.lua │ │ │ ├── mock │ │ │ ├── init.lua │ │ │ └── schema.lua │ │ │ ├── mocksocket │ │ │ ├── init.lua │ │ │ └── schema.lua │ │ │ ├── random │ │ │ ├── init.lua │ │ │ └── schema.lua │ │ │ └── test │ │ │ ├── init.lua │ │ │ └── schema.lua │ ├── dc_blueprints.lua │ ├── default_status_listen.conf │ ├── dump_lmdb_key.lua │ ├── error_templates │ │ ├── error_template.html │ │ ├── error_template.json │ │ ├── error_template.plain │ │ └── error_template.xml │ ├── factories │ │ └── plugins.lua │ ├── forward-proxy-server.lua │ ├── go │ │ ├── go-hello.go │ │ ├── go.mod │ │ └── go.sum │ ├── grpc │ │ ├── direct_imports.proto │ │ ├── google │ │ │ ├── api │ │ │ │ ├── annotations.proto │ │ │ │ ├── http.proto │ │ │ │ └── httpbody.proto │ │ │ └── protobuf │ │ │ │ ├── any.proto │ │ │ │ ├── api.proto │ │ │ │ ├── descriptor.proto │ │ │ │ ├── duration.proto │ │ │ │ ├── empty.proto │ │ │ │ ├── field_mask.proto │ │ │ │ ├── source_context.proto │ │ │ │ ├── struct.proto │ │ │ │ ├── timestamp.proto │ │ │ │ ├── type.proto │ │ │ │ └── wrappers.proto │ │ ├── hello.proto │ │ ├── helloworld.proto │ │ ├── second_level_imports.proto │ │ ├── target │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── grpc-target.go │ │ │ └── targetservice │ │ │ │ ├── targetservice.pb.go │ │ │ │ └── targetservice_grpc.pb.go │ │ └── targetservice.proto │ ├── headers.conf │ ├── hosts │ ├── https_server.lua │ ├── invalid-module.lua │ ├── invalid.conf │ ├── invalid_nginx_directives.conf │ ├── kong_clustering.crt │ ├── kong_clustering.key │ ├── kong_clustering_ca.crt │ ├── kong_clustering_client.crt │ ├── kong_clustering_client.key │ ├── kong_spec.crt │ ├── kong_spec.key │ ├── migrations │ │ └── kong │ │ │ └── db │ │ │ └── migrations │ │ │ └── core │ │ │ ├── 000_base.lua │ │ │ ├── 001_14_to_15.lua │ │ │ └── init.lua │ ├── mock_cp.lua │ ├── mock_upstream.lua │ ├── mock_webserver_tpl.lua │ ├── mocker.lua │ ├── mocks │ │ ├── lua-resty-dns │ │ │ └── resty │ │ │ │ └── dns │ │ │ │ └── resolver.lua │ │ └── lua-resty-websocket │ │ │ └── resty │ │ │ └── websocket │ │ │ └── peer.lua │ ├── mtls_certs │ │ ├── ca.crt │ │ ├── ca.key │ │ ├── example.com.crt │ │ ├── example.com.key │ │ ├── example2.com.crt │ │ └── example2.com.key │ ├── nginx-directives.conf │ ├── ocsp_certs │ │ ├── ca-chain.crt │ │ ├── ca.crt │ │ ├── index.txt │ │ ├── index.txt.revoked │ │ ├── kong_clustering.crt │ │ ├── kong_clustering.key │ │ ├── kong_data_plane.crt │ │ ├── kong_data_plane.key │ │ ├── ocsp.crt │ │ ├── ocsp.key │ │ ├── resp-good.dat │ │ └── resp-revoked.dat │ ├── opentelemetry │ │ └── otelcol.yaml │ ├── perf │ │ ├── 500services-each-4-routes.sql │ │ ├── charts │ │ │ ├── test_data1.json │ │ │ └── test_data2.json │ │ └── terraform │ │ │ ├── aws-ec2 │ │ │ ├── .gitignore │ │ │ ├── ec2.tf │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── ssh.tf │ │ │ └── variables.tf │ │ │ ├── bring-your-own │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── ssh.tf │ │ │ └── variables.tf │ │ │ ├── digitalocean │ │ │ ├── .gitignore │ │ │ ├── droplets.tf │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── project.tf │ │ │ ├── ssh.tf │ │ │ └── variables.tf │ │ │ └── equinix-metal │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── main.tf │ │ │ ├── metal.tf │ │ │ ├── output.tf │ │ │ ├── scripts │ │ │ └── wrk.lua │ │ │ ├── ssh.tf │ │ │ ├── tls.tf │ │ │ └── variables.tf │ ├── prometheus │ │ └── metrics.conf │ ├── proxy_wasm_filters │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ ├── response_transformer │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── filter.rs │ │ │ │ └── types.rs │ │ └── tests │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── filter.rs │ │ │ ├── routines.rs │ │ │ ├── test_cases.rs │ │ │ ├── test_http.rs │ │ │ └── types.rs │ ├── redis │ │ ├── ca.crt │ │ ├── ca.key │ │ ├── docker-entrypoint.sh │ │ ├── server.crt │ │ └── server.key │ ├── reload.conf │ ├── router_path_handling_tests.lua │ ├── sam-app │ │ ├── .gitignore │ │ ├── README.md │ │ ├── __init__.py │ │ ├── events │ │ │ └── event.json │ │ ├── hello_world │ │ │ ├── __init__.py │ │ │ ├── app.py │ │ │ └── requirements.txt │ │ ├── template.yaml │ │ └── tests │ │ │ ├── __init__.py │ │ │ ├── integration │ │ │ ├── __init__.py │ │ │ └── test_api_gateway.py │ │ │ ├── requirements.txt │ │ │ └── unit │ │ │ ├── __init__.py │ │ │ └── test_handler.py │ ├── shared_dict.lua │ ├── shm-stub.lua │ ├── ssl.lua │ ├── stress_generator.lua │ ├── template_inject │ │ ├── nginx_kong_test_custom_inject_http.lua │ │ ├── nginx_kong_test_custom_inject_stream.lua │ │ └── nginx_kong_test_tcp_echo_server_custom_inject_stream.lua │ ├── to-strip.conf │ └── valid-module.lua ├── helpers.lua ├── helpers │ ├── dns.lua │ ├── http_mock.lua │ ├── http_mock │ │ ├── asserts.lua │ │ ├── clients.lua │ │ ├── debug_port.lua │ │ ├── nginx_instance.lua │ │ ├── tapping.lua │ │ └── template.lua │ ├── perf.lua │ ├── perf │ │ ├── charts.lua │ │ ├── charts │ │ │ ├── .gitignore │ │ │ ├── charts.py │ │ │ └── requirements.txt │ │ ├── drivers │ │ │ ├── docker.lua │ │ │ └── terraform.lua │ │ ├── git.lua │ │ ├── logger.lua │ │ └── utils.lua │ ├── redis_helper.lua │ ├── ssl.lua │ └── wait.lua ├── kong_tests.conf ├── ldoc.css ├── on_demand_specs ├── renderdocs.sh ├── require.lua └── upgrade_helpers.lua └── t ├── 01-pdk ├── 01-table.t ├── 02-log │ ├── 00-phase_checks.t │ ├── 01-sanity.t │ ├── 02-new.t │ ├── 03-set_format.t │ ├── 04-inspect.t │ ├── 05-set_serialize_value.t │ └── 06-deprecation.t ├── 03-ip │ └── 01-is_trusted.t ├── 04-request │ ├── 00-phase_checks.t │ ├── 01-get_scheme.t │ ├── 02-get_host.t │ ├── 03-get_port.t │ ├── 04-get_forwarded_scheme.t │ ├── 05-get_forwarded_host.t │ ├── 06-get_forwarded_port.t │ ├── 07-get_http_version.t │ ├── 08-get_method.t │ ├── 09-get_path.t │ ├── 10-get_raw_query.t │ ├── 11-get_query_arg.t │ ├── 12-get_query.t │ ├── 13-get_header.t │ ├── 14-get_headers.t │ ├── 15-get_raw_body.t │ ├── 16-get_body.t │ ├── 17-get_path_with_query.t │ ├── 18-get_forwarded_path.t │ ├── 19-get_forwarded_prefix.t │ ├── 20-get_raw_path.t │ ├── 20-get_start_time.t │ └── 21-get_uri_captures.t ├── 05-client │ ├── 00-phase_checks.t │ ├── 01-get_ip.t │ ├── 02-get_forwarded_ip.t │ ├── 03-get_port.t │ ├── 04-get_forwarded_port.t │ ├── 05-get_credential.t │ ├── 06-get_consumer.t │ ├── 07-authenticate.t │ ├── 08-get_protocol.t │ └── 09-load-consumer.t ├── 06-service-request │ ├── 00-phase_checks.t │ ├── 01-set_scheme.t │ ├── 04-set_path.t │ ├── 05-set_raw_query.t │ ├── 06-set_method.t │ ├── 07-set_body.t │ ├── 08-set_query.t │ ├── 09-set_header.t │ ├── 10-add_header.t │ ├── 11-clear_header.t │ ├── 12-set_headers.t │ └── 13-set_raw_body.t ├── 07-service-response │ ├── 00-phase_checks.t │ ├── 01-get_status.t │ ├── 02-get_headers.t │ ├── 03-get_header.t │ ├── 04-get_raw_body.t │ └── 05-get_body.t ├── 08-response │ ├── 00-phase_checks.t │ ├── 01-get_status.t │ ├── 02-get_header.t │ ├── 03-get_headers.t │ ├── 04-set_status.t │ ├── 05-set_header.t │ ├── 06-add_header.t │ ├── 07-clear_header.t │ ├── 08-set_headers.t │ ├── 09-set_raw_body.t │ ├── 10-set_body.t │ ├── 11-exit.t │ ├── 12-get_source.t │ ├── 13-error.t │ └── 14-get_raw_body.t ├── 09-service │ ├── 00-phase_checks.t │ ├── 01-set-upstream.t │ ├── 02-set-target.t │ └── 03-set-tls-cert-key.t ├── 10-nginx │ ├── 00-phase_checks.t │ ├── 01-get_subsystem.t │ └── 02-get_statistics.t ├── 11-ctx.t ├── 12-node │ ├── 00-phase_checks.t │ ├── 01-get_id.t │ ├── 02-get_memory_stats.t │ └── 03-get_hostname.t ├── 13-router │ ├── 00-phase_checks.t │ ├── 01-get_route.t │ └── 02-get_service.t ├── 14-client-tls │ ├── 00-phase_checks.t │ └── 01-request_client_certificate.t └── 15-tracing │ └── 01-context.t ├── 02-global ├── 01-init-pdk.t ├── 02-set-named-ctx.t └── 03-namespaced_log.t ├── 03-dns-client ├── 00-sanity.t ├── 01-phases.t └── 02-timer-usage.t ├── 04-patch ├── 01-ngx-buf-double-free.t └── 02-ngx-read-body-block.t ├── 05-mlcache ├── 00-ipc.t ├── 01-new.t ├── 02-get.t ├── 03-peek.t ├── 04-update.t ├── 05-set.t ├── 06-delete.t ├── 07-l1_serializer.t ├── 08-purge.t ├── 09-isolation.t ├── 10-ipc_shm.t ├── 11-locks_shm.t ├── 12-resurrect-stale.t ├── 13-get_bulk.t ├── 14-bulk-and-res.t └── 15-renew.t ├── Util.pm ├── certs ├── ca.crt ├── ca.key ├── client_example.com.crt ├── client_example.com.key ├── intermediate.crt ├── intermediate.key ├── test.crt └── test.key ├── pdk.luacov └── phase_checks.luacov /.bazelversion: -------------------------------------------------------------------------------- 1 | 6.1.0 2 | -------------------------------------------------------------------------------- /.busted: -------------------------------------------------------------------------------- 1 | return { 2 | default = { 3 | lpath = "./?.lua;./?/init.lua;" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM kong/kong:3.0.0-ubuntu 2 | 3 | USER root 4 | 5 | RUN apt-get update 6 | 7 | RUN apt-get install -y \ 8 | build-essential \ 9 | unzip \ 10 | git \ 11 | m4 \ 12 | libyaml-dev \ 13 | curl 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Kong Gateway Open Source Community Pledge 4 | url: https://github.com/Kong/kong/blob/master/COMMUNITY_PLEDGE.md 5 | - name: Feature Request 6 | url: https://github.com/Kong/kong/discussions/categories/ideas 7 | about: Propose your cool ideas and feature requests at the Kong discussion forum 8 | - name: Question 9 | url: https://github.com/Kong/kong/discussions/categories/help 10 | about: Ask (and answer) questions at the Kong discussion forum 11 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Set update schedule for GitHub Actions 2 | 3 | version: 2 4 | updates: 5 | 6 | - package-ecosystem: "github-actions" 7 | directory: "/" 8 | schedule: 9 | # Check for updates to GitHub Actions every week 10 | interval: "weekly" 11 | -------------------------------------------------------------------------------- /.github/matrix-commitly.yml: -------------------------------------------------------------------------------- 1 | # please see matrix-full.yml for meaning of each field 2 | build-packages: 3 | - label: ubuntu-22.04 4 | os: ubuntu-22.04 5 | package: deb 6 | check-manifest-suite: ubuntu-22.04-amd64 7 | 8 | build-images: 9 | - label: ubuntu 10 | base-image: ubuntu:22.04 11 | package: deb 12 | artifact-from: ubuntu-22.04 13 | 14 | smoke-tests: 15 | - label: ubuntu 16 | 17 | scan-vulnerabilities: 18 | - label: ubuntu 19 | 20 | release-packages: 21 | 22 | release-images: 23 | - label: ubuntu 24 | package: deb 25 | -------------------------------------------------------------------------------- /.github/workflows/auto-assignee.yml: -------------------------------------------------------------------------------- 1 | name: Add assignee to PRs 2 | on: 3 | pull_request: 4 | types: [ opened, reopened ] 5 | permissions: 6 | pull-requests: write 7 | jobs: 8 | assign-author: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: assign-author 12 | # ignore the pull requests opened from PR because token is not correct 13 | if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' 14 | uses: toshimaru/auto-author-assign@ebd30f10fb56e46eb0759a14951f36991426fed0 15 | 16 | -------------------------------------------------------------------------------- /.github/workflows/changelog-validation.yml: -------------------------------------------------------------------------------- 1 | name: Changelog Validation 2 | 3 | on: 4 | pull_request: 5 | types: [ opened, synchronize ] 6 | 7 | jobs: 8 | validate-changelog: 9 | name: Validate changelog 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | 14 | - name: Validate changelogs 15 | uses: Kong/gateway-changelog@main 16 | with: 17 | files: changelog/unreleased/*/*.yml 18 | -------------------------------------------------------------------------------- /.github/workflows/label-check.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Label Checker 2 | on: 3 | pull_request: 4 | types: [opened, edited, synchronize, labeled, unlabeled] 5 | jobs: 6 | check-labels: 7 | name: prevent merge labels 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: backport master label found 12 | run: echo "Please do not backport into master, instead, create a PR targeting master and backport from it instead."; exit 1 13 | if: ${{ contains(github.event.*.labels.*.name, 'backport master') }} 14 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | labeler: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/labeler@v5 13 | -------------------------------------------------------------------------------- /.luacov: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | includeuntestedfiles = { 4 | "kong/", 5 | }, 6 | runreport = true, 7 | 8 | include = { 9 | "kong$", 10 | "kong%/.+$", 11 | }, 12 | 13 | exclude = { 14 | "bazel%-bin/build", 15 | "^spec/", 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | To report a vulnerability in the Kong gateway, Insomnia or other Kong software, or know of a publicly disclosed security vulnerability, please immediately let us know by emailing security@konghq.com. 5 | 6 | For more detailed information, please see [Kong's Security Update Process](https://docs.konghq.com/gateway/latest/plan-and-deploy/security/kong-security-update-process/#reporting-a-vulnerability). 7 | -------------------------------------------------------------------------------- /autodoc/pdk/ldoc/config.ld: -------------------------------------------------------------------------------- 1 | project = "kong" 2 | title = "Plugin Development Kit" 3 | format = "markdown" 4 | backtick_references = false 5 | no_lua_ref = true 6 | all = false 7 | ext = "md" 8 | template = true -- use the ldoc.ltp template in this folder 9 | template_escape = ">" 10 | no_space_before_args = true 11 | 12 | custom_tags = { 13 | { 14 | "redirect", 15 | hidden = true, 16 | }, 17 | { 18 | "phases", 19 | title = "Phases", 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /autodoc/pdk/ldoc/json.ltp: -------------------------------------------------------------------------------- 1 | [ 2 | # for i, mod in ipairs(modules) do 3 | # local name = mod.name 4 | # if string.lower(name) == "pdk" then 5 | # name = "index" 6 | # end 7 | { "name": "$(name)", 8 | "generated_name": "$(mod.name)", 9 | "file": "$(mod.file)" }$(i < #modules and ",") 10 | # end 11 | ] 12 | -------------------------------------------------------------------------------- /autodoc/pdk/ldoc/nav_yml.ltp: -------------------------------------------------------------------------------- 1 | - text: Plugin Development Kit 2 | url: $(base_url) 3 | items: 4 | # for _, mod in ipairs(modules) do 5 | # if string.lower(mod.name) ~= "pdk" then 6 | 7 | - text: $(mod.name) 8 | url: $(base_url)/$(mod.name) 9 | # end 10 | # end 11 | -------------------------------------------------------------------------------- /build/Makefile: -------------------------------------------------------------------------------- 1 | ../Makefile -------------------------------------------------------------------------------- /build/cross_deps/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/build/cross_deps/BUILD.bazel -------------------------------------------------------------------------------- /build/cross_deps/libxcrypt/BUILD.bazel: -------------------------------------------------------------------------------- 1 | exports_files( 2 | [ 3 | "BUILD.libxcrypt.bazel", 4 | ], 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /build/cross_deps/libyaml/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@bazel_skylib//rules:build_test.bzl", "build_test") 2 | 3 | exports_files( 4 | [ 5 | "BUILD.libyaml.bazel", 6 | ], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | build_test( 11 | name = "build", 12 | targets = [ 13 | "@cross_deps_libyaml//:libyaml", 14 | ], 15 | visibility = ["//:__pkg__"], 16 | ) 17 | -------------------------------------------------------------------------------- /build/cross_deps/repositories.bzl: -------------------------------------------------------------------------------- 1 | load("//build/cross_deps/zlib:repositories.bzl", "zlib_repositories") 2 | load("//build/cross_deps/libyaml:repositories.bzl", "libyaml_repositories") 3 | load("//build/cross_deps/libxcrypt:repositories.bzl", "libxcrypt_repositories") 4 | 5 | def cross_deps_repositories(): 6 | zlib_repositories() 7 | libyaml_repositories() 8 | libxcrypt_repositories() 9 | -------------------------------------------------------------------------------- /build/cross_deps/zlib/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@bazel_skylib//rules:build_test.bzl", "build_test") 2 | 3 | exports_files( 4 | [ 5 | "BUILD.zlib.bazel", 6 | ], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | build_test( 11 | name = "build", 12 | targets = [ 13 | "@cross_deps_zlib//:zlib", 14 | ], 15 | visibility = ["//:__pkg__"], 16 | ) 17 | -------------------------------------------------------------------------------- /build/libexpat/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@bazel_skylib//rules:build_test.bzl", "build_test") 2 | 3 | exports_files( 4 | [ 5 | "BUILD.libexpat.bazel", 6 | ], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | build_test( 11 | name = "build", 12 | targets = [ 13 | "@libexpat//:libexpat", 14 | ], 15 | visibility = ["//:__pkg__"], 16 | ) 17 | -------------------------------------------------------------------------------- /build/nfpm/BUILD.bazel: -------------------------------------------------------------------------------- 1 | filegroup( 2 | name = "all_srcs", 3 | srcs = glob(["**"]), 4 | visibility = ["//visibility:public"], 5 | ) 6 | -------------------------------------------------------------------------------- /build/nfpm/BUILD.nfpm.bazel: -------------------------------------------------------------------------------- 1 | filegroup( 2 | name = "srcs", 3 | srcs = glob(["**"]), 4 | visibility = ["//visibility:public"], 5 | ) 6 | -------------------------------------------------------------------------------- /build/openresty/BUILD.bazel: -------------------------------------------------------------------------------- 1 | exports_files( 2 | [ 3 | "BUILD.openresty.bazel", 4 | ], 5 | visibility = ["//visibility:public"], 6 | ) 7 | -------------------------------------------------------------------------------- /build/openresty/atc_router/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/build/openresty/atc_router/BUILD.bazel -------------------------------------------------------------------------------- /build/openresty/atc_router/atc_router_repositories.bzl: -------------------------------------------------------------------------------- 1 | """A module defining the dependency atc-router""" 2 | 3 | load("//build:build_system.bzl", "git_or_local_repository") 4 | load("@kong_bindings//:variables.bzl", "KONG_VAR") 5 | 6 | def atc_router_repositories(): 7 | git_or_local_repository( 8 | name = "atc_router", 9 | branch = KONG_VAR["ATC_ROUTER"], 10 | remote = "https://github.com/Kong/atc-router", 11 | ) 12 | -------------------------------------------------------------------------------- /build/openresty/brotli/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/build/openresty/brotli/BUILD.bazel -------------------------------------------------------------------------------- /build/openresty/brotli/brotli_repositories.bzl: -------------------------------------------------------------------------------- 1 | """A module defining the dependency """ 2 | 3 | load("//build:build_system.bzl", "git_or_local_repository") 4 | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 5 | load("@kong_bindings//:variables.bzl", "KONG_VAR") 6 | 7 | def brotli_repositories(): 8 | maybe( 9 | git_or_local_repository, 10 | name = "brotli", 11 | branch = KONG_VAR["BROTLI"], 12 | remote = "https://github.com/google/brotli", 13 | ) 14 | -------------------------------------------------------------------------------- /build/openresty/openssl/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@kong//build/openresty/openssl:openssl.bzl", "build_openssl") 2 | 3 | build_openssl( 4 | name = "openssl", 5 | ) 6 | -------------------------------------------------------------------------------- /build/openresty/openssl/README.md: -------------------------------------------------------------------------------- 1 | This target is modified from https://github.com/bazelbuild/rules_foreign_cc/tree/main/examples/third_party 2 | with following changes: 3 | 4 | - Read version from requirements.txt 5 | - Updated `build_file` to new path under //build/openresty 6 | - Remove Windows build support 7 | - Removed the bazel mirror as it's missing latest versions 8 | - Remove runnable test for now until cross compile has been sorted out 9 | - Use system Perl for now 10 | - Updated to be reusable -------------------------------------------------------------------------------- /build/openresty/patches/openresty_02-pcre2.patch: -------------------------------------------------------------------------------- 1 | diff --git a/configure b/configure 2 | index 969b075..23322a9 100755 3 | --- a/configure 4 | +++ b/configure 5 | @@ -557,9 +557,6 @@ _END_ 6 | "\n"; 7 | } 8 | 9 | - # disable pcre2 by default 10 | - push @ngx_opts, '--without-pcre2'; 11 | - 12 | if (!$opts->{no_stream} 13 | && ! $opts->{no_stream_ssl} 14 | && ! $opts->{stream_ssl}) 15 | -------------------------------------------------------------------------------- /build/openresty/pcre/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@bazel_skylib//rules:build_test.bzl", "build_test") 2 | 3 | exports_files( 4 | [ 5 | "BUILD.pcre.bazel", 6 | ], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | build_test( 11 | name = "build", 12 | targets = [ 13 | "@pcre//:pcre", 14 | ], 15 | visibility = ["//:__pkg__"], 16 | ) 17 | -------------------------------------------------------------------------------- /build/openresty/pcre/README.md: -------------------------------------------------------------------------------- 1 | This target is modified from https://github.com/bazelbuild/rules_foreign_cc/tree/main/examples/third_party 2 | with following changes: 3 | 4 | - Read version from `requirements.txt` 5 | - Updated `build_file` to new path under //build/openresty 6 | -------------------------------------------------------------------------------- /build/openresty/wasmx/filters/BUILD.bazel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/build/openresty/wasmx/filters/BUILD.bazel -------------------------------------------------------------------------------- /build/package/kong.logrotate: -------------------------------------------------------------------------------- 1 | /usr/local/kong/logs/*.log { 2 | su kong kong 3 | rotate 14 4 | daily 5 | missingok 6 | compress 7 | delaycompress 8 | notifempty 9 | sharedscripts 10 | postrotate 11 | if [ -f /usr/local/kong/pids/nginx.pid ]; then 12 | kill -USR1 `cat /usr/local/kong/pids/nginx.pid` 13 | fi 14 | endscript 15 | } 16 | -------------------------------------------------------------------------------- /build/toolchain/.gitignore: -------------------------------------------------------------------------------- 1 | wrappers-* 2 | -------------------------------------------------------------------------------- /build/toolchain/bindings.bzl: -------------------------------------------------------------------------------- 1 | """ 2 | Global variables 3 | """ 4 | 5 | def _load_bindings_impl(ctx): 6 | root = "/".join(ctx.execute(["pwd"]).stdout.split("/")[:-1]) 7 | 8 | ctx.file("BUILD.bazel", "") 9 | ctx.file("variables.bzl", "INTERNAL_ROOT = \"%s\"\n" % root) 10 | 11 | load_bindings = repository_rule( 12 | implementation = _load_bindings_impl, 13 | ) 14 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/changelog/3.5.0/kong/.gitkeep -------------------------------------------------------------------------------- /changelog/3.5.0/kong/10570.yml: -------------------------------------------------------------------------------- 1 | message: "**response-ratelimiting**: add support for secret rotation with redis connection " 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11360-1.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-healthcheck from 1.6.2 to 1.6.3" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11360-2.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped OpenResty from 1.21.4.1 to 1.21.4.2" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11424.yml: -------------------------------------------------------------------------------- 1 | message: Fix response body gets repeated when `kong.response.get_raw_body()` is called multiple times in a request lifecycle. 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11442.yml: -------------------------------------------------------------------------------- 1 | message: refactor workspace id and name retrieval 2 | type: performance 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11464.yml: -------------------------------------------------------------------------------- 1 | message: Fix an issue that the TTL of the key-auth plugin didnt work in DB-less and Hybrid mode. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11468.yml: -------------------------------------------------------------------------------- 1 | message: "**Opentelemetry**: fix an issue that resulted in invalid parent IDs in the propagated tracing headers" 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11480.yml: -------------------------------------------------------------------------------- 1 | message: Fix a problem that abnormal socket connection will be reused when querying Postgres database. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11484.yml: -------------------------------------------------------------------------------- 1 | message: "Tracing: fix an issue that resulted in some parent spans to end before their children due to different precision of their timestamps" 2 | type: bugfix 3 | scope: PDK 4 | issues: 5 | - 11294 6 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11502.yml: -------------------------------------------------------------------------------- 1 | message: Fix upstream ssl failure when plugins use response handler 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11515.yml: -------------------------------------------------------------------------------- 1 | message: Bumped the default value of `upstream_keepalive_pool_size` to `512` and `upstream_keepalive_max_requests` to `1000` 2 | type: performance 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11518.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped resty.openssl from 0.8.23 to 0.8.25" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11523.yml: -------------------------------------------------------------------------------- 1 | "message": "**CORS**: Support the `Access-Control-Request-Private-Network` header in crossing-origin pre-light requests" 2 | "type": "feature" 3 | "scope": "Plugin" 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11532.yml: -------------------------------------------------------------------------------- 1 | message: "add scan_count to redis storage schema" 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11538.yml: -------------------------------------------------------------------------------- 1 | message: Fix an issue that protocol `tls_passthrough` can not work with expressions flavor 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11551-1.yml: -------------------------------------------------------------------------------- 1 | "message": "**AWS-Lambda**: let plugin-level proxy take effect on EKS IRSA credential provider" 2 | "type": "bugfix" 3 | "scope": "Plugin" 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11551-2.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-aws from 1.3.1 to 1.3.2" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11553.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped LuaSec from 1.3.1 to 1.3.2" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11566.yml: -------------------------------------------------------------------------------- 1 | message: Fix a bug related to data interference between requests in the kong.log.serialize function. 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11578.yml: -------------------------------------------------------------------------------- 1 | message: "Restore lapis & luarocks-admin bins" 2 | type: bugfix 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11599.yml: -------------------------------------------------------------------------------- 1 | message: Fix a bug that will cause a failure of sending tracing data to datadog when value of x-datadog-parent-id header in requests is a short dec string 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11613.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-aws from 1.3.2 to 1.3.5" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11638.yml: -------------------------------------------------------------------------------- 1 | message: "Fix incorrect LuaJIT register allocation for IR_*LOAD on ARM64" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11639.yml: -------------------------------------------------------------------------------- 1 | message: "Fix LDP/STP fusing for unaligned accesses on ARM64" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/11727.yml: -------------------------------------------------------------------------------- 1 | message: "Add a new endpoint `/schemas/vaults/:name` to retrieve the schema of a vault." 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/aws_lambda_service_cache.yml: -------------------------------------------------------------------------------- 1 | message: Cache the AWS lambda service by those lambda service related fields 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/bump_openssl_3.1.4.yml: -------------------------------------------------------------------------------- 1 | message: bump OpenSSL to 3.1.4 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/dedicated_config_processing.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | rename `privileged_agent` to `dedicated_config_processing. Enable `dedicated_config_processing` by default 3 | type: feature 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/fix-cve-2023-44487.yml: -------------------------------------------------------------------------------- 1 | message: Apply Nginx patch for detecting HTTP/2 stream reset attacks early (CVE-2023-44487) 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/fix-opentelemetry-parent-id.yml: -------------------------------------------------------------------------------- 1 | message: "**Opentelemetry**: fix an issue that resulted in traces with invalid parent IDs when `balancer` instrumentation was enabled" 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/fix-tcp-log-sslhandshake.yml: -------------------------------------------------------------------------------- 1 | message: "**tcp-log**: fix an issue of unnecessary handshakes when reusing TLS connection" 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/fix_dns_enable_dns_no_sync.yml: -------------------------------------------------------------------------------- 1 | message: The default value of `dns_no_sync` option has been changed to `on` 2 | type: bugfix 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/fix_patch_order.yml: -------------------------------------------------------------------------------- 1 | message: fix the building failure when applying patches 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/lapis_version_bump.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped kong-lapis from 1.14.0.2 to 1.14.0.3" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/lua_kong_nginx_module_bump.yml: -------------------------------------------------------------------------------- 1 | message: Bump lua-kong-nginx-module from 0.6.0 to 0.8.0 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/luajit_ldp_stp_fusion.yml: -------------------------------------------------------------------------------- 1 | message: "Fix incorrect LuaJIT LDP/STP fusion on ARM64 which may sometimes cause incorrect logic" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/ngx_wasm_module_bump.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped ngx_wasm_module to latest rolling release version." 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/on_prem_dp_metadata.yml: -------------------------------------------------------------------------------- 1 | "message": "**Clustering**: Allow configuring DP metadata labels for on-premise CP Gateway" 2 | "type": "feature" 3 | "scope": "Clustering" 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/per_reqeuest_deubgging.yml: -------------------------------------------------------------------------------- 1 | message: Support observing the time consumed by some components in the given request. 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/plugin-configure-phase.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | Plugins can now implement `Plugin:configure(configs)` function that is called whenever 3 | there is a change in plugin entities. An array of current plugin configurations is 4 | passed to the function, or `nil` in case there is no active configurations for the plugin. 5 | type: feature 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/request-aware-table.yml: -------------------------------------------------------------------------------- 1 | message: Add a request-aware table able to detect accesses from different requests. 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/request_id.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | A unique Request ID is now populated in the error log, access log, error templates, 3 | log serializer, and in a new X-Kong-Request-Id header (configurable for upstream/downstream 4 | using the `headers` and `headers_upstream` configuration options). 5 | type: feature 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/session_do_not_read_body_by_default.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | **Session**: a new configuration field `read_body_for_logout` was added with a default value of `false`, 3 | that changes behavior of `logout_post_arg` in a way that it is not anymore considered if the 4 | `read_body_for_logout` is not explicitly set to `true`. This is to avoid session plugin from reading 5 | request bodies by default on e.g. `POST` request for logout detection. 6 | 7 | type: breaking_change 8 | scope: Plugin 9 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/vault-declarative.yml: -------------------------------------------------------------------------------- 1 | message: Vault references can be used in Dbless mode in declarative config 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/vault-init-warmup.yml: -------------------------------------------------------------------------------- 1 | message: Properly warmup Vault caches on init 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/vault-resurrect.yml: -------------------------------------------------------------------------------- 1 | message: Vault resurrect time is respected in case a vault secret is deleted from a vault 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/wasm-filter-config-schemas.yml: -------------------------------------------------------------------------------- 1 | message: Add support for optional Wasm filter configuration schemas 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/wasm-filter-json-config.yml: -------------------------------------------------------------------------------- 1 | message: Support JSON in Wasm filter configuration 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.5.0/kong/wasmtime_version_bump.yml: -------------------------------------------------------------------------------- 1 | message: Bump Wasmtime version to 12.0.2 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong-manager/entity_form_preview.yml: -------------------------------------------------------------------------------- 1 | message: Added a JSON/YAML format preview for all entity forms. 2 | type: feature 3 | githubs: [157] -------------------------------------------------------------------------------- /changelog/3.6.0/kong-manager/redesigned_basic_components.yml: -------------------------------------------------------------------------------- 1 | message: Adopted resigned basic components for better UI/UX. 2 | type: feature 3 | githubs: [131, 166] -------------------------------------------------------------------------------- /changelog/3.6.0/kong-manager/standardized_notification_format.yml: -------------------------------------------------------------------------------- 1 | message: Standardized notification text format. 2 | type: bugfix 3 | githubs: [140] -------------------------------------------------------------------------------- /changelog/3.6.0/kong-manager/unified_plugin_pages.yml: -------------------------------------------------------------------------------- 1 | message: Kong Manager and Konnect now share the same UI for plugin selection page and plugin form page. 2 | type: feature 3 | githubs: [143, 147] -------------------------------------------------------------------------------- /changelog/3.6.0/kong/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/changelog/3.6.0/kong/.gitkeep -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-prompt-decorator-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Prompt Decorator** plugin that enables prepending and appending llm/v1/chat messages onto consumer LLM requests, for prompt tuning. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-prompt-guard-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Prompt Guard** which can allow and/or block LLM requests based on pattern matching. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-prompt-template-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Prompt Template** which can offer consumers and array of LLM prompt templates, with variable substitutions. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-proxy-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Proxy** plugin that enables simplified integration with various AI provider Large Language Models. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-proxy-telemetry.yml: -------------------------------------------------------------------------------- 1 | message: Adds telemetry collection for AI Proxy, AI Request Transformer, and AI Response Transformer, pertaining to model and provider usage. 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-request-transformer-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Request Transformer** plugin that enables passing mid-flight consumer requests to an LLM for transformation or sanitization. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-ai-response-transformer-plugin.yml: -------------------------------------------------------------------------------- 1 | message: Introduced the new **AI Response Transformer** plugin that enables passing mid-flight upstream responses to an LLM for transformation or sanitization. 2 | type: feature 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add-gateway-edition-to-root-endpoint-admin-api.yml: -------------------------------------------------------------------------------- 1 | message: add gateway edition to the root endpoint of the admin api 2 | type: feature 3 | scope: Admin API 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/add_ngx_brotli_module.yml: -------------------------------------------------------------------------------- 1 | message: add ngx_brotli module to kong prebuild nginx 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/atc_reuse_context.yml: -------------------------------------------------------------------------------- 1 | message: "Reuse match context between requests to avoid frequent memory allocation/deallocation" 2 | type: performance 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/basic_www_authenticate.yml: -------------------------------------------------------------------------------- 1 | message: Add missing WWW-Authenticate headers to 401 response in basic auth plugin. 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-atc-router.yml: -------------------------------------------------------------------------------- 1 | message: Bumped atc-router from 1.2.0 to 1.6.0 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-cocurrency-limit-of-timer-ng.yml: -------------------------------------------------------------------------------- 1 | message: Bumped the concurrency range of the lua-resty-timer-ng library from [32, 256] to [512, 2048]. 2 | type: performance 3 | scope: Performance 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lapis-1.16.0.1.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped kong-lapis from 1.14.0.3 to 1.16.0.1" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lpeg-1.1.0.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped LPEG from 1.0.2 to 1.1.0" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-messagepack-0.5.3.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-messagepack from 0.5.2 to 0.5.3" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-messagepack-0.5.4.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-messagepack from 0.5.3 to 0.5.4" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-resty-aws-1.3.6.yml: -------------------------------------------------------------------------------- 1 | message: Bumped lua-resty-aws from 1.3.5 to 1.3.6 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-resty-healthcheck-3.0.1.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-healthcheck from 3.0.0 to 3.0.1" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-resty-lmdb-1.4.1.yml: -------------------------------------------------------------------------------- 1 | message: Bumped lua-resty-lmdb from 1.3.0 to 1.4.1 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-lua-resty-timer-ng-to-0.2.6.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-timer-ng from 0.2.5 to 0.2.6" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-ngx-wasm-module.yml: -------------------------------------------------------------------------------- 1 | message: "Bump `ngx_wasm_module` to `a7087a37f0d423707366a694630f1e09f4c21728`" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-openresty.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped OpenResty from 1.21.4.2 to 1.25.3.1" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-openssl.yml: -------------------------------------------------------------------------------- 1 | message: Bumped OpenSSL from 3.1.4 to 3.2.1 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-resty-openssl.yml: -------------------------------------------------------------------------------- 1 | message: Bump resty-openssl from 0.8.25 to 1.2.0 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump-wasmtime.yml: -------------------------------------------------------------------------------- 1 | message: "Bump `Wasmtime` version to `14.0.3`" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump_dns_stale_ttl.yml: -------------------------------------------------------------------------------- 1 | message: Bump `dns_stale_ttl` default to 1 hour so stale DNS record can be used for longer time in case of resolver downtime. 2 | type: performance 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump_ngx_brotli.yml: -------------------------------------------------------------------------------- 1 | message: Bumped ngx_brotli to master branch, and disabled it on rhel7 rhel9-arm64 and amazonlinux-2023-arm64 due to toolchain issues 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/bump_openssl_from_3_1_4_to_3_2_0.yml: -------------------------------------------------------------------------------- 1 | message: >- 2 | In OpenSSL 3.2, the default SSL/TLS security level has been changed from 1 to 2. 3 | Which means security level set to 112 bits of security. As a result 4 | RSA, DSA and DH keys shorter than 2048 bits and ECC keys shorter than 5 | 224 bits are prohibited. In addition to the level 1 exclusions any cipher 6 | suite using RC4 is also prohibited. SSL version 3 is also not allowed. 7 | Compression is disabled. 8 | type: breaking_change 9 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/ca_certificates_reference_check.yml: -------------------------------------------------------------------------------- 1 | message: prevent ca to be deleted when it's still referenced by other entities and invalidate the related ca store caches when a ca cert is updated. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/clustering-empty-data-plane-hash-fix.yml: -------------------------------------------------------------------------------- 1 | message: Fix a bug causing data-plane status updates to fail when an empty PING frame is received from a data-plane 2 | type: bugfix 3 | scope: Clustering 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/cookie-name-validator.yml: -------------------------------------------------------------------------------- 1 | message: Now cookie names are validated against RFC 6265, which allows more characters than the previous validation. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/cp-expose-dp-cert-details.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **Clustering**: Expose data plane certificate expiry date on the control plane API. 3 | type: feature 4 | scope: Clustering 5 | 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/dao-pk-as-entity.yml: -------------------------------------------------------------------------------- 1 | message: Allow primary key passed as a full entity to DAO functions. 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/debian-12-support.yml: -------------------------------------------------------------------------------- 1 | message: "Build deb packages for Debian 12. The debian variant of kong docker image is built using Debian 12 now." 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/declarative_config_fix.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Remove nulls only if the schema has transformations definitions. 3 | Improve performance as most schemas does not define transformations. 4 | type: bugfix 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/default_status_port.yml: -------------------------------------------------------------------------------- 1 | message: Enable `status_listen` on `127.0.0.1:8007` by default 2 | type: feature 3 | scope: Admin API 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/deps_bump_lua_resty_healthcheck.yml: -------------------------------------------------------------------------------- 1 | message: Bumped lua-resty-healthcheck from 1.6.3 to 3.0.0 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/display-warning-message-for-km-misconfig.yml: -------------------------------------------------------------------------------- 1 | message: display a warning message when Kong Manager is enabled but the Admin API is not enabled 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/enhance_admin_api_auth_error_response.yml: -------------------------------------------------------------------------------- 1 | message: "Enhance error responses for authentication failures in the Admin API" 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/error_handler_494.yml: -------------------------------------------------------------------------------- 1 | message: Fix a bug that the error_handler can not provide the meaningful response body when the internal error code 494 is triggered. 2 | type: bugfix 3 | scope: Core -------------------------------------------------------------------------------- /changelog/3.6.0/kong/expression_http_headers_sensitive.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Header value matching (`http.headers.*`) in `expressions` router flavor are now case sensitive. 3 | This change does not affect on `traditional_compatible` mode 4 | where header value match are always performed ignoring the case. 5 | type: bugfix 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/expressions_not_operator.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | The expressions route now supports the `!` (not) operator, which allows creating routes like 3 | `!(http.path =^ "/a")` and `!(http.path == "/a" || http.path == "/b")` 4 | type: "feature" 5 | scope: "Core" 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/feat-add-cipher-to-the-intermediate.yml: -------------------------------------------------------------------------------- 1 | message: add DHE-RSA-CHACHA20-POLY1305 cipher to the intermediate configuration 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-declarative-config-flattened-data-loss.yml: -------------------------------------------------------------------------------- 1 | message: fix error data loss caused by weakly typed of function in declarative_config_flattened function 2 | type: bugfix 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-error-message-print.yml: -------------------------------------------------------------------------------- 1 | message: print error message correctly when plugin fails 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-ldoc-intermittent-fail.yml: -------------------------------------------------------------------------------- 1 | message: fix ldoc intermittent failure caused by LuaJIT error. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-pdk-response-set-header-with-table.yml: -------------------------------------------------------------------------------- 1 | message: "response.set_header support header argument with table array of string" 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-upstream-uri-azure-function-plugin.yml: -------------------------------------------------------------------------------- 1 | message: "**azure-functions**: azure-functions plugin now eliminates upstream/request URI and only use `routeprefix` configuration field to construct request path when requesting Azure API" 2 | type: breaking_change 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix-wasm-module-branch.yml: -------------------------------------------------------------------------------- 1 | message: use NGX_WASM_MODULE_BRANCH environment variable to set ngx_wasm_module repository branch when building Kong. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix_dns_blocking.yml: -------------------------------------------------------------------------------- 1 | message: Eliminate asynchronous timer in syncQuery() to prevent hang risk 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix_dns_disable_dns_no_sync.yml: -------------------------------------------------------------------------------- 1 | message: The default value of `dns_no_sync` option has been changed to `off` 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/fix_dns_instrument_error_handling.yml: -------------------------------------------------------------------------------- 1 | message: "**tracing:** Fixed an issue where a DNS query failure would cause a tracing failure." 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/inject-nginx-directives-location.yml: -------------------------------------------------------------------------------- 1 | message: Allow to inject Nginx directives into Kong's proxy location block 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/introduce_lmdb_validation_tag.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Validate LMDB cache by Kong's version (major + minor), 3 | wiping the content if tag mismatch to avoid compatibility issues 4 | during minor version upgrade. 5 | type: feature 6 | scope: Configuration 7 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/log-serializer-source-property.yml: -------------------------------------------------------------------------------- 1 | message: 'Add `source` property to log serializer, indicating the response is generated by `kong` or `upstream`.' 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/optimize_keepalive_parameters.yml: -------------------------------------------------------------------------------- 1 | message: Bumped default values of `nginx_http_keepalive_requests` and `upstream_keepalive_max_requests` to `10000`. These changes are optimized to work better in systems with high throughput. In a low-throughput setting, these new settings may have visible effects in loadbalancing - it can take more requests to start using all the upstreams than before. 2 | type: performance 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/pdk-json-encoding-numbers-precision.yml: -------------------------------------------------------------------------------- 1 | message: Increase the precision of JSON number encoding from 14 to 16 decimals 2 | type: feature 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/pdk-response-send-remove-transfer-encoding.yml: -------------------------------------------------------------------------------- 1 | message: Fix an issue that when using kong.response.exit, the Transfer-Encoding header set by user is not removed 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/perf-tracing-from-timers.yml: -------------------------------------------------------------------------------- 1 | message: "Performance optimization to avoid unnecessary creations and garbage-collections of spans" 2 | type: "performance" 3 | scope: "PDK" 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/plugin-server-instance-leak.yml: -------------------------------------------------------------------------------- 1 | message: "**Plugin Server**: fix an issue where every request causes a new plugin instance to be created" 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/postremove.yml: -------------------------------------------------------------------------------- 1 | message: "Ensure Kong-owned directories are cleaned up after an uninstall using the system's package manager." 2 | type: feature 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/prometheus_expose_no_service_metrics.yml: -------------------------------------------------------------------------------- 1 | message: "Expose metrics for serviceless routes" 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/rate-limiting-fix-redis-sync-rate.yml: -------------------------------------------------------------------------------- 1 | message: "**Rate Limiting**: fix to provide better accuracy in counters when sync_rate is used with the redis policy." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/respect-custom-proxy_access_log.yml: -------------------------------------------------------------------------------- 1 | message: "respect custom `proxy_access_log`" 2 | type: bugfix 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/rl-shared-sync-timer.yml: -------------------------------------------------------------------------------- 1 | message: "**Rate Limiting**: fix an issuer where all counters are synced to the same DB at the same rate." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/router-report-yield.yml: -------------------------------------------------------------------------------- 1 | message: Cooperatively yield when building statistics of routes to reduce the impact to proxy path latency. 2 | type: performance 3 | scope: Performance 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/serviceless-routes-still-trigger-datalog-plugin.yml: -------------------------------------------------------------------------------- 1 | message: "**Datadog**: Fix a bug that datadog plugin is not triggered for serviceless routes. In this fix, datadog plugin is always triggered, and the value of tag `name`(service_name) is set as an empty value." 2 | type: bugfix 3 | scope: Plugin -------------------------------------------------------------------------------- /changelog/3.6.0/kong/standardize-redis-conifguration-acme.yml: -------------------------------------------------------------------------------- 1 | message: "**ACME**: Standardize redis configuration across plugins. The redis configuration right now follows common schema that is shared across other plugins." 2 | type: deprecation 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/standardize-redis-conifguration-rate-limiting.yml: -------------------------------------------------------------------------------- 1 | message: "**Rate Limiting**: Standardize redis configuration across plugins. The redis configuration right now follows common schema that is shared across other plugins." 2 | type: deprecation 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/standardize-redis-conifguration-response-rl.yml: -------------------------------------------------------------------------------- 1 | message: "**Response-RateLimiting**: Standardize redis configuration across plugins. The redis configuration right now follows common schema that is shared across other plugins." 2 | type: deprecation 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/subsystems_do_not_share_router_schemas.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Expressions route in `http` and `stream` subsystem now have stricter validation. 3 | Previously they share the same validation schema which means admin can configure expressions 4 | route using fields like `http.path` even for stream routes. This is no longer allowed. 5 | type: bugfix 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/support_http_path_segments_field.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Support `http.path.segments.len` and `http.path.segments.*` fields in the expressions router 3 | which allows matching incoming (normalized) request path by individual segment or ranges of segments, 4 | plus checking the total number of segments. 5 | type: feature 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/support_net_src_dst_field_in_expression.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | `net.src.*` and `net.dst.*` match fields are now accessible in HTTP routes defined using expressions. 3 | type: feature 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/tracing-dns-query-patch.yml: -------------------------------------------------------------------------------- 1 | message: "**Tracing**: dns spans are now correctly generated for upstream dns queries (in addition to cosocket ones)" 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/tracing-sampling-rate-scope.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | Tracing Sampling Rate can now be set via the `config.sampling_rate` property 3 | of the OpenTelemetry plugin instead of it just being a global setting for the gateway. 4 | type: feature 5 | scope: Plugin 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/validate_private_key.yml: -------------------------------------------------------------------------------- 1 | message: Validate private and public key for `keys` entity to ensure they match each other. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/wasm-attach.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | **proxy-wasm**: Fixed "previous plan already attached" error thrown when a 3 | filter triggers re-entrancy of the access handler. 4 | type: bugfix 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/wasm-dynamic-properties.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | Extend support for getting and setting Gateway values via proxy-wasm 3 | properties in the `kong.*` namespace. 4 | type: feature 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/3.6.0/kong/wasm-injected-shm-kv.yml: -------------------------------------------------------------------------------- 1 | message: > 2 | **BREAKING:** To avoid ambiguity with other Wasm-related nginx.conf directives, 3 | the prefix for Wasm `shm_kv` nginx.conf directives was changed from 4 | `nginx_wasm_shm_` to `nginx_wasm_shm_kv_` 5 | type: breaking_change 6 | scope: Core 7 | -------------------------------------------------------------------------------- /changelog/changelog-template.yaml: -------------------------------------------------------------------------------- 1 | message: # "Description of your change" (required) 2 | type: # One of "feature", "bugfix", "dependency", "deprecation", "breaking_change", "performance" (required) 3 | scope: # One of "Core", "Plugin", "PDK", "Admin API", "Performance", "Configuration", "Clustering", "Portal", "CLI Command" (optional) 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong-manager/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/changelog/unreleased/kong-manager/.gitkeep -------------------------------------------------------------------------------- /changelog/unreleased/kong/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/kong/6e86e27d24db530f7b89a5fc78fa888b1b06e894/changelog/unreleased/kong/.gitkeep -------------------------------------------------------------------------------- /changelog/unreleased/kong/add-ai-data-report.yml: -------------------------------------------------------------------------------- 1 | "message": Added `events:ai:response_tokens`, `events:ai:prompt_tokens` and `events:ai:requests` to the anonymous report to start counting AI usage 2 | "type": feature 3 | "scope": Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/add-messages-api-to-anthropic.yml: -------------------------------------------------------------------------------- 1 | "message": | 2 | **AI Proxy**: To support the new messages API of `Anthropic`, the upstream path of the `Anthropic` for `llm/v1/chat` route type has changed from `/v1/complete` to `/v1/messages`. 3 | "type": breaking_change 4 | "scope": Plugin 5 | "jiras": 6 | - FTI-5770 7 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/add_tzdata.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Added package `tzdata` to DEB Docker image for convenient timezone setting. 3 | type: dependency 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/ai-proxy-client-params.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | AI Proxy now reads most prompt tuning parameters from the client, 3 | while the plugin config parameters under `model_options` are now just defaults. 4 | This fixes support for using the respective provider's native SDK. 5 | type: feature 6 | scope: Plugin 7 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/ai-proxy-preserve-mode.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | AI Proxy now has a `preserve` option for `route_type`, where the requests and responses 3 | are passed directly to the upstream LLM. This is to enable compatibility with any 4 | and all models and SDKs that may be used when calling the AI services. 5 | type: feature 6 | scope: Plugin 7 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/analytics-for-anthropic.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **AI-proxy-plugin**: Fixed the bug that the `route_type` `/llm/v1/chat` didn't include the analytics in the responses. 3 | scope: Plugin 4 | type: bugfix 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-atc-router.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped atc-router from v1.6.0 to v1.6.2" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-libexpat.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped libexpat to 2.6.2" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-kong-nginx-module.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Bumped lua-kong-nginx-module from 0.8.0 to 0.11.0 3 | type: dependency 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-protobuf.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-protobuf to 0.5.1" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-acme.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-acme to 0.13.0" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-aws.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-aws from 1.3.6 to 1.4.1" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-healthcheck.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-healthcheck from 3.0.1 to 3.0.2, to reduce active healthcheck timer usage." 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-http-0.17.2.yml: -------------------------------------------------------------------------------- 1 | message: Bumped lua-resty-http to 0.17.2. 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-lmdb.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-lmdb from 1.4.1 to 1.4.2" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-openssl.yml: -------------------------------------------------------------------------------- 1 | message: Bumped lua-resty-openssl from 1.2.0 to 1.3.1 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-lua-resty-timer-ng.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped lua-resty-timer-ng to 0.2.7" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-luarocks.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped LuaRocks from 3.9.2 to 3.11.0" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-ngx-wasm-module.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped `ngx_wasm_module` to `91d447ffd0e9bb08f11cc69d1aa9128ec36b4526`" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-pcre.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped PCRE from the legacy libpcre 8.45 to libpcre2 10.43" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-penlight.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped penlight to 1.14.0" 2 | type: dependency 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-v8.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped `V8` version to `12.0.267.17`" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/bump-wasmtime.yml: -------------------------------------------------------------------------------- 1 | message: "Bumped `Wasmtime` version to `19.0.0`" 2 | type: dependency 3 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/cleanup_ai.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Improve error handling in AI plugins. 3 | type: bugfix 4 | scope: Plugin 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/decrease-cocurrency-limit-of-timer-ng.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed a bug where, if the the ulimit setting (open files) was low, Kong would fail to start as the `lua-resty-timer-ng` exhausted the available `worker_connections`. Decreased the concurrency range of the `lua-resty-timer-ng` library from `[512, 2048]` to `[256, 1024]` to fix this bug. 3 | type: bugfix 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/disable-TLSv1_1-in-openssl3.yml: -------------------------------------------------------------------------------- 1 | message: TLSv1.1 and lower versions are disabled by default in OpenSSL 3.x. 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-add-workspace-label-to-prometheus.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **Prometheus**: Added workspace label to Prometheus plugin metrics. 3 | type: feature 4 | scope: Plugin 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-ai-proxy-add-streaming.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **AI Proxy**: Added support for streaming event-by-event responses back to the client on supported providers. 3 | scope: Plugin 4 | type: feature 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-dont-allow-priority-with-others.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Do not allow setting priority field in traditional mode route 3 | When 'router_flavor' is configured as 'expressions'. 4 | type: feature 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-emmy-debugger.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Added support for debugging with EmmyLuaDebugger. This feature is a 3 | tech preview and not officially supported by Kong Inc. for now. 4 | type: feature 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-hybrid-sync-mixed-route-policy.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Improved config handling when the CP runs with the router set to the `expressions` flavor: 3 | - If mixed config is detected and a lower DP is attached to the CP, no config will be sent at all 4 | - If the expression is invalid on the CP, no config will be sent at all 5 | - If the expression is invalid on a lower DP, it will be sent to the DP and DP validation will catch this and communicate back to the CP (this could result in partial config application) 6 | type: feature 7 | scope: Core 8 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-increase-ai-anthropic-regex-expression-length.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **AI Prompt Guard**: Increased the maximum length of regex expressions to 500 for the allow and deny parameters. 3 | scope: Plugin 4 | type: feature 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-jwt-eddsa.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Addded support for EdDSA algorithms in JWT plugin 3 | type: feature 4 | scope: Plugin 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-jwt-es512.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Added support for ES512, PS256, PS384, PS512 algorithms in JWT plugin 3 | type: feature 4 | scope: Plugin 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/feat-wasm-general-shm-kv.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Introduced `nginx_wasm_main_shm_kv` configuration parameter, which enables 3 | Wasm filters to use the Proxy-Wasm operations `get_shared_data` and 4 | `set_shared_data` without namespaced keys. 5 | type: feature 6 | scope: Configuration 7 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-acme-renewal-bug.yml: -------------------------------------------------------------------------------- 1 | message: "**ACME**: Fixed an issue where the certificate was not successfully renewed during ACME renewal." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-age-header.yml: -------------------------------------------------------------------------------- 1 | message: "proxy-cache response_headers age schema parameter changed from age to Age." 2 | type: bugfix 3 | scope: "Plugin" 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-aws-lambda-gateway-compat-version-field.yml: -------------------------------------------------------------------------------- 1 | message: "**AWS-Lambda**: Fixed an issue that the `version` field is not set in the request payload when `awsgateway_compatible` is enabled." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-aws-lambda-kong-latency.yml: -------------------------------------------------------------------------------- 1 | message: "**AWS-Lambda**: Fixed an issue where the latency attributed to AWS Lambda API requests was counted as part of the latency in Kong." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-cjson-t-end.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Improved the robustness of lua-cjson when handling unexpected input. 3 | type: dependency 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-cli-db-timeout-overrides.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue where the `pg_timeout` was overridden to `60s` even if `--db-timeout` 3 | was not explicitly passed in CLI arguments. 4 | type: bugfix 5 | scope: CLI Command 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-ctx-host-port.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **PDK:** Fixed `kong.request.get_forwarded_port` to always return a number, 3 | which was caused by an incorrectly stored string value in `ngx.ctx.host_port`. 4 | type: bugfix 5 | scope: PDK 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-dbless-duplicate-target-error.yml: -------------------------------------------------------------------------------- 1 | message: "Fixed an issue where `POST /config?flatten_errors=1` could not return a proper response if the input included duplicate upstream targets." 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-default-value-of-upstream-keepalive-max-requests.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed the default value in kong.conf.default documentation from 1000 to 10000 3 | for the `upstream_keepalive_max_requests` option. 4 | type: bugfix 5 | scope: Configuration 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-dns-ignore-records-with-non-matching-types.yml: -------------------------------------------------------------------------------- 1 | message: "**DNS Client**: Ignore records with RR types differs from that of the query when parsing answers." 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-dns-resolv-timeout-zero.yml: -------------------------------------------------------------------------------- 1 | message: "**DNS Client**: Ignore a non-positive values on resolv.conf for options timeout, and use a default value of 2 seconds instead." 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-external-plugin-instance.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue where an external plugin (Go, Javascript, or Python) would fail to 3 | apply a change to the plugin config via the Admin API. 4 | type: bugfix 5 | scope: Configuration 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-file-permission-of-logrotate.yml: -------------------------------------------------------------------------------- 1 | message: Updated the file permission of `kong.logrotate` to 644. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-grpc-gateway-json-decode-bug.yml: -------------------------------------------------------------------------------- 1 | message: "**grpc-gateway**: When there is a JSON decoding error, respond with status 400 and error information in the body instead of status 500." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-hybrid-dp-certificate-with-vault-not-refresh.yml: -------------------------------------------------------------------------------- 1 | message: Fixed a problem on hybrid mode DPs, where a certificate entity configured with a vault reference may not get refreshed on time. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-jwt-plugin-check.yml: -------------------------------------------------------------------------------- 1 | message: "**Jwt**: Fixed an issue where the plugin would fail when using invalid public keys for ES384 and ES512 algorithms." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-migrations-for-redis-plugins-acme.yml: -------------------------------------------------------------------------------- 1 | message: "**ACME**: Fixed migration of redis configuration." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-migrations-for-redis-plugins-response-rl.yml: -------------------------------------------------------------------------------- 1 | message: "**Response-RateLimiting**: Fixed migration of redis configuration." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-migrations-for-redis-plugins-rl.yml: -------------------------------------------------------------------------------- 1 | message: "**Rate-Limiting**: Fixed migration of redis configuration." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-missing-router-section-of-request-debugging.yml: -------------------------------------------------------------------------------- 1 | message: Fixed the missing router section for the output of the request-debugging. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-mlcache-renew-lock-leaks.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue in the internal caching logic where mutexes could get never unlocked. 3 | type: bugfix 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-request-transformer-uri-replace.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue where the URI captures are unavailable when the first capture group is absent. 3 | type: bugfix 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-router-rebuing-flag.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue where the router didn't work correctly 3 | when the route's configuration changed. 4 | type: bugfix 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fixed an issue where SNI-based routing didn't work 3 | using `tls_passthrough` and the `traditional_compatible` router flavor. 4 | type: bugfix 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-upstream-status-unset.yml: -------------------------------------------------------------------------------- 1 | message: Fixed a bug that `X-Kong-Upstream-Status` didn't appear in the response headers even if it was set in the `headers` parameter in the `kong.conf` file when the response was hit and returned by the Proxy Cache plugin. 2 | scope: Core 3 | type: bugfix 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-vault-init-worker.yml: -------------------------------------------------------------------------------- 1 | message: Fixed vault initialization by postponing vault reference resolving on init_worker 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-vault-secret-update-without-ttl.yml: -------------------------------------------------------------------------------- 1 | message: Fixed a bug that allowed vault secrets to refresh even when they had no TTL set. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-vault-workspaces.yml: -------------------------------------------------------------------------------- 1 | message: "**Vault**: do not use incorrect (default) workspace identifier when retrieving vault entity by prefix" 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix-wasm-disable-pwm-lua-resolver.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Disabled usage of the Lua DNS resolver from proxy-wasm by default. 3 | type: bugfix 4 | scope: Configuration 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix_api_405_vaults_validate_endpoint.yml: -------------------------------------------------------------------------------- 1 | message: "**Admin API**: fixed an issue where calling the endpoint `POST /schemas/vaults/validate` was conflicting with the endpoint `/schemas/vaults/:name` which only has GET implemented, hence resulting in a 405." 2 | type: bugfix 3 | scope: Admin API 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix_balancer_healthecker_unexpected_panic.yml: -------------------------------------------------------------------------------- 1 | message: "**Core**: Fixed unexpected table nil panic in the balancer's stop_healthchecks function" 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/fix_privileged_agent_id_1.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Use `-1` as the worker ID of privileged agent to avoid access issues. 3 | type: bugfix 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/flavor-expressions-supports-traditional-fields.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | The route entity now supports the following fields when the 3 | `router_flavor` is `expressions`: `methods`, `hosts`, `paths`, `headers`, 4 | `snis`, `sources`, `destinations`, and `regex_priority`. 5 | The meaning of these fields are consistent with the traditional route entity. 6 | type: feature 7 | scope: Core 8 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/force-no_sync-noip.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Added a new function to bypass the Kong's DNS client synchronization option 3 | when resolving hostnames. 4 | type: feature 5 | scope: Core 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/key_auth_www_authenticate.yml: -------------------------------------------------------------------------------- 1 | message: Added WWW-Authenticate headers to all 401 responses in the Key Auth plugin. 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/log-serializer-receive-latency.yml: -------------------------------------------------------------------------------- 1 | message: 'Added the `latencies.receive` property to the log serializer' 2 | type: feature 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/otel-increase-queue-max-batch-size.yml: -------------------------------------------------------------------------------- 1 | message: "**Opentelemetry**: Increased queue max batch size to 200." 2 | type: performance 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/otel-sampling-panic-when-header-trace-id-enable.yml: -------------------------------------------------------------------------------- 1 | message: "**Opentelemetry**: Fixed an OTEL sampling mode Lua panic bug, which happened when the `http_response_header_for_traceid` option was enabled." 2 | type: bugfix 3 | scope: Plugin 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/plugin-schema-deprecation-record.yml: -------------------------------------------------------------------------------- 1 | message: "**Schema**: Added a deprecation field attribute to identify deprecated fields" 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/plugin_server_restart.yml: -------------------------------------------------------------------------------- 1 | message: "**Plugin Server**: Fixed an issue where Kong failed to properly restart MessagePack-based pluginservers (used in Python and Javascript plugins, for example)." 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/plugins-add-standard-webhooks.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Add standard webhooks plugin 3 | type: feature 4 | scope: Plugin 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/pluginsocket-proto-wrong-type.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Fix an issue where external plugins using the protobuf-based protocol would fail to call the `kong.Service.SetUpstream` method with an error `bad argument #2 to 'encode' (table expected, got boolean)`. 3 | type: bugfix 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/propagation-module-rework.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **OpenTelemetry, Zipkin**: The propagation module has been reworked. The new 3 | options allow better control over the configuration of tracing headers propagation. 4 | type: feature 5 | scope: Plugin 6 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/revert-req-body-limitation-patch.yml: -------------------------------------------------------------------------------- 1 | message: Reverted the hard-coded limitation of the `ngx.read_body()` API in OpenResty upstreams' new versions when downstream connections are in HTTP/2 or HTTP/3 stream modes. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/separate_kong_cache_invalidation_cluster_event_channel.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | Each Kong cache instance now utilizes its own cluster event channel. This approach isolates cache invalidation events and reducing the generation of unnecessary worker events. 3 | type: bugfix 4 | scope: Core 5 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/set_grpc_tls_seclevel.yml: -------------------------------------------------------------------------------- 1 | message: Set security level of gRPC's TLS to 0 when `ssl_cipher_suite` is set to `old`. 2 | type: bugfix 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/speed_up_internal_hooking_mechanism.yml: -------------------------------------------------------------------------------- 1 | message: Improved proxy performance by refactoring internal hooking mechanism. 2 | type: performance 3 | scope: Performance 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/speed_up_router.yml: -------------------------------------------------------------------------------- 1 | message: Sped up the router matching when the `router_flavor` is `traditional_compatible` or `expressions`. 2 | type: performance 3 | scope: Performance 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/tracing-pdk-short-trace-ids.yml: -------------------------------------------------------------------------------- 1 | message: "**Tracing**: enhanced robustness of trace ID parsing" 2 | type: bugfix 3 | scope: PDK 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/update-ai-proxy-telemetry.yml: -------------------------------------------------------------------------------- 1 | message: Updated telemetry collection for AI Plugins to allow multiple plugins data to be set for the same request. 2 | type: bugfix 3 | scope: Core 4 | -------------------------------------------------------------------------------- /changelog/unreleased/kong/wasm-bundled-filters.yml: -------------------------------------------------------------------------------- 1 | message: Added the `wasm_filters` configuration parameter for enabling individual filters 2 | type: feature 3 | scope: Configuration 4 | -------------------------------------------------------------------------------- /changelog/unreleased/migration_of_ai_proxy_plugin.yml: -------------------------------------------------------------------------------- 1 | message: | 2 | **AI-proxy**: A configuration validation is added to prevent from enabling `log_statistics` upon 3 | providers not supporting statistics. Accordingly, the default of `log_statistics` is changed from 4 | `true` to `false`, and a database migration is added as well for disabling `log_statistics` if it 5 | has already been enabled upon unsupported providers. 6 | type: bugfix 7 | -------------------------------------------------------------------------------- /kong/api/routes/snis.lua: -------------------------------------------------------------------------------- 1 | local endpoints = require "kong.api.endpoints" 2 | 3 | 4 | return { 5 | -- deactivate endpoint (use /certificates/sni instead) 6 | ["/snis/:snis/certificate"] = endpoints.disable, 7 | } 8 | -------------------------------------------------------------------------------- /kong/api/routes/targets.lua: -------------------------------------------------------------------------------- 1 | local endpoints = require "kong.api.endpoints" 2 | 3 | 4 | return { 5 | -- deactivate endpoints (use /upstream/{upstream}/targets instead) 6 | ["/targets"] = endpoints.disable, 7 | ["/targets/:targets"] = endpoints.disable, 8 | ["/targets/:targets/upstream"] = endpoints.disable, 9 | } 10 | -------------------------------------------------------------------------------- /kong/cmd/roar.lua: -------------------------------------------------------------------------------- 1 | return { 2 | execute = function() 3 | print [==[ 4 | Kong, Monolith destroyer. 5 | 6 | /\ ____ 7 | <> ( oo ) 8 | <>_| ^^ |_ 9 | <> @ \ 10 | /~~\ . . _ | 11 | /~~~~\ | | 12 | /~~~~~~\/ _| | 13 | |[][][]/ / [m] 14 | |[][][[m] 15 | |[][][]| 16 | |[][][]| 17 | |[][][]| 18 | |[][][]| 19 | |[][][]| 20 | |[][][]| 21 | |[][][]| 22 | |[][][]| 23 | |[|--|]| 24 | |[| |]| 25 | ======== 26 | ========== 27 | |[[ ]]| 28 | ========== 29 | ]==] 30 | end 31 | } 32 | -------------------------------------------------------------------------------- /kong/cmd/utils/tty.lua: -------------------------------------------------------------------------------- 1 | local ffi = require "ffi" 2 | 3 | 4 | ffi.cdef [[ 5 | int isatty(int fd); 6 | ]] 7 | 8 | 9 | local function isatty() 10 | return ffi.C.isatty(0) == 1 11 | end 12 | 13 | 14 | return { 15 | isatty = isatty, 16 | } 17 | -------------------------------------------------------------------------------- /kong/db/dao/services.lua: -------------------------------------------------------------------------------- 1 | 2 | local Services = {} 3 | 4 | -- @ca_id: the id of ca certificate to be searched 5 | -- @limit: the maximum number of entities to return (must >= 0) 6 | -- @return an array of the service entity 7 | function Services:select_by_ca_certificate(ca_id, limit) 8 | local services, err = self.strategy:select_by_ca_certificate(ca_id, limit) 9 | if err then 10 | return nil, err 11 | end 12 | 13 | return self:rows_to_entities(services), nil 14 | end 15 | 16 | return Services 17 | -------------------------------------------------------------------------------- /kong/db/dao/workspaces.lua: -------------------------------------------------------------------------------- 1 | local Workspaces = {} 2 | 3 | 4 | function Workspaces:truncate() 5 | self.super.truncate(self) 6 | if kong.configuration.database == "off" then 7 | return true 8 | end 9 | 10 | local default_ws, err = self:insert({ name = "default" }) 11 | if err then 12 | kong.log.err(err) 13 | return 14 | end 15 | 16 | ngx.ctx.workspace = default_ws.id 17 | kong.default_workspace = default_ws.id 18 | end 19 | 20 | 21 | return Workspaces 22 | -------------------------------------------------------------------------------- /kong/db/declarative/migrations/init.lua: -------------------------------------------------------------------------------- 1 | local route_path = require "kong.db.declarative.migrations.route_path" 2 | 3 | return function(tbl) 4 | if not tbl then 5 | -- we can not migrate without version specified 6 | return 7 | end 8 | 9 | route_path(tbl, tbl._format_version) 10 | 11 | tbl._format_version = "3.0" 12 | end 13 | -------------------------------------------------------------------------------- /kong/db/migrations/core/006_130_to_140.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "upstreams" ADD "host_header" TEXT; 7 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 8 | -- Do nothing, accept existing state 9 | END; 10 | $$; 11 | 12 | 13 | DROP TRIGGER IF EXISTS "delete_expired_cluster_events_trigger" ON "cluster_events"; 14 | DROP FUNCTION IF EXISTS "delete_expired_cluster_events" (); 15 | ]], 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /kong/db/migrations/core/007_140_to_150.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | -- If migrating from 1.x, the "path_handling" column does not exist yet. 5 | -- Create it with a default of 'v1' to fill existing rows. 6 | DO $$ 7 | BEGIN 8 | ALTER TABLE IF EXISTS ONLY "routes" ADD "path_handling" TEXT DEFAULT 'v1'; 9 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 10 | -- Do nothing, accept existing state 11 | END; 12 | $$; 13 | ]], 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /kong/db/migrations/core/010_210_to_211.lua: -------------------------------------------------------------------------------- 1 | -- this migration is empty and makes little sense 2 | -- it contained a Cassandra specific migration at one point 3 | -- this is left as is to not mess up existing migrations in installations worldwide 4 | -- see commit 8a214df628b3c754b1446e94f98eeb7609942761 for history 5 | return { 6 | postgres = { 7 | up = [[ SELECT 1 ]], 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /kong/db/migrations/core/011_212_to_213.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | -- Unique constraint on "name" already adds btree index 5 | DROP INDEX IF EXISTS "workspaces_name_idx"; 6 | ]], 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /kong/db/migrations/core/014_230_to_270.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "services" ADD "enabled" BOOLEAN DEFAULT true; 7 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 8 | -- Do nothing, accept existing state 9 | END; 10 | $$; 11 | ]] 12 | }, 13 | } 14 | 15 | -------------------------------------------------------------------------------- /kong/db/migrations/core/018_310_to_320.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "plugins" ADD "instance_name" TEXT; 7 | ALTER TABLE IF EXISTS ONLY "plugins" ADD CONSTRAINT "plugins_ws_id_instance_name_unique" UNIQUE ("ws_id", "instance_name"); 8 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 9 | -- Do nothing, accept existing state 10 | END; 11 | $$; 12 | ]] 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /kong/db/migrations/core/021_340_to_350.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "clustering_data_planes" ADD "labels" JSONB; 7 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 8 | -- Do nothing, accept existing state 9 | END; 10 | $$; 11 | ]] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kong/db/migrations/core/022_350_to_360.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "clustering_data_planes" ADD "cert_details" JSONB; 7 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 8 | -- Do nothing, accept existing state 9 | END; 10 | $$; 11 | ]] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /kong/db/migrations/subsystems.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { name = "core", namespace = "kong.db.migrations.core", }, 3 | { name = "*plugins", namespace = "kong.plugins.*.migrations", name_pattern = "%s" }, 4 | } 5 | -------------------------------------------------------------------------------- /kong/db/schema/entities/tags.lua: -------------------------------------------------------------------------------- 1 | local typedefs = require "kong.db.schema.typedefs" 2 | 3 | return { 4 | name = "tags", 5 | primary_key = { "tag" }, 6 | endpoint_key = "tag", 7 | dao = "kong.db.dao.tags", 8 | db_export = false, 9 | 10 | fields = { 11 | { tag = typedefs.tag, }, 12 | { entity_name = { description = "The name of the Kong Gateway entity being tagged.", type = "string", required = true }, }, 13 | { entity_id = typedefs.uuid { required = true }, }, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kong/db/strategies/off/tags.lua: -------------------------------------------------------------------------------- 1 | local Tags = {} 2 | 3 | -- Used by /tags/:tag endpoint 4 | -- @tparam string tag_pk the tag value 5 | -- @treturn table|nil,err,offset 6 | function Tags:page_by_tag(tag, size, offset, options) 7 | local key = "tags:" .. tag .. "|list" 8 | return self:page_for_key(key, size, offset, options) 9 | end 10 | 11 | return Tags 12 | -------------------------------------------------------------------------------- /kong/include/kong/model/ca_certificate.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | message CACertificate { 8 | string id = 1; 9 | string cert = 2; 10 | string cert_digest = 3; 11 | int32 created_at = 4; 12 | repeated string tags = 5; 13 | } 14 | -------------------------------------------------------------------------------- /kong/include/kong/model/certificate.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | message Certificate { 8 | string id = 1; 9 | string cert = 2; 10 | string key = 3; 11 | string cert_alt = 4; 12 | string key_alt = 5; 13 | int32 created_at = 6; 14 | repeated string tags = 7; 15 | } 16 | -------------------------------------------------------------------------------- /kong/include/kong/model/consumer.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | message Consumer { 8 | string id = 1; 9 | string custom_id = 2; 10 | string username = 3; 11 | int32 created_at = 4; 12 | repeated string tags = 5; 13 | } 14 | -------------------------------------------------------------------------------- /kong/include/kong/model/parameter.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | message Parameter { 8 | string key = 1; 9 | string value = 2; 10 | int32 created_at = 3; 11 | } 12 | -------------------------------------------------------------------------------- /kong/include/kong/model/sni.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | import "kong/model/certificate.proto"; 8 | 9 | message SNI { 10 | string id = 1; 11 | string name = 2; 12 | int32 created_at = 3; 13 | Certificate certificate = 4; 14 | repeated string tags = 5; 15 | } 16 | -------------------------------------------------------------------------------- /kong/include/kong/model/target.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | import "kong/model/upstream.proto"; 8 | 9 | message Target { 10 | int32 created_at = 1; 11 | string id = 2; 12 | string target = 3; 13 | int32 weight = 4; 14 | repeated string tags = 5; 15 | Upstream upstream = 6; 16 | } 17 | -------------------------------------------------------------------------------- /kong/include/kong/model/workspace.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/kong/koko/internal/gen/wrpc/kong/model;model"; 4 | 5 | package kong.model; 6 | 7 | message Workspace { 8 | string id = 1; 9 | string name = 2; 10 | string comment = 3; 11 | int32 created_at = 4; 12 | } 13 | -------------------------------------------------------------------------------- /kong/plugins/acl/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_acl", 3 | "002_130_to_140", 4 | "003_200_to_210", 5 | "004_212_to_213", 6 | } 7 | -------------------------------------------------------------------------------- /kong/plugins/acme/daos.lua: -------------------------------------------------------------------------------- 1 | local typedefs = require "kong.db.schema.typedefs" 2 | 3 | return { 4 | { 5 | ttl = true, 6 | primary_key = { "id" }, 7 | cache_key = { "key" }, 8 | name = "acme_storage", 9 | fields = { 10 | { id = typedefs.uuid }, 11 | { key = { type = "string", required = true, unique = true, auto = true }, }, 12 | { value = { type = "string", required = true, auto = true }, }, 13 | { created_at = typedefs.auto_timestamp_s }, 14 | }, 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /kong/plugins/acme/migrations/000_base_acme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | CREATE TABLE IF NOT EXISTS "acme_storage" ( 5 | "id" UUID PRIMARY KEY, 6 | "key" TEXT UNIQUE, 7 | "value" TEXT, 8 | "created_at" TIMESTAMP WITH TIME ZONE, 9 | "ttl" TIMESTAMP WITH TIME ZONE 10 | ); 11 | ]], 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /kong/plugins/acme/migrations/001_280_to_300.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | CREATE INDEX IF NOT EXISTS "acme_storage_ttl_idx" ON "acme_storage" ("ttl"); 5 | ]], 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /kong/plugins/acme/migrations/002_320_to_330.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DROP TRIGGER IF EXISTS "acme_storage_ttl_trigger" ON "acme_storage"; 5 | 6 | DO $$ 7 | BEGIN 8 | CREATE TRIGGER "acme_storage_ttl_trigger" 9 | AFTER INSERT ON "acme_storage" 10 | FOR EACH STATEMENT 11 | EXECUTE PROCEDURE batch_delete_expired_rows("ttl"); 12 | EXCEPTION WHEN UNDEFINED_COLUMN OR UNDEFINED_TABLE THEN 13 | -- Do nothing, accept existing state 14 | END$$; 15 | ]], 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /kong/plugins/acme/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_acme", 3 | "001_280_to_300", 4 | "002_320_to_330", 5 | "003_350_to_360", 6 | } 7 | -------------------------------------------------------------------------------- /kong/plugins/acme/reserved_words.lua: -------------------------------------------------------------------------------- 1 | local reserved_words = { 2 | RENEW_KEY_PREFIX = "kong_acme:renew_config:", 3 | RENEW_LAST_RUN_KEY = "kong_acme:renew_last_run", 4 | CERTKEY_KEY_PREFIX = "kong_acme:cert_key:", 5 | } 6 | 7 | return reserved_words 8 | -------------------------------------------------------------------------------- /kong/plugins/acme/storage/config_adapters/redis.lua: -------------------------------------------------------------------------------- 1 | local function redis_config_adapter(conf) 2 | return { 3 | host = conf.host, 4 | port = conf.port, 5 | database = conf.database, 6 | auth = conf.password, 7 | ssl = conf.ssl, 8 | ssl_verify = conf.ssl_verify, 9 | ssl_server_name = conf.server_name, 10 | 11 | namespace = conf.extra_options.namespace, 12 | scan_count = conf.extra_options.scan_count, 13 | } 14 | end 15 | 16 | return redis_config_adapter 17 | -------------------------------------------------------------------------------- /kong/plugins/ai-proxy/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_360_to_370", 3 | } -------------------------------------------------------------------------------- /kong/plugins/basic-auth/handler.lua: -------------------------------------------------------------------------------- 1 | -- Copyright (C) Kong Inc. 2 | local access = require "kong.plugins.basic-auth.access" 3 | local kong_meta = require "kong.meta" 4 | 5 | local BasicAuthHandler = { 6 | VERSION = kong_meta.version, 7 | PRIORITY = 1100, 8 | } 9 | 10 | 11 | function BasicAuthHandler:access(conf) 12 | access.execute(conf) 13 | end 14 | 15 | return BasicAuthHandler 16 | -------------------------------------------------------------------------------- /kong/plugins/basic-auth/migrations/003_200_to_210.lua: -------------------------------------------------------------------------------- 1 | local operations = require "kong.db.migrations.operations.200_to_210" 2 | 3 | 4 | local plugin_entities = { 5 | { 6 | name = "basicauth_credentials", 7 | primary_key = "id", 8 | uniques = {"username"}, 9 | fks = {{name = "consumer", reference = "consumers", on_delete = "cascade"}}, 10 | } 11 | } 12 | 13 | 14 | return operations.ws_migrate_plugin(plugin_entities) 15 | -------------------------------------------------------------------------------- /kong/plugins/basic-auth/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_basic_auth", 3 | "002_130_to_140", 4 | "003_200_to_210", 5 | } 6 | -------------------------------------------------------------------------------- /kong/plugins/bot-detection/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_200_to_210", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/grpc-gateway/schema.lua: -------------------------------------------------------------------------------- 1 | local typedefs = require "kong.db.schema.typedefs" 2 | 3 | return { 4 | name = "grpc-gateway", 5 | fields = { 6 | { protocols = typedefs.protocols }, 7 | { config = { 8 | type = "record", 9 | fields = { 10 | { 11 | proto = { 12 | description = "Describes the gRPC types and methods.", 13 | type = "string", 14 | required = false, 15 | default = nil, 16 | }, 17 | }, 18 | }, 19 | }, }, 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /kong/plugins/hmac-auth/handler.lua: -------------------------------------------------------------------------------- 1 | -- Copyright (C) Kong Inc. 2 | local access = require "kong.plugins.hmac-auth.access" 3 | local kong_meta = require "kong.meta" 4 | 5 | 6 | local HMACAuthHandler = { 7 | VERSION = kong_meta.version, 8 | PRIORITY = 1030, 9 | } 10 | 11 | 12 | function HMACAuthHandler:access(conf) 13 | access.execute(conf) 14 | end 15 | 16 | 17 | return HMACAuthHandler 18 | -------------------------------------------------------------------------------- /kong/plugins/hmac-auth/migrations/003_200_to_210.lua: -------------------------------------------------------------------------------- 1 | local operations = require "kong.db.migrations.operations.200_to_210" 2 | 3 | 4 | local plugin_entities = { 5 | { 6 | name = "hmacauth_credentials", 7 | primary_key = "id", 8 | uniques = {"username"}, 9 | fks = {{name = "consumer", reference = "consumers", on_delete = "cascade"}}, 10 | } 11 | } 12 | 13 | 14 | return operations.ws_migrate_plugin(plugin_entities) 15 | -------------------------------------------------------------------------------- /kong/plugins/hmac-auth/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_hmac_auth", 3 | "002_130_to_140", 4 | "003_200_to_210", 5 | } 6 | -------------------------------------------------------------------------------- /kong/plugins/http-log/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_280_to_300", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/ip-restriction/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_200_to_210", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/jwt/migrations/003_200_to_210.lua: -------------------------------------------------------------------------------- 1 | local operations = require "kong.db.migrations.operations.200_to_210" 2 | 3 | 4 | local plugin_entities = { 5 | { 6 | name = "jwt_secrets", 7 | primary_key = "id", 8 | uniques = {"key"}, 9 | fks = {{name = "consumer", reference = "consumers", on_delete = "cascade"}}, 10 | } 11 | } 12 | 13 | 14 | return operations.ws_migrate_plugin(plugin_entities) 15 | -------------------------------------------------------------------------------- /kong/plugins/jwt/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_jwt", 3 | "002_130_to_140", 4 | "003_200_to_210", 5 | } 6 | -------------------------------------------------------------------------------- /kong/plugins/key-auth/migrations/003_200_to_210.lua: -------------------------------------------------------------------------------- 1 | local operations = require "kong.db.migrations.operations.200_to_210" 2 | 3 | 4 | local plugin_entities = { 5 | { 6 | name = "keyauth_credentials", 7 | primary_key = "id", 8 | uniques = {"key"}, 9 | fks = {{name = "consumer", reference = "consumers", on_delete = "cascade"}}, 10 | } 11 | } 12 | 13 | 14 | return operations.ws_migrate_plugin(plugin_entities) 15 | -------------------------------------------------------------------------------- /kong/plugins/key-auth/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_key_auth", 3 | "002_130_to_140", 4 | "003_200_to_210", 5 | "004_320_to_330", 6 | } 7 | -------------------------------------------------------------------------------- /kong/plugins/ldap-auth/handler.lua: -------------------------------------------------------------------------------- 1 | local access = require "kong.plugins.ldap-auth.access" 2 | local kong_meta = require "kong.meta" 3 | 4 | 5 | local LdapAuthHandler = { 6 | VERSION = kong_meta.version, 7 | PRIORITY = 1200, 8 | } 9 | 10 | 11 | function LdapAuthHandler:access(conf) 12 | access.execute(conf) 13 | end 14 | 15 | 16 | return LdapAuthHandler 17 | -------------------------------------------------------------------------------- /kong/plugins/oauth2/daos/oauth2_tokens.lua: -------------------------------------------------------------------------------- 1 | local oauth2_tokens = {} 2 | 3 | 4 | local sha1_bin = ngx.sha1_bin 5 | local to_hex = require "resty.string".to_hex 6 | 7 | 8 | function oauth2_tokens:cache_key(access_token) 9 | return "oauth2_tokens:" .. to_hex(sha1_bin(self.super.cache_key(self, access_token))) 10 | end 11 | 12 | 13 | return oauth2_tokens 14 | -------------------------------------------------------------------------------- /kong/plugins/oauth2/handler.lua: -------------------------------------------------------------------------------- 1 | local access = require "kong.plugins.oauth2.access" 2 | local kong_meta = require "kong.meta" 3 | 4 | 5 | local OAuthHandler = { 6 | VERSION = kong_meta.version, 7 | PRIORITY = 1400, 8 | } 9 | 10 | 11 | function OAuthHandler:access(conf) 12 | access.execute(conf) 13 | end 14 | 15 | 16 | return OAuthHandler 17 | -------------------------------------------------------------------------------- /kong/plugins/oauth2/migrations/005_210_to_211.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ SELECT 1 ]], 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /kong/plugins/oauth2/migrations/007_320_to_330.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DO $$ 5 | BEGIN 6 | ALTER TABLE IF EXISTS ONLY "oauth2_authorization_codes" ADD "plugin_id" UUID REFERENCES "plugins" ("id") ON DELETE CASCADE; 7 | EXCEPTION WHEN DUPLICATE_COLUMN THEN 8 | -- Do nothing, accept existing state 9 | END$$; 10 | ]], 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /kong/plugins/oauth2/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_oauth2", 3 | "003_130_to_140", 4 | "004_200_to_210", 5 | "005_210_to_211", 6 | "006_320_to_330", 7 | "007_320_to_330", 8 | } 9 | -------------------------------------------------------------------------------- /kong/plugins/opentelemetry/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_331_to_332", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/opentelemetry/proto.lua: -------------------------------------------------------------------------------- 1 | local grpc = require "kong.tools.grpc" 2 | 3 | local proto_fpath = "opentelemetry/proto/collector/trace/v1/trace_service.proto" 4 | 5 | local function load_proto() 6 | local grpc_util = grpc.new() 7 | local protoc_instance = grpc_util.protoc_instance 8 | 9 | protoc_instance:loadfile(proto_fpath) 10 | end 11 | 12 | load_proto() 13 | -------------------------------------------------------------------------------- /kong/plugins/post-function/handler.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function._handler")(-1000) 2 | -------------------------------------------------------------------------------- /kong/plugins/post-function/migrations/001_280_to_300.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function.migrations._001_280_to_300")("post-function") 2 | -------------------------------------------------------------------------------- /kong/plugins/post-function/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_280_to_300", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/post-function/schema.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function._schema")("post-function") 2 | -------------------------------------------------------------------------------- /kong/plugins/pre-function/handler.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function._handler")(1000000) 2 | -------------------------------------------------------------------------------- /kong/plugins/pre-function/migrations/001_280_to_300.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function.migrations._001_280_to_300")("pre-function") 2 | -------------------------------------------------------------------------------- /kong/plugins/pre-function/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "001_280_to_300", 3 | } 4 | -------------------------------------------------------------------------------- /kong/plugins/pre-function/schema.lua: -------------------------------------------------------------------------------- 1 | return require("kong.plugins.pre-function._schema")("pre-function") 2 | -------------------------------------------------------------------------------- /kong/plugins/prometheus/grafana/README.md: -------------------------------------------------------------------------------- 1 | # Grafana integration 2 | 3 | kong-official.json is the source of the Grafana dashboard at 4 | https://grafana.com/grafana/dashboards/7424 5 | 6 | The copy in this repository and the copy on Grafana Labs should be kept in 7 | sync. Currently, this must be handled manually: if you make changes here, you 8 | will need to log in to Grafana labs and upload the new version, or vice-versa. 9 | -------------------------------------------------------------------------------- /kong/plugins/prometheus/status_api.lua: -------------------------------------------------------------------------------- 1 | local prometheus = require "kong.plugins.prometheus.exporter" 2 | 3 | 4 | return { 5 | ["/metrics"] = { 6 | GET = function() 7 | prometheus.collect() 8 | end, 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /kong/plugins/proxy-cache/clustering/compat/response_headers_translation.lua: -------------------------------------------------------------------------------- 1 | local function adapter(config_to_update) 2 | if config_to_update.response_headers["Age"] ~= nil then 3 | config_to_update.response_headers.age = config_to_update.response_headers["Age"] 4 | config_to_update.response_headers["Age"] = nil 5 | return true 6 | end 7 | 8 | return false 9 | end 10 | 11 | return { 12 | adapter = adapter 13 | } 14 | -------------------------------------------------------------------------------- /kong/plugins/rate-limiting/expiration.lua: -------------------------------------------------------------------------------- 1 | return { 2 | second = 1, 3 | minute = 60, 4 | hour = 3600, 5 | day = 86400, 6 | month = 2592000, 7 | year = 31536000, 8 | } 9 | -------------------------------------------------------------------------------- /kong/plugins/rate-limiting/migrations/003_10_to_112.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | CREATE INDEX IF NOT EXISTS ratelimiting_metrics_idx ON ratelimiting_metrics (service_id, route_id, period_date, period); 5 | ]], 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /kong/plugins/rate-limiting/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_rate_limiting", 3 | "003_10_to_112", 4 | "004_200_to_210", 5 | "005_320_to_330", 6 | "006_350_to_360", 7 | } 8 | -------------------------------------------------------------------------------- /kong/plugins/request-transformer/handler.lua: -------------------------------------------------------------------------------- 1 | local access = require "kong.plugins.request-transformer.access" 2 | local kong_meta = require "kong.meta" 3 | 4 | 5 | local RequestTransformerHandler = { 6 | VERSION = kong_meta.version, 7 | PRIORITY = 801, 8 | } 9 | 10 | 11 | function RequestTransformerHandler:access(conf) 12 | access.execute(conf) 13 | end 14 | 15 | 16 | return RequestTransformerHandler 17 | -------------------------------------------------------------------------------- /kong/plugins/request-transformer/migrations/postgres.lua: -------------------------------------------------------------------------------- 1 | local common = require "kong.plugins.request-transformer.migrations.common" 2 | 3 | 4 | return { 5 | { 6 | name = "2017-11-28-120000_request-transformer-advanced-rename", 7 | up = common.rt_rename, 8 | down = function() end, 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /kong/plugins/response-ratelimiting/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_response_rate_limiting", 3 | "001_350_to_360", 4 | } 5 | -------------------------------------------------------------------------------- /kong/plugins/session/handler.lua: -------------------------------------------------------------------------------- 1 | local access = require "kong.plugins.session.access" 2 | local header_filter = require "kong.plugins.session.header_filter" 3 | local kong_meta = require "kong.meta" 4 | 5 | 6 | local KongSessionHandler = { 7 | PRIORITY = 1900, 8 | VERSION = kong_meta.version, 9 | } 10 | 11 | 12 | function KongSessionHandler:header_filter(conf) 13 | header_filter.execute(conf) 14 | end 15 | 16 | 17 | function KongSessionHandler:access(conf) 18 | access.execute(conf) 19 | end 20 | 21 | 22 | return KongSessionHandler 23 | -------------------------------------------------------------------------------- /kong/plugins/session/migrations/001_add_ttl_index.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | CREATE INDEX IF NOT EXISTS sessions_ttl_idx ON sessions (ttl); 5 | ]], 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /kong/plugins/session/migrations/002_320_to_330.lua: -------------------------------------------------------------------------------- 1 | return { 2 | postgres = { 3 | up = [[ 4 | DROP TRIGGER IF EXISTS "sessions_ttl_trigger" ON "sessions"; 5 | 6 | DO $$ 7 | BEGIN 8 | CREATE TRIGGER "sessions_ttl_trigger" 9 | AFTER INSERT ON "sessions" 10 | FOR EACH STATEMENT 11 | EXECUTE PROCEDURE batch_delete_expired_rows("ttl"); 12 | EXCEPTION WHEN UNDEFINED_COLUMN OR UNDEFINED_TABLE THEN 13 | -- Do nothing, accept existing state 14 | END$$; 15 | ]], 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /kong/plugins/session/migrations/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "000_base_session", 3 | "001_add_ttl_index", 4 | "002_320_to_330", 5 | } 6 | -------------------------------------------------------------------------------- /kong/plugins/standard-webhooks/handler.lua: -------------------------------------------------------------------------------- 1 | local plugin = require "kong.plugins.standard-webhooks.internal" 2 | 3 | local StandardWebhooks = { 4 | VERSION = require("kong.meta").version, 5 | PRIORITY = 760 6 | } 7 | 8 | function StandardWebhooks:access(conf) 9 | plugin.access(conf) 10 | end 11 | 12 | return StandardWebhooks 13 | -------------------------------------------------------------------------------- /kong/plugins/statsd/constants.lua: -------------------------------------------------------------------------------- 1 | -- Common constants 2 | local constants = { 3 | -- Lua style pattern, used in schema validation 4 | REGEX_STATUS_CODE_RANGE = [[^[0-9]+-[0-9]+$]], 5 | -- PCRE pattern, used in log_handler.lua 6 | REGEX_SPLIT_STATUS_CODES_BY_DASH = [[(\d\d\d)-(\d\d\d)]], 7 | } 8 | 9 | return constants 10 | -------------------------------------------------------------------------------- /kong/plugins/statsd/handler.lua: -------------------------------------------------------------------------------- 1 | local log = require "kong.plugins.statsd.log" 2 | local kong_meta = require "kong.meta" 3 | 4 | 5 | local StatsdHandler = { 6 | PRIORITY = 11, 7 | VERSION = kong_meta.version, 8 | } 9 | 10 | 11 | function StatsdHandler:log(conf) 12 | log.execute(conf) 13 | end 14 | 15 | 16 | return StatsdHandler 17 | -------------------------------------------------------------------------------- /kong/plugins/zipkin/README.md: -------------------------------------------------------------------------------- 1 | # Testing the zipkin plugin: 2 | 3 | Run postgres locally. 4 | 5 | docker run -it -p 15002:9000 -p 15003:9001 kong/grpcbin 6 | docker run -p 9411:9411 -it openzipkin/zipkin:2.19 7 | 8 | KONG_SPEC_TEST_GRPCBIN_PORT=15002 \ 9 | KONG_SPEC_TEST_GRPCBIN_SSL_PORT=15003 \ 10 | bin/busted spec/03-plugins/34-zipkin/ 11 | -------------------------------------------------------------------------------- /kong/templates/nginx_inject.lua: -------------------------------------------------------------------------------- 1 | return [[ 2 | > if database == "off" then 3 | lmdb_environment_path ${{LMDB_ENVIRONMENT_PATH}}; 4 | lmdb_map_size ${{LMDB_MAP_SIZE}}; 5 | 6 | > if lmdb_validation_tag then 7 | lmdb_validation_tag $(lmdb_validation_tag); 8 | > end 9 | 10 | > end 11 | ]] 12 | -------------------------------------------------------------------------------- /kong/templates/nginx_kong_inject.lua: -------------------------------------------------------------------------------- 1 | return [[ 2 | lua_ssl_verify_depth ${{LUA_SSL_VERIFY_DEPTH}}; 3 | > if lua_ssl_trusted_certificate_combined then 4 | lua_ssl_trusted_certificate '${{LUA_SSL_TRUSTED_CERTIFICATE_COMBINED}}'; 5 | > end 6 | lua_ssl_protocols ${{NGINX_HTTP_LUA_SSL_PROTOCOLS}}; 7 | ]] 8 | -------------------------------------------------------------------------------- /kong/templates/nginx_kong_stream_inject.lua: -------------------------------------------------------------------------------- 1 | return [[ 2 | lua_ssl_verify_depth ${{LUA_SSL_VERIFY_DEPTH}}; 3 | > if lua_ssl_trusted_certificate_combined then 4 | lua_ssl_trusted_certificate '${{LUA_SSL_TRUSTED_CERTIFICATE_COMBINED}}'; 5 | > end 6 | lua_ssl_protocols ${{NGINX_STREAM_LUA_SSL_PROTOCOLS}}; 7 | ]] 8 | -------------------------------------------------------------------------------- /kong/timing/hooks/init.lua: -------------------------------------------------------------------------------- 1 | local _M = {} 2 | 3 | -- order matters 4 | local HOOKS = { 5 | "socket", 6 | "dns", 7 | "http", 8 | "redis", 9 | } 10 | 11 | 12 | function _M.register_hooks(timing_module) 13 | for _, hook_name in ipairs(HOOKS) do 14 | local hook_module = require("kong.timing.hooks." .. hook_name) 15 | hook_module.register_hooks(timing_module) 16 | end 17 | end 18 | 19 | 20 | return _M 21 | -------------------------------------------------------------------------------- /kong/tools/cjson.lua: -------------------------------------------------------------------------------- 1 | local cjson = require "cjson.safe".new() 2 | local CJSON_MAX_PRECISION = require "kong.constants".CJSON_MAX_PRECISION 3 | 4 | 5 | cjson.decode_array_with_array_mt(true) 6 | cjson.encode_sparse_array(nil, nil, 2^15) 7 | cjson.encode_number_precision(CJSON_MAX_PRECISION) 8 | 9 | 10 | local _M = {} 11 | 12 | 13 | _M.encode = cjson.encode 14 | _M.decode_with_array_mt = cjson.decode 15 | 16 | 17 | _M.array_mt = cjson.array_mt 18 | 19 | 20 | return _M 21 | -------------------------------------------------------------------------------- /kong/vaults/env/schema.lua: -------------------------------------------------------------------------------- 1 | return { 2 | name = "env", 3 | fields = { 4 | { 5 | config = { 6 | type = "record", 7 | fields = { 8 | { prefix = { type = "string", match = [[^[%a_-][%a%d_-]*$]], description = "The prefix for the environment variable that the value will be stored in." } }, 9 | }, 10 | }, 11 | }, 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /scripts/explain_manifest/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | -------------------------------------------------------------------------------- /scripts/explain_manifest/filelist.txt: -------------------------------------------------------------------------------- 1 | **/*.so 2 | **/kong/lib/**.so* 3 | **/kong/gui 4 | **/kong/portal 5 | **/kong/include/kong 6 | **/kong/include/google 7 | **/openresty/nginx/sbin/nginx 8 | **/share/xml/xsd 9 | /etc/kong/kong.logrotate 10 | /lib/systemd/system/** 11 | -------------------------------------------------------------------------------- /scripts/explain_manifest/requirements.txt: -------------------------------------------------------------------------------- 1 | lief==0.12.* 2 | globmatch==2.0.* 3 | pyelftools==0.29 4 | looseversion==1.1.2 5 | -------------------------------------------------------------------------------- /scripts/grep-kong-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # unofficial strict mode 4 | set -euo pipefail 5 | 6 | kong_version=$(echo kong-*.rockspec | sed 's,.*/,,' | cut -d- -f2) 7 | 8 | if test -f "kong/enterprise_edition/meta.lua"; then 9 | ee_patch=$(grep -o -E 'ee_patch[ \t]+=[ \t]+[0-9]+' kong/enterprise_edition/meta.lua | awk '{print $3}') 10 | kong_version="$kong_version.$ee_patch" 11 | fi 12 | 13 | echo "$kong_version" 14 | -------------------------------------------------------------------------------- /scripts/upgrade-tests/source-versions: -------------------------------------------------------------------------------- 1 | 2.8.0 2 | 3.4.0 3 | -------------------------------------------------------------------------------- /spec/04-perf/99-teardown/01-teardown_spec.lua: -------------------------------------------------------------------------------- 1 | -- run this file, if want to reuse an infra and only do a cleanup at the end 2 | 3 | local perf = require("spec.helpers.perf") 4 | 5 | perf.use_defaults() 6 | 7 | perf.teardown(os.getenv("PERF_TEST_TEARDOWN_ALL") or false) -------------------------------------------------------------------------------- /spec/05-migration/db/migrations/core/017_300_to_310_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function() 4 | uh.old_after_up("has created the expected new columns", function() 5 | assert.table_has_column("upstreams", "use_srv_name", "boolean") 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /spec/05-migration/db/migrations/core/018_310_to_320_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function() 4 | uh.old_after_up("has created the expected new columns", function() 5 | assert.table_has_column("plugins", "instance_name", "text") 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /spec/05-migration/db/migrations/core/021_340_to_350_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function() 4 | uh.old_after_up("has created the expected new columns", function() 5 | assert.table_has_column("clustering_data_planes", "labels", "jsonb") 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /spec/05-migration/db/migrations/core/022_350_to_360_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function() 4 | uh.old_after_up("has created the expected new columns", function() 5 | assert.table_has_column("clustering_data_planes", "cert_details", "jsonb") 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/acme/migrations/002_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | if uh.database_type() == "postgres" then 5 | uh.all_phases("has created the expected triggers", function () 6 | assert.database_has_trigger("acme_storage_ttl_trigger") 7 | end) 8 | end 9 | end) 10 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/key-auth/migrations/004_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | if uh.database_type() == "postgres" then 5 | uh.all_phases("has created the expected triggers", function () 6 | assert.database_has_trigger("keyauth_credentials_ttl_trigger") 7 | end) 8 | end 9 | end) 10 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/oauth2/migrations/006_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | if uh.database_type() == "postgres" then 5 | uh.all_phases("has created the expected triggers", function () 6 | assert.database_has_trigger("oauth2_authorization_codes_ttl_trigger") 7 | assert.database_has_trigger("oauth2_tokens_ttl_trigger") 8 | end) 9 | end 10 | end) 11 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/oauth2/migrations/007_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | uh.all_phases("has added the plugin_id column", function () 5 | assert.table_has_column("oauth2_authorization_codes", "plugin_id", "uuid") 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/rate-limiting/migrations/005_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | if uh.database_type() == "postgres" then 5 | uh.all_phases("has created the expected triggers", function () 6 | assert.database_has_trigger("ratelimiting_metrics_ttl_trigger") 7 | end) 8 | end 9 | end) 10 | -------------------------------------------------------------------------------- /spec/05-migration/plugins/session/migrations/002_320_to_330_spec.lua: -------------------------------------------------------------------------------- 1 | local uh = require "spec/upgrade_helpers" 2 | 3 | describe("database migration", function () 4 | if uh.database_type() == "postgres" then 5 | uh.all_phases("has created the expected triggers", function () 6 | assert.database_has_trigger("sessions_ttl_trigger") 7 | end) 8 | end 9 | end) 10 | -------------------------------------------------------------------------------- /spec/config.ld: -------------------------------------------------------------------------------- 1 | project='Kong test helpers' 2 | title='Kong test framework' 3 | description='Test helper functions for Kong (integration) testing' 4 | format='markdown' 5 | file={'./helpers.lua','./helpers'} 6 | dir='docs' 7 | readme='README.md' 8 | sort=true 9 | sort_modules=true 10 | style='./' 11 | no_space_before_args=true 12 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "segassem":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/requests/good-stream.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages": [ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "stream": true 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/requests/good_own_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "model": "try-to-override-the-model" 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "invalid_request_error", 4 | "message": "Invalid request" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/bad_upstream_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "nothing_object": { 3 | "not_interesting_tag_names": "bad string", 4 | "and_an_array": [ 5 | "because", 6 | "why", 7 | "not" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": [ 3 | { 4 | "text": "The sum of 1 + 1 is 2.", 5 | "type": "text" 6 | } 7 | ], 8 | "model": "claude-2.1", 9 | "stop_reason": "end_turn", 10 | "stop_sequence": "string", 11 | "usage": { 12 | "input_tokens": 0, 13 | "output_tokens": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/internal_server_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |It has come from your Mock AI server.
10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/malformed_usage_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": [ 3 | { 4 | "text": "The sum of 1 + 1 is 2.", 5 | "type": "text" 6 | } 7 | ], 8 | "model": "claude-2.1", 9 | "stop_reason": "end_turn", 10 | "stop_sequence": "string", 11 | "usage": { 12 | "foo": 0, 13 | "bar": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/no_usage_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "content": [ 3 | { 4 | "text": "The sum of 1 + 1 is 2.", 5 | "type": "text" 6 | } 7 | ], 8 | "model": "claude-2.1", 9 | "stop_reason": "end_turn", 10 | "stop_sequence": "string" 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-chat/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "authentication_error", 4 | "message": "Invalid API Key" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-completions/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "tpmorp": "bad prompt?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-completions/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "What are you?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-completions/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "invalid_request_error", 4 | "message": "Invalid request" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-completions/responses/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "completion": " Hello! My name is Claude.", 3 | "stop_reason": "stop_sequence", 4 | "model": "claude-2.1" 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/anthropic/llm-v1-completions/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "authentication_error", 4 | "message": "Invalid API Key" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "segassem":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/requests/good-stream.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages": [ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "stream": true 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/requests/good_own_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "model": "try-to-override-the-model" 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "bad request" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/responses/bad_upstream_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "nothing_object": { 3 | "not_interesting_tag_names": "bad string", 4 | "and_an_array": [ 5 | "because", 6 | "why", 7 | "not" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/responses/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "text": "The sum of 1 + 1 is 2.", 3 | "generation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 4 | "token_count": { 5 | "billed_tokens": 339, 6 | "prompt_tokens": 102, 7 | "response_tokens": 258, 8 | "total_tokens": 360 9 | }, 10 | "meta": { 11 | "api_version": { 12 | "version": "1" 13 | }, 14 | "billed_units": { 15 | "input_tokens": 81, 16 | "output_tokens": 258 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/responses/internal_server_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |It has come from your Mock AI server.
10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-chat/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "invalid api token" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-completions/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "tpmorp": "bad prompt?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-completions/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "What are you?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-completions/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "invalid_request_error", 4 | "message": "Invalid request" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/cohere/llm-v1-completions/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "invalid api token" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/ollama/chat-stream.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "stream": true 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/raw/requests/good-chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a video game knowledgebase." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is Missingno.?" 10 | }, 11 | { 12 | "role": "system", 13 | "content": "Missingno. is a weird character from a popular game." 14 | }, 15 | { 16 | "role": "user", 17 | "content": "Why is it popular?" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/raw/requests/good-completions.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "What is Missingno.?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/raw/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "some error" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/raw/responses/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "generated_text": "[INST]\nWhat is Sans? ?\n[/INST]\n\nIs a well known font." 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/raw/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "Model requires a Pro subscription." 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/llama2/request-transformer/response-in-json.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "generated_text": "[INST]\nWhat is Sans? ?\n[/INST]\n\n{\n \"persons\": [\n {\n \"name\": \"Kong A\",\n \"age\": 62\n },\n {\n \"name\": \"Kong B\",\n \"age\": 84\n }\n ]\n }\n" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "segassem":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/requests/good-stream.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "stream": true 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "stream": false 13 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/requests/good_own_model.json: -------------------------------------------------------------------------------- 1 | { 2 | "messages":[ 3 | { 4 | "role": "system", 5 | "content": "You are a helpful assistant." 6 | }, 7 | { 8 | "role": "user", 9 | "content": "What is 1 + 1?" 10 | } 11 | ], 12 | "model": "try-to-override-the-model", 13 | "stream": false 14 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": null, 4 | "message": "'messages' is a required property", 5 | "param": null, 6 | "type": "invalid_request_error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/responses/bad_upstream_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "nothing_object": { 3 | "not_interesting_tag_names": "bad string", 4 | "and_an_array": [ 5 | "because", 6 | "why", 7 | "not" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/responses/internal_server_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |It has come from your Mock AI server.
10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-chat/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "invalid_api_key", 4 | "message": "Incorrect API key provided: wro****ey. You can find your API key at https://platform.openai.com/account/api-keys.", 5 | "param": null, 6 | "type": "invalid_request_error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-completions/requests/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "tpmorp": "bad prompt?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-completions/requests/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "What are you?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-completions/responses/bad_request.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": null, 4 | "message": "you must provide a 'prompt' parameter", 5 | "param": null, 6 | "type": "invalid_request_error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/openai/llm-v1-completions/responses/unauthorized.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": "invalid_api_key", 4 | "message": "Incorrect API key provided: wro****ey. You can find your API key at https://platform.openai.com/account/api-keys.", 5 | "param": null, 6 | "type": "invalid_request_error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/unit/expected-requests/anthropic/llm-v1-completions.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": "claude-2.1", 3 | "prompt": "Human: Explain why you can't divide by zero?\n\nAssistant:", 4 | "max_tokens_to_sample": 512, 5 | "temperature": 0.5, 6 | "stream": false 7 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/unit/expected-requests/azure/llm-v1-completions.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "Explain why you can't divide by zero?", 3 | "model": "gpt-3.5-turbo-instruct", 4 | "max_tokens": 512, 5 | "temperature": 0.5, 6 | "stream": false, 7 | "top_p": 1 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/unit/expected-requests/cohere/llm-v1-completions.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompt": "Explain why you can't divide by zero?", 3 | "model": "command", 4 | "max_tokens": 512, 5 | "temperature": 0.5, 6 | "p": 0.75, 7 | "k": 5, 8 | "stream": false 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/unit/expected-requests/llama2/ollama/llm-v1-completions.json: -------------------------------------------------------------------------------- 1 | { 2 | "model": "llama2", 3 | "prompt": "Explain why you can't divide by zero?", 4 | "stream": false, 5 | "options": { 6 | "num_predict": 512, 7 | "temperature": 0.5 8 | } 9 | } -------------------------------------------------------------------------------- /spec/fixtures/ai-proxy/unit/expected-requests/llama2/raw/llm-v1-chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "inputs": "%s.
10 |request_id: %s
11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/error_templates/error_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "custom_template_message":"%s", 3 | "request_id":"%s" 4 | } -------------------------------------------------------------------------------- /spec/fixtures/error_templates/error_template.plain: -------------------------------------------------------------------------------- 1 | custom plain template: %s\n 2 | request_id: %s\n -------------------------------------------------------------------------------- /spec/fixtures/error_templates/error_template.xml: -------------------------------------------------------------------------------- 1 | 2 |