Skip to content

fix: apply explicit revocation settings on the default trust store - #1825

Merged
cathleeny merged 20 commits into
mainfrom
cathleeny/fix/apply-revocation-settings-default-trust-store
Nov 30, 2026
Merged

cathleeny merged 20 commits into
mainfrom
cathleeny/fix/apply-revocation-settings-default-trust-store

Conversation

@cathleeny

@cathleeny cathleeny commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

On main, AcceptUndeterminedRevocation=1 already applied on the default trust store, as CRL-only soft mode. Explicit CheckCertRevocation=1 and AcceptUndeterminedRevocation=0 were ignored there, so revoked server certificates were accepted. This PR makes explicit strict settings apply to Thrift and SEA on the synchronous HTTP clients. Connections that omit both settings are unchanged. Soft mode is unchanged from main.

Behavior

  • Strict (CheckCertRevocation=1): the JDK's revocation checker, OCSP first with CRL fallback. An undetermined status rejects the connection. Where the OCSP or CRL endpoints cannot be reached, these connections now fail, including when egress goes only through UseProxy, because the JDK's fetches do not use the driver's proxy. To keep them working, set AcceptUndeterminedRevocation=1, allow that egress, or set the JVM http.proxyHost or https.proxyHost.
  • Soft (AcceptUndeterminedRevocation=1): as on main, CRL-only. Only a CRL-revoked certificate rejects, and an undetermined status is accepted. OCSP is not consulted, so networks that drop OCSP traffic do not add an OCSP timeout to every connection.
  • CheckCertRevocation=0 turns off revocation only. Chain and hostname checks still apply.

Not covered

  • Asynchronous volume uploads use the JVM default trust store. That gap predates this PR and is a follow-up.

Testing

  • Hermetic tests, using a test CA with local CRL and OCSP servers:
    • revocation policy (28 cases);
    • path building, through the installed trust manager (7), including two trust anchors that share a subject name, run 12 times in each mode;
    • Thrift HTTP client (2);
    • ConfiguratorUtilsTest (25).
  • All 62 pass on JDK 11 and 17. The full suite on JDK 17 is 4195 tests with one failure, an Arrow allocator test that also fails without this change.
  • Live runs and performance measurements predate the soft-mode change and have not been repeated.

Related PRs: databricks/databricks-sql-kernel#485, https://github.com/databricks/databricks-odbc/pull/515, https://github.com/databricks/databricks-driver-test/pull/2190

This pull request and its description were written by Isaac.

When CheckCertRevocation or AcceptUndeterminedRevocation was set
explicitly, and no SSLTrustStore, UseSystemTrustStore, or
AllowSelfSignedCerts was set, the driver used a plain connection manager
with no revocation checks. Revoked certificates were accepted on both
Thrift and SEA, which share this code.

- Use the PKIX trust path when either revocation property is present.
  With neither present, keep the plain manager, so default connections
  are unchanged.
- Include whether the revocation properties were set in the discovery
  cache trust key, since presence selects the manager type.
- Soft-fail (AcceptUndeterminedRevocation=1) runs two passes. The first
  is OCSP first with CRL fallback. If that fails without a revoked
  result, the second is CRL only. A revoked certificate is rejected by
  either source. A status neither pass can determine is accepted, so a
  certificate with only a CRL distribution point is accepted when its CRL
  cannot be fetched.
- CheckCertRevocation=0 disables revocation only. Chain validation stays.

Scope: the policy covers the synchronous HTTP clients. Asynchronous
volume uploads use GlobalAsyncHttpClient, which has no TLS strategy and
uses the JVM default trust store. That gap predates this change and is
left as a follow-up.

Tests: a parameterized hermetic test over a generated CA with a loopback
CRL and OCSP responder and a loopback HTTPS endpoint, covering each case
on the shared connection manager. Focused SEA and Thrift cases, plus
unit tests for the trust key and the soft-fail options.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 2 Low

Looks good, with 1 low test-coverage concern. The gating, the cache-key update and the two-pass soft-fail trust manager are correct, and the hermetic tests cover the revocation matrix. The async volume-upload TLS gap predates this PR and is follow-up work.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • 🟠 High — Disputed by the cross-check judge (it quotes * Soft-fail trust manager. It runs the OCSP-first pass, and if that fails without a revoked * result, the CRL-only pass.); a human should decide. Original finding: A successful OCSP response skips the CRL-only pass, so soft mode accepts a CRL-revoked certificate when OCSP reports GOOD, regressing the previous CRL-first behavior on custom/system trust stores and violating the stated either-source policy. Run the CRL check after OCSP success as well, and add a GOOD-OCSP/REVOKED-CRL regression case. (Found by GPT-6.1 Sol · disputed by the judge)

JDK 17 and later send OCSP requests as GET with the encoded request in the URL path. The fixture read only the POST body, so on those JDKs every OCSP request failed with HTTP 500. The driver then fell back to the CRL, which reported GOOD, so the OCSP-revoked-only cases were accepted. The responder now decodes both forms, so the fixture is correct on every JDK under test.

Also shut down the fixture executors in close(), and check that chain validation still runs with revocation off using a trust store that holds only an unrelated CA.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Verdict: invalid. The soft-fail behavior is by design (AC-R2) and the code does not accept a certificate that OCSP reports revoked.

Evidence:

  • jdbc-core/src/main/java/com/databricks/jdbc/dbclient/impl/common/ConfiguratorUtils.java:462-476: soft-fail builds an OCSP-first trust manager, and the CRL-only pass is built only as the second pass of SoftFailTrustManager.
  • ConfiguratorUtils.java:521-531: SoftFailTrustManager runs the OCSP-first pass, and the CRL-only pass runs only if that pass fails without a revoked result.
  • ConfiguratorUtils.java:808-811: the OCSP-first pass is SOFT_FAIL with the default CRL fallback. A definitive OCSP GOOD passes the first pass, so the CRL-only pass is not consulted.

Tests on commit 1767065 (JDK 11 and JDK 17, RevocationPolicyHermeticTest and DatabricksHttpClientRevocationTest, 20 of 20 each):

  • soft: OCSP revoked only, rejected (CRL GOOD, OCSP REVOKED): rejected on both JDKs.
  • soft: good accepted: accepted on both JDKs.
  • strict: OCSP revoked only, rejected and DatabricksHttpClientRevocationTest.soft_ocspRevokedOnly_rejected: rejected on both JDKs.

Limit of this evidence: no test pins the exact combination OCSP GOOD plus CRL REVOKED. That case is the one the review describes, and I have not added one. It is not needed to answer the finding, which is that OCSP-revoked certificates are rejected and undetermined statuses fall through to the CRL.

Automated reply from the driver feature factory (Isaac). Not reviewed by a human.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Low · 1 Nit

Looks good: 2 low-severity concerns. The fix routes explicit revocation settings on the default trust store through the PKIX path and adds the needed cache key. Follow-up: async volume uploads still skip revocation checks.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • ⚪ Nit — The soft-fail path that rethrows firstFailure when both passes fail without a revoked result (for example an untrusted chain) has no test. The untrusted-chain test uses CheckCertRevocation=0, so SoftFailTrustManager is never built. Add a SOFT case with the unrelated-CA trust store and assert rejection. (Found by Claude Opus 5.5 · confirmed by the judge)

If a trust manager is not an X509ExtendedTrustManager, soft-fail revocation silently skipped the CRL-only pass. The soft-fail decision now lives in softFailTrustManagers, which logs a warning on that degraded path and keeps the OCSP-first managers, so the policy stays soft and the change is visible.

Adds tests for the degraded and extended cases, a strict and soft case where a definitive OCSP GOOD overrides a conflicting CRL REVOKED entry (both accept), and a soft-mode unanchored-chain rejection.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Fixed in e9fdcaa (nit). RevocationPolicyHermeticTest.soft_unanchoredChainRejected now uses the unrelated-CA trust store with soft settings, so SoftFailTrustManager is built and the test asserts that the first-pass failure is rethrown and the handshake is refused.

Automated reply from the driver feature factory (Isaac). Not reviewed by a human.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

🔀 1 finding considered and dismissed by the judge
  • 🔵 Low src/main/java/com/databricks/jdbc/dbclient/impl/common/ConfiguratorUtils.java:556 — In soft mode, a certificate with only a CRL distribution point and an unreachable CRL fetches that CRL twice per handshake. The first pass's OCSP step fails rig
    Judge's evidence: revocationChecker.setOptions(Set.of(PKIXRevocationChecker.Option.SOFT_FAIL));

The fixture stamped REVOKED answers with the current time. BouncyCastle encodes revocation times at whole-second precision, so a revocation time that falls in the same second as, or after, the validation start is ignored. The chain was then accepted, and the strict and OCSP-revoked cases failed intermittently on CI (unit-tests 17, windows).

Date the OCSP RevokedStatus and the CRL entry one hour in the past, so the revocation always precedes validation. This is test-only; the driver is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Fix for the unit-tests (17, windows) failure at e9fdcaa: commit 12826bf (test-only).

Root cause: the test fixture stamped REVOKED answers with the current time. BouncyCastle encodes revocation times to the whole second, so a revocation time in the same second as the validation start is ignored by the JDK, and the chain was accepted. The fix dates the OCSP RevokedStatus and the CRL entry one hour in the past. RevocationPolicyHermeticTest and DatabricksHttpClientRevocationTest pass on JDK 17 with it.

Flake, not changed: unit-tests (17, linux) failed on SeaInlineArrowChunkProviderTest$MultiChunkTests.testRowOffsetProgression. The test is in code this PR does not touch, a prefetch-thread race. It passed on this branch at 1767065, and main's recent runs are green.

Automated reply from the driver feature factory (Isaac). Not reviewed by a human.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Nit

Looks good, with one low concern. Explicit revocation settings now route the default trust store through PKIX, and the hermetic loopback CRL/OCSP matrix gives strong coverage. Follow-up: async volume uploads (GlobalAsyncHttpClient) still skip revocation checks; the PR scope already notes this.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • 🟠 High — When an intermediate has no OCSP URI and an unreachable CRL, the first pass can fail before reaching an OCSP-revoked leaf, while this CRL-only retry accepts the entire chain without checking that leaf's OCSP status. Preserve OCSP checks for remaining certificates when applying CRL-only recovery, and add a root/intermediate/leaf regression test. (Found by GPT-6.1 Sol · the judge couldn't confirm it)
  • ⚪ Nit — The CRL-only pass failure (secondFailure) is dropped when firstFailure is rethrown, which loses diagnostic information. Call firstFailure.addSuppressed(secondFailure) before throwing. (Found by Claude Opus 5.5 · confirmed by the judge)

Soft mode's OCSP-first pass can stop at an intermediate that has no OCSP responder and an unreachable CRL, before it reaches a leaf whose OCSP answer is REVOKED. The CRL-only retry then accepted the chain, so an OCSP-revoked certificate was accepted under AcceptUndeterminedRevocation=1.

After the CRL-only retry accepts the chain, check only the end-entity certificate with an OCSP-only soft pass (ONLY_END_ENTITY, NO_FALLBACK). A REVOKED answer rejects. Any other result means the leaf's OCSP status is undetermined, and the CRL-only pass already validated the chain. Strict mode is unchanged.

Also add the first-pass failure's suppressed causes before rethrowing, and cover the intermediate case in RevocationPolicyHermeticTest for both soft and strict.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Soft-mode fix for the High from review 5982167615: commit 81a61d6 (DCO, Co-authored-by).

Reproduced: RevocationPolicyHermeticTest.soft_intermediateWithUnreachableCrl_leafOcspRevokedRejected builds root, then an intermediate with no OCSP URI and an unreachable CRL distribution point, then a leaf whose OCSP responder says REVOKED and whose CRL says GOOD. Soft mode accepted it. The certpath debug log shows the OCSP-first pass stops at the intermediate ('Certificate does not specify OCSP responder', then the CRL fetch fails) before it reaches the leaf, and the CRL-only retry accepts the chain.

Fix: after the CRL-only retry accepts, an OCSP-only soft pass checks the end-entity certificate (ONLY_END_ENTITY, NO_FALLBACK). Only a REVOKED answer rejects; any other result leaves the leaf undetermined, and the CRL pass has already validated the chain. Strict mode is unchanged. The second failure's cause is now attached as a suppressed exception before rethrow (the nit).

Tests: RevocationPolicyHermeticTest (the new soft case, and a strict case that expects rejection as undetermined), with the existing matrix, passes 52/52 on JDK 11 and JDK 17. Live re-run on both warehouses (dbsql and reyden, SEA and Thrift) matches r4 for all 13 cases: defaults, soft and disabled pass, explicit strict fails with a PKIX error, and reyden Thrift stays the documented unsupported baseline exception.

Automated reply from the driver feature factory (Isaac). Not reviewed by a human.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Looks good, with one low concern. Gating the default trust store on whether a revocation property is present fixes the bypass, and the trust key is updated to match. The hermetic tests cover strict, soft, CRL-only, and revocation-off cases. Follow-up already noted in the PR: asynchronous volume uploads still skip revocation checks.

When the OCSP-first pass fails on an unreachable CRL, the CRL-only retry fetches that CRL again, so a soft-mode handshake can wait for a second revocation timeout. Record the latency cost in the revocation entry. No runtime change.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Medium · 1 Low

The fix looks correct, with one medium and one low concern, both in the soft-fail fallback. Default-path gating and the cache key look right. The async volume-upload TLS gap predates this change and is already flagged as follow-up work.

When the OCSP-first pass stops at a certificate whose status cannot be determined, the certificates it never reached were not checked. A later intermediate whose OCSP answer is REVOKED was accepted, because the old retry checked only CRLs, and the OCSP-only pass used ONLY_END_ENTITY, which skips CA certificates.

Each certificate the pass did not reach is now validated for structure against the real trust anchors, then checked for its own revocation status: a one-certificate path validated against its issuer, OCSP first with a CRL fallback. The certificate the pass stopped at and the ones above it are not fetched again. Only a REVOKED answer rejects an unreached certificate. Strict mode is unchanged.

Tests: a two-intermediate chain with a REVOKED OCSP answer on intermediate two (soft rejects, strict rejects), a fetch bound with every responder unavailable (each endpoint once), and the existing matrix. The chain fixture serves each intermediate's responder from its own key.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Low · 1 Nit

Needs changes: 1 high concern. In soft mode, the fallback re-validates the chain with a bare PKIX check, and that check drops the JSSE end-entity checks on the leaf. Follow-up: there is an orphaned duplicate "Soft-fail trust manager" Javadoc above failureIndex (nit).

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • ⚪ Nit — Both callers pass revocation=false, so the revocation branch with ONLY_END_ENTITY and its Javadoc is dead code. Remove the parameter and the branch. (Found by Claude Opus 5.5 · confirmed by the judge)

The soft-mode fallback after an OCSP-first failure re-validated certificates with a bare PKIX validator. That path skips the JSSE end-entity checks (serverAuth EKU, algorithm constraints), so a leaf with the wrong usage could be accepted. The fallback now re-validates the whole chain with a JSSE trust manager that has revocation off, which applies every structural check and fetches nothing. Only then is each certificate the OCSP-first pass never reached checked for its own revocation status. The per-certificate check only rejects on REVOKED.

Also removes the orphaned Javadoc and the unused revocation branch of the structural check, and the path-building step that could keep a certificate above a trust anchor.

Tests: a wrong-usage leaf is rejected in soft mode. The two-intermediate, fetch-bound and existing matrix stay green on JDK 11 and 17.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Fixed in f93a909, the Nits from review 5983410197: the orphaned Javadoc above failureIndex and the softFailTrustManagers Javadoc describing the old CRL-only pass are removed, and the revocation branch that no caller used is gone.

Automated reply from the driver feature factory (Isaac). Not reviewed by a human.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Low

Looks good, with 1 low concern. The fix is correctly limited to explicitly set revocation properties, and the hermetic tests cover strict, soft, CRL-only and multi-intermediate chains. Nits: the orphaned 'CRL-only pass' javadoc above failureIndex, stale 'CRL-only'/'retry' wording in softFailTrustManagers and buildTrustManagerParameters, the unused trustAnchors field, and redundant java.security imports.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

A certificate that is the last presented certificate, and not itself a trust anchor, was skipped in the soft-mode per-certificate check. Its revocation status was then never checked. Its issuer is now taken from the trust anchors; when neither the chain nor the anchors provide the issuer, the handshake is rejected, since its revocation cannot be checked.

The changelog now states the at-most-once guarantee applies when the TLS library reports where its first check stopped.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High · 1 Low

Mostly sound, with 1 medium concern in the soft-fail per-certificate fallback. Nits: an orphaned Javadoc comes before failureIndex, several comments and the PR description still describe a 'CRL-only' second pass that the code no longer runs, and the explicit java.security import duplicates the wildcard import.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

…, not position

The soft-fail per-certificate check took chain[index + 1] as the issuer of
chain[index]. A server may present its chain out of order, and the TLS
library's failure index only means something when the presented order holds.
Now:

- The issuer of each certificate is the presented certificate that issues it
  (matching subject and issuer name, and verifying the signature), then a
  trust anchor. No issuer found rejects the chain.
- The failure index is used only when the presented chain is in issuer order
  up to that index. Otherwise every non-anchor certificate gets its own check.

Adds RevocationIssuerOrderTest, including an out-of-order chain (leaf, root-side
intermediate, then the leaf's issuer) and a missing-issuer rejection.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Medium · 1 Low

Mostly sound, with 1 medium concern: soft mode can reject valid chains that carry extra certificates. Nits: an orphaned duplicate Javadoc before issues(); comments that still describe a "CRL-only pass" (softFailTrustManagers Javadoc, buildTrustManagerParameters); and a NEXT_CHANGELOG entry that lists implementation detail.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

…ng issuers by hand

The soft-fail fallback found each certificate's issuer by hand and used the first pass's
failure index only when the presented order held. A valid chain with an extra certificate
(an unrelated or cross-signed root) was rejected when the index was missing.

Build the validated path with CertPathBuilder (PKIX) over the presented certificates, using
the same trust anchors with revocation off. Run the per-certificate soft-mode checks over that
path, in order, each with its real issuer from the path or the anchor. Certificates the first
pass already reached are still skipped by presented index, so each endpoint is contacted at
most once per handshake. Only REVOKED rejects in soft mode. Strict mode and the defaults are
unchanged.

Removes issues(), pathOrderHolds() and issuerAnchorFor(). Adds RevocationPathBuildingTest for
an extra unrelated certificate, an appended cross-signed root, an out-of-order chain with an
extra certificate, a revoked intermediate, and a chain missing an intermediate.

AIA is not used on this path: the builder sees only presented certificates. Enabling AIA would
need the JVM-wide com.sun.security.enableAIAcaIssuers property, which this change does not set.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 2 Low

Mostly solid, with 1 medium concern: in soft mode, the skip-already-checked step mixes up two kinds of index. Nits: comments still say 'CRL-only pass' (softFailTrustManagers Javadoc, buildTrustManagerParameters comment, a test comment), and the NEXT_CHANGELOG entry is very long.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

…oft-fail chains

The soft-fail fallback skipped path certificates that the first pass had
reached, using the JDK's failure index. That index counts positions in the
validated path, but the skip compared it with positions in the presented
array. For a reordered or padded chain the two differ, so a certificate the
first pass never reached could be skipped and its revocation never checked.
The skip now applies only when the presented chain begins with the built
path in the same order. Otherwise every path certificate is checked.

The fallback path builder also kept the PKIX default maximum path length of
five, so a valid chain with more than five intermediates could pass the
structural check and still be rejected. The limit is now unlimited, so
BasicConstraints alone bounds the path.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Mostly sound, with 1 medium concern. Nit: comments in softFailTrustManagers, buildTrustManagerParameters and one test still mention a 'CRL-only pass', which no longer exists. Follow-up: explicit CheckCertRevocation=1 URLs now get strict checks, so connections may fail in egress-restricted environments.

Soft mode (AcceptUndeterminedRevocation=1) no longer uses the CRL-only
PREFER_CRLS + NO_FALLBACK options. A custom SSLTrustStore or the system
trust store now checks OCSP first with CRL fallback, which can add OCSP
requests, and the changelog now says so. It also states the at-most-once
fetch condition as changed in 0525df8: the server must send its chain in
path order.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

Comment thread NEXT_CHANGELOG.md Resolved
cathleeny and others added 2 commits November 23, 2026 16:40
…llback

Soft mode (AcceptUndeterminedRevocation=1) is back to main's CRL-only
options: SOFT_FAIL, NO_FALLBACK, PREFER_CRLS. The OCSP-first soft mode
waited for the OCSP timeout on every new connection in networks that drop
OCSP, because the JDK caches a failed CRL fetch but not a failed OCSP
request. The JDK's fetches also ignore the driver's proxy settings.

With CRL-only soft mode the JDK's own checker moves on from a certificate
it cannot determine, so the SoftFailTrustManager fallback is no longer
needed. It is removed, together with its failure-index skip, its
per-certificate checks and buildPath. The JDK's path builder handles
out-of-order chains, extra certificates, a cross-signed root and a second
anchor that shares the root's subject name. The tests check those cases
through the trust manager the driver installs.

Tests: OCSP-only revocation is accepted in soft mode, as on main. A
CRL-revoked certificate is rejected. A same-name second anchor with an
intermediate that has no AKID and is revoked by both CRL and OCSP is
rejected in both modes on every one of 12 fresh runs.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
On main, AcceptUndeterminedRevocation=1 already applied on the default
trust store as CRL-only soft mode. The fix is that explicit strict
settings (CheckCertRevocation=1, AcceptUndeterminedRevocation=0) now
apply, and the entry says what that changes for users: connections that
set CheckCertRevocation=1 fail where the OCSP or CRL endpoints cannot be
reached, including when egress goes only through UseProxy. It lists the
ways to keep such connections working. Soft mode is unchanged from main.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

Resolved the NEXT_CHANGELOG.md conflict: main released the other entries,
so the file is main's with only the revocation fix under Fixed.

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

cathleeny and others added 2 commits November 30, 2026 17:39
Resolved the NEXT_CHANGELOG.md conflict: main's file with this PR's
revocation entry added under Fixed.

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…th-building tests

- Add revoked-certificate cases for CheckCertRevocation=1 alone, AcceptUndeterminedRevocation=0 alone, and CheckCertRevocation passed through java.util.Properties.
- Cover AcceptUndeterminedRevocation alone in the trust-settings-key test so its routing check is load-bearing.
- Remove RevocationPathBuildingTest, RevocationChainFixture and the intermediate-CA chain cases; they only exercised JDK path building, which this PR does not change.

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Nit

Looks good, with no blocking concerns. Explicit revocation settings now go through the PKIX path. They are also part of the trust-settings cache key, so omitted settings are not confused with explicit strict ones. The hermetic tests cover strict, soft and off modes. Asynchronous volume uploads still skip revocation checks, which predates this PR and is follow-up work.

Other findings

  • ⚪ Nit — The NEXT_CHANGELOG entry is long and reads like release notes rather than a short Fixed bullet. Consider cutting it to the behavior change plus the opt-out (AcceptUndeterminedRevocation=1) and moving the proxy and egress details into the docs. (Found by Claude Opus 5.5 · the judge disputed it but couldn't back that up, so it's kept)

Keep the user-facing change and the opt-out; the proxy and egress details
stay in the PR description.

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

@cathleeny
cathleeny added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 30, 2026
Resolved the NEXT_CHANGELOG.md conflict by keeping both Fixed entries.

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

@cathleeny
cathleeny added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 30, 2026
@cathleeny
cathleeny added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 736c0fa Nov 30, 2026
25 checks passed
@cathleeny
cathleeny deleted the cathleeny/fix/apply-revocation-settings-default-trust-store branch November 30, 2026 20:40
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