feat(gateway): support extra trusted CAs via additionalTrustedCAs (3.9)#318
Merged
Merged
Conversation
The gateway outbound trust store (ssl_trusted_certificate) exposes a single
CA-file slot through gateway.tls.existingCASecret/certCAFilename. In a Control
Plane-managed deployment that slot already carries the CP/DP-Manager CA (the
gateway verifies the CP over the same trust store because etcd.auth.tls.verify
is true), so there was no clean way to trust an additional private/enterprise
CA (e.g. an openid-connect IdP reached over TLS) without merging it into the
CP-managed Secret and restarting.
Add gateway.tls.additionalTrustedCAs: a list of {secretName, filename} entries.
The chart mounts each file into the gateway and appends its path to
ssl_trusted_certificate, so the rendered value becomes
"system,<existingCA>,<additional...>" - system CAs and the existing CP CA are
preserved. Rendering is unchanged when the list is empty. Takes effect after a
gateway Pod restart, since the trust store is merged at startup.
Backport of the main-line change to the 3.9 chart line.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Add an items projection so each additionalTrustedCAs volume mounts only the configured filename from the Secret, instead of every key. Least-privilege: avoids exposing unrelated Secret keys in the gateway filesystem.
nic-6443
approved these changes
Jul 14, 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.
Problem
The gateway's outbound trust store (
apisix.ssl.ssl_trusted_certificate) is exposed through a single CA-file slot:gateway.tls.existingCASecret+gateway.tls.certCAFilename, which render tossl_trusted_certificate: "system,/usr/local/apisix/conf/ssl/<certCAFilename>".In a Control Plane-managed deployment that slot is already taken: the CP sets
existingCASecret=<release>-tls/certCAFilename=ca.crt(the CP/DP-Manager CA), and the gateway verifies the CP over this same trust store becauseetcd.auth.tls.verify=true. With only one slot, users who need the gateway to trust an additional private/enterprise CA — e.g. anopenid-connectidentity provider reached over TLS — had no clean way to add one.Change
Add
gateway.tls.additionalTrustedCAs, a list of{ secretName, filename }entries. For each entry the chart mountsfilenamefrom SecretsecretNameinto the gateway at/usr/local/apisix/conf/ssl/additional-ca-<i>/and appends that path tossl_trusted_certificate. The rendered value becomessystem,<existingCA>,<additional...>, so the system CA bundle and the existing CP CA are both preserved. Thessl_trusted_certificatevalue is refactored into agateway.sslTrustedCertificatehelper.Behavior / compatibility
additionalTrustedCAsis empty (default), rendering is byte-identical to before — no change for existing deployments.3.9 chart line of #317. Chart version bumped
3.9.5→3.9.6;README.mdregenerated via helm-docs.