Repository navigation
fix(maven-proxy): verify upstream chains with more than one intermediate CA - #49
Merged
Merged
Conversation
…ate CA
nginx's proxy_ssl_verify_depth defaults to 1: one CA between the leaf and a trusted root. Maven Central's chain runs through Let's Encrypt's
Root YE, which Alpine's bundle does not trust, and on to ISRG Root X2 and X1, so every Maven Central download through the proxy failed 502
("unable to get local issuer certificate") after the rollout of #47. Google Maven and the Plugin Portal were unaffected.
The proxy test's fake upstream spoke plain HTTP, so it never verified a chain. It now serves HTTPS with two intermediate CAs and fails 502
without the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
After #47 was rolled out to all four hosts, every Maven Central download through
maven-proxyfailed with 502. The nginx error wasupstream SSL certificate verify error: (20:unable to get local issuer certificate). Google Maven and the Gradle Plugin Portal still worked.Cause
nginx's
proxy_ssl_verify_depthdefaults to 1, which allows one CA between the leaf and a trusted root. Maven Central's chain needs more: leaf → YE1 → Let's Encrypt Root YE → ISRG Root X2 → ISRG Root X1. Alpine's CA bundle does not trust Root YE, so the chain has to reach ISRG Root X2 or X1.Fix
proxy_ssl_verify_depth 4. Against the real upstreams, the old template returns502 200 200(Maven Central, Google, Plugin Portal) and the new one returns200 200 200.tests/maven-proxy.shspoke plain HTTP, so no certificate chain was ever verified. It now serves HTTPS with a chain through two intermediate CAs, and the proxy trusts only the test root. The test fails with 502 without the fix and passes with it.Already applied
The same template change is already live on beelink, hetzner-cx43, hetzner-cpx31 and rpi5. Only
maven-proxywas restarted, and all three upstreams answer 200 from inside a runner. The outage lasted about 10 minutes (07:52 to about 08:02 UTC). No Gradle build ran in that window.🤖 Generated with Claude Code