Skip to content

fix: add the upstream_ssl_trusted_certificate patch for OpenResty 1.31.8.1 - #139

Merged
shreemaan-abhishek merged 1 commit into
mainfrom
fix/port-137-to-1.31.8.1
Oct 29, 2026
Merged

shreemaan-abhishek merged 1 commit into
mainfrom
fix/port-137-to-1.31.8.1

Conversation

@shreemaan-abhishek

@shreemaan-abhishek shreemaan-abhishek commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

#137 added nginx-upstream_ssl_trusted_certificate.patch to patch/1.21.4, patch/1.29.2.4 and patch/1.31.1.1. #136 added patch/1.31.8.1 from a branch cut before #137, so builds on OpenResty 1.31.8.1 do not get the fix.

This copies patch/1.31.1.1/nginx-upstream_ssl_trusted_certificate.patch to patch/1.31.8.1 unchanged. It applies to OpenResty 1.31.8.1 after the other patches with no rejects and no fuzz, and nginx did not change the code around its hunks between 1.31.1 and 1.31.8.

t/upstream_ssl_trusted_certificate.t from #137 covers it on the apisix-runtime-or-1.31.8.1 CI entry.

Summary by CodeRabbit

  • Bug Fixes
    • Improved SSL certificate and revocation-list loading for gRPC and proxy upstream connections when certificate verification is enabled or a trusted certificate is configured.
    • Missing trusted certificates continue to produce an error when verification is enabled. When verification is disabled, the original SSL verification depth is preserved after certificate loading.
    • Builds without the APISIX-specific configuration retain the previous behavior: trusted certificates and revocation lists are loaded only when verification is enabled.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0f24e7ff-0c9a-429c-9a8a-9ce8165dfc41
Commits

Reviewing files that changed from the base of the PR and between 31b51f8 and e306773.

Files selected for processing: 1
  • patch/1.31.8.1/nginx-upstream_ssl_trusted_certificate.patch

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The patch updates gRPC and proxy upstream SSL setup. Under NGX_HTTP_APISIX, each loads trusted certificates and CRLs when verification is enabled or a trusted-certificate path is configured. Both retain the missing-path error and restore the original verification depth when verification is off.

Changes: Upstream SSL trust loading

Layer / File(s) Summary
Configure upstream SSL trust loading
patch/1.31.8.1/nginx-upstream_ssl_trusted_certificate.patch
The gRPC and proxy upstream SSL setup load trusted certificates and CRLs under NGX_HTTP_APISIX when verification is enabled or a trusted-certificate path is configured. When verification is off, each restores the original verification depth. Other builds retain the prior verify-only loading condition.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: nic-6443

Merge Risk: Minimal · up to e3067

The patch adds upstream SSL trust loading. No actionable merge-blocking issue was established.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: adding the upstream SSL trusted-certificate patch for OpenResty 1.31.8.1.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
E2e Test Quality Review Passed PASS. The patch-only PR is covered by the existing E2E test t/upstream_ssl_trusted_certificate.t, which is present in the base and head. The test uses real TLS upstream servers and covers proxy and …
Security Check Passed No security issues found in categories 1–7. The authoritative diff adds only patch/1.31.8.1/nginx-upstream_ssl_trusted_certificate.patch; it adds no logging, response serialization, database persist…
Full details: E2e Test Quality Review

Explanation

PASS. The patch-only PR is covered by the existing E2E test t/upstream_ssl_trusted_certificate.t, which is present in the base and head. The test uses real TLS upstream servers and covers proxy and gRPC flows, trusted, revoked, and untrusted certificates, static and per-request verification, missing certificates, CRLs, and verify-depth cases. The CI matrix runs all .t files for apisix-runtime-or-1.31.8.1. The new patch is included in the target patch directory and is applied by the existing wildcard loop. No blocking, major, or minor test-quality issue is introduced.

Full details: Security Check

Explanation

No security issues found in categories 1–7. The authoritative diff adds only patch/1.31.8.1/nginx-upstream_ssl_trusted_certificate.patch; it adds no logging, response serialization, database persistence, endpoint authorization, resource lookup, ownership, shared-resource, or secret-reference code. For TLS configuration, the patch preserves the error when verification is enabled without a trusted certificate, loads trust material for per-request verification, and restores the prior verification depth when static verification is off. The new patch is byte-for-byte identical to the existing patch/1.31.1.1 patch. Related tests cover trusted certificates, revoked certificates, missing trusted certificates, and certificate-chain depth.

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@shreemaan-abhishek
shreemaan-abhishek merged commit fa0559c into main Oct 29, 2026
6 checks passed
@shreemaan-abhishek
shreemaan-abhishek deleted the fix/port-137-to-1.31.8.1 branch October 29, 2026 07:45
@shreemaan-abhishek shreemaan-abhishek self-assigned this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants