Repository navigation
Fix TSSslClientCertUpdate updates - #13576
Conversation
Review notesThe Provenance worth adding to the commit message: this broke in 7dbb6cb ("Add hook for loading certificate and key data from plugin", #6609, 2021-06-25), which changed The test changes, however, still don't assert anything. 1. Blocker —
|
ed50af0 to
0dea1d8
Compare
|
Thanks Claude: all points were valid and are addressed in 0dea1d8. The test now uses Streams.All and covers multiple CA buckets. The update retains the SSL configuration safely, updates every matching context, preserves existing contexts on rebuild failure, and documents the resolved certificate-path key. |
0dea1d8 to
48475d2
Compare
48475d2 to
dae3126
Compare
TSSslClientCertUpdate has been unable to find normally configured outbound client contexts since 7dbb6cb changed the lookup key from certificate-and-key paths to the resolved certificate path. The existing AuTest hid the regression because its lowercase Streams.all assignments did not register assertions. This patch updates every matching CA bucket using the stored certificate path, drops the cached certificate data so that contexts created later do not resurrect the pre-update PEM, preserves working contexts when a replacement cannot be built, and releases the SSL configuration after use. It also corrects the API documentation and strengthens the AuTest to verify every CA bucket and the expected certificate subjects. Fixes: apache#13575
dae3126 to
f3116b9
Compare
TSSslClientCertUpdate has been unable to find normally configured outbound client contexts since 7dbb6cb changed the lookup key from certificate-and-key paths to the resolved certificate path. The existing AuTest hid the regression because its lowercase Streams.all assignments did not register assertions. This patch updates every matching CA bucket using the stored certificate path, drops the cached certificate data so that contexts created later do not resurrect the pre-update PEM, preserves working contexts when a replacement cannot be built, and releases the SSL configuration after use. It also corrects the API documentation and strengthens the AuTest to verify every CA bucket and the expected certificate subjects. Fixes: apache#13575 (cherry picked from commit a2011c2)
|
Cherry-picked to the 10.2.x branch as 9d8d805 for the 10.2.1 release. |
The converted cert_update test exposes an existing 9.2 production bug: TSSslClientCertUpdate searches with a certificate-and-key pair although the context map uses the certificate path. The original AuTest reported false success because its lowercase Streams.all assignments registered no assertions, so certificate replacement failures went unnoticed. This patch backports the fix from apache#13576, updating every matching CA bucket, invalidating cached certificate data, preserving live contexts on replacement failure, and releasing the acquired SSL configuration. The separate Uranium migration verifies certificate subjects before and after replacement and retains the working context after an invalid PEM. This production prerequisite lets that coverage run without hiding the defect behind a skip or an expected failure. Co-authored-by: GPT-6 Astra Medium
The supported 9.2 branch still depends on AuTest after master moved to pytest-based Uranium. Maintaining separate test frameworks makes new regressions harder to backport and leaves branch-specific coverage dependent on the old runner. This patch migrates the existing scenarios to self-contained replay tests and fixture-driven pytest functions while preserving 9.2 behavior. The shared harness supports Autotools, records.config, and managed configuration reloads, with API documentation and source-distribution assets. The configured wrapper also includes the Bash 3 empty-array fix from apache#13884. Two separate production prerequisites fix defects exposed by the tests. The socket-close ordering fix from apache#9366 prevents HTTP/2 network events from reaching a pending session-close hook and aborting the proxy. The client-certificate update fix from apache#13576 corrects context lookup and replacement; the old AuTest's unregistered output assertions had hidden its failure. These fixes let the converted tests retain their intended coverage rather than skipping or accepting the broken behavior. Co-authored-by: GPT-6 Astra Medium
The supported 9.2 branch still depends on AuTest after master moved to pytest-based Uranium. Maintaining separate test frameworks makes new regressions harder to backport and leaves branch-specific coverage dependent on the old runner. This patch migrates the existing scenarios to self-contained replay tests and fixture-driven pytest functions while preserving 9.2 behavior. The shared harness supports Autotools, records.config, and managed configuration reloads, with API documentation and source-distribution assets. The configured wrapper also includes the Bash 3 empty-array fix from apache#13884. Two separate production prerequisites fix defects exposed by the tests. The socket-close ordering fix from apache#9366 prevents HTTP/2 network events from reaching a pending session-close hook and aborting the proxy. The client-certificate update fix from apache#13576 corrects context lookup and replacement; the old AuTest's unregistered output assertions had hidden its failure. These fixes let the converted tests retain their intended coverage rather than skipping or accepting the broken behavior. Co-authored-by: GPT-6 Astra Medium
* Close HTTP/2 sockets before session hooks HTTP/2 peer shutdown can deliver VC_EVENT_EOS while a session-close hook waits for its mutex. The API callback handler rejects that network event and aborts the proxy. Running the converted Uranium lifecycle test repeatedly exposed this pre-existing 9.2 production race. This patch applies the socket close ordering already used by master (#9366), closing network I/O before invoking session-close hooks. It caches both socket endpoints first so close-hook address APIs retain valid addresses and ports after the connection is released. The converted lifecycle tests check hook ordering and endpoint preservation. Co-authored-by: GPT-6 Astra Medium * Backport client certificate context updates The converted cert_update test exposes an existing 9.2 production bug: TSSslClientCertUpdate searches with a certificate-and-key pair although the context map uses the certificate path. The original AuTest reported false success because its lowercase Streams.all assignments registered no assertions, so certificate replacement failures went unnoticed. This patch backports the fix from #13576, updating every matching CA bucket, invalidating cached certificate data, preserving live contexts on replacement failure, and releasing the acquired SSL configuration. The separate Uranium migration verifies certificate subjects before and after replacement and retains the working context after an invalid PEM. This production prerequisite lets that coverage run without hiding the defect behind a skip or an expected failure. Co-authored-by: GPT-6 Astra Medium * Backport Uranium tests to 9.2.x The supported 9.2 branch still depends on AuTest after master moved to pytest-based Uranium. Maintaining separate test frameworks makes new regressions harder to backport and leaves branch-specific coverage dependent on the old runner. This patch migrates the existing scenarios to self-contained replay tests and fixture-driven pytest functions while preserving 9.2 behavior. The shared harness supports Autotools, records.config, and managed configuration reloads, with API documentation and source-distribution assets. The configured wrapper also includes the Bash 3 empty-array fix from #13884. Two separate production prerequisites fix defects exposed by the tests. The socket-close ordering fix from #9366 prevents HTTP/2 network events from reaching a pending session-close hook and aborting the proxy. The client-certificate update fix from #13576 corrects context lookup and replacement; the old AuTest's unregistered output assertions had hidden its failure. These fixes let the converted tests retain their intended coverage rather than skipping or accepting the broken behavior. Co-authored-by: GPT-6 Astra Medium * Fix Uranium in-source build checks In-source configuration overwrote the tracked Uranium launcher, causing CI's formatting clean-tree check to fail. RAT also treated the generated Python dependency lockfile as an unlicensed source file. This patch preserves the source launcher and delegates configured runs to a separate generated wrapper, with regression coverage for argument forwarding. It also includes the launcher in source distributions and excludes the generated lockfile from license scanning. Co-authored-by: GPT-6 Astra Medium * Isolate nested Uranium test sandboxes An exported sandbox path makes the collision-diagnostic self-test reuse the enclosing pytest session's locked sandbox, preventing the intended collection diagnostic from running. This patch gives the child session an explicit private sandbox and exercises both serial and parallel collection with an inherited, locked parent sandbox. The shared-sandbox safety lock remains unchanged. Co-authored-by: GPT-6 Astra Medium * Synchronize HTTP/2 validation requests Malformed HTTP/2 requests can race connection shutdown before the client finishes writing. On 9.2, rejecting negative Content-Length headers can also legitimately close a stream before queued DATA arrives. This patch brings in the client synchronization from #13914 and isolates validation cases so the expected closed-stream diagnostic is allowed only for the negative-length rejection. Valid requests still reject all error diagnostics, and malformed cases retain their rejection checks. Co-authored-by: GPT-6 Astra Medium ---------
TSSslClientCertUpdate cannot find normally configured outbound client
contexts because its lookup key differs from the key used by the context
map. The existing AuTest masked the failure with permissive gold-file
expressions.
This patch uses the stored certificate-path key for updates and makes
the AuTest explicitly require both successful update messages and the
expected client certificate subjects.
Fixes: #13575