fix: address TLS security vulnerabilities in SSL log, OIDC encryption, and K8s ssl_verify#13190
Open
AlinsRan wants to merge 1 commit intoapache:masterfrom
Open
fix: address TLS security vulnerabilities in SSL log, OIDC encryption, and K8s ssl_verify#13190AlinsRan wants to merge 1 commit intoapache:masterfrom
AlinsRan wants to merge 1 commit intoapache:masterfrom
Conversation
…, and K8s ssl_verify - Remove debug log in radixtree_sni.lua that logged the full SSL object including private keys (security vulnerability) - Add client_rsa_private_key to encrypt_fields in openid-connect.lua so it is stored encrypted in etcd, not plaintext - Fix ssl_verify hardcoded to false in K8s discovery informer_factory.lua; now derived from apiserver configuration - Add ssl_verify field to K8s discovery schema with configurable option to enable/disable TLS certificate verification (default: false for backward compatibility) - Add tests for ssl_verify behavior in K8s discovery and SNI debug log
nic-6443
approved these changes
Apr 10, 2026
shreemaan-abhishek
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apisix/ssl/router/radixtree_sni.luathat logged the full SSL object including private keys viacore.log.info("debug - matched: ...). This is a security vulnerability as private key material could be exposed in logs.client_rsa_private_keytoencrypt_fieldsinopenid-connect.luaso it is stored encrypted in etcd, not in plaintext.ssl_verifyhardcoded tofalsein Kubernetes discoveryinformer_factory.lua; now reads fromapiserver.ssl_verifywhich is configured ininit.lua.ssl_verifyfield to Kubernetes discovery schema — allows users to explicitly enable TLS certificate verification for the Kubernetes API server. Defaults tofalsefor backward compatibility.Changes
apisix/ssl/router/radixtree_sni.lua— Removedebug - matchedlog that leaked SSL private keysapisix/plugins/openid-connect.lua— Addclient_rsa_private_keytoencrypt_fieldsapisix/discovery/kubernetes/informer_factory.lua— Useapiserver.ssl_verifyinstead of hardcodedfalseapisix/discovery/kubernetes/init.lua— Populateapiserver.ssl_verifyfrom config (defaults tofalse)apisix/discovery/kubernetes/schema.lua— Addssl_verifyboolean field to service schemaTests
t/router/radixtree-sni3.t— TEST 8: verifiesdebug - matchedis no longer logged after SSL handshaket/plugin/openid-connect2.t— TEST 20: verifiesclient_rsa_private_keyis encrypted at rest in etcdt/discovery/kubernetes_ssl_verify.t— 4 new tests verifyingssl_verifybehavior for http/https schemes and explicit configurationt/kubernetes/discovery/kubernetes2.t— Updated to explicitly setssl_verify: falsein test config