Conversation
|
@nic-6443 Please review |
|
cc @membphis |
66eacfc to
575af00
Compare
575af00 to
6ccfccc
Compare
|
@Baoyuantop @nic-6443 @membphis |
There was a problem hiding this comment.
Pull request overview
Adds compatibility for APISIX’s patched cosocket TLS APIs by switching health checks to use tcpsock:tlshandshake() when available, and adds APISIX-only CI + test coverage for TLS/mTLS scenarios.
Changes:
- Update
resty.healthcheckto perform TLS handshakes viatlshandshake(including mTLS cert/key passing) when supported, otherwise fall back tosslhandshake. - Add APISIX-environment TLS and mTLS regression tests for both
lua-resty-worker-eventsandlua-resty-events, plus test certificate fixtures. - Add a GitHub Actions workflow to run the APISIX-specific test suites and ignore
.devcontainer/.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
lib/resty/healthcheck.lua |
Adds tlshandshake support path and adjusts mTLS cert/key handling accordingly. |
t/apisix/lua-resty-worker-events/14-tls_by_tlshandshake.t |
APISIX-only TLS probe tests validating tlshandshake usage. |
t/apisix/lua-resty-worker-events/17-mtls_by_tlshandshake.t |
APISIX-only mTLS probe tests (string PEM vs parsed objects, missing cert behavior). |
t/apisix/lua-resty-events/14-tls_by_tlshandshake.t |
APISIX-only TLS tests for the lua-resty-events backend. |
t/apisix/lua-resty-events/17-mtls_by_tlshandshake.t |
APISIX-only mTLS tests for the lua-resty-events backend. |
t/apisix/certs/mtls_ca.crt |
Test CA certificate for APISIX mTLS suite. |
t/apisix/certs/mtls_ca.key |
Test CA private key for APISIX mTLS suite. |
t/apisix/certs/mtls_client.crt |
Test client certificate for APISIX mTLS suite. |
t/apisix/certs/mtls_client.key |
Test client private key for APISIX mTLS suite. |
t/apisix/certs/mtls_server.crt |
Test server certificate for APISIX mTLS suite. |
t/apisix/certs/mtls_server.key |
Test server private key for APISIX mTLS suite. |
.github/workflows/build_and_test_in_apisix.yml |
Adds CI job to run APISIX-only tests against an APISIX runtime environment. |
.gitignore |
Ignores .devcontainer/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@Baoyuantop @nic-6443 @membphis Who can review the code? If external PR support is not supported, please implement the functionality of this PR within the team. resty-http had implementation of client certificates, https://github.com/api7/lua-resty-http/pull/1/files |

the apisix-nginx-module library add tcpsock:tlshandshake function And made sslhandshake point to its custom tlshandshake function.
healthcheckclient certificates need to be invoked differentlyhttps://github.com/api7/apisix-nginx-module/blob/0327bd759eeab36f2fa20b1f8b80eaf1239c1298/patch/1.27.1.1/lua-resty-core-tlshandshake.patch#L299-L335
There has been discussion:apache/apisix#12641 (comment)
We need to be compatible with changes