tls: disable TLS renegotiation by default, with a warning if enabled #67618
Review requested:
Approved these changes.
Codecov Report
:x: Patch coverage is
97.56098% with 1 line in your changes missing coverage. Please review.:white_check_mark: Project coverage is 90.71%. Comparing base (
d9e18d5) to head (d8a6f1f).:warning: Report is 136 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| lib/internal/tls/wrap.js | 91.66% | 1 Missing :warning: |
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #67618 +/- ##
==========================================
- Coverage 90.72% 90.71% -0.02%
==========================================
Files 801 801
Lines 280809 280807 -2
Branches 54212 54204 -8
==========================================
- Hits 254776 254730 -46
- Misses 16209 16253 +44
Partials 9824 9824
| Files with missing lines | Coverage Δ | |
|---|---|---|
| lib/internal/tls/common.js | 97.63% <100.00%> (+0.05%) | :arrow_up: |
| lib/tls.js | 94.11% <100.00%> (+0.25%) | :arrow_up: |
| lib/internal/tls/wrap.js | 95.78% <91.66%> (-0.02%) | :arrow_down: |
... and 31 files with indirect coverage changes
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
Approved these changes.
The https://github.com/nodejs/node/labels/notable-change label has been added by @pimterry.
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the _Other Notable Changes_ section.
Landed in 1ad01d3f39d2a760b19233ef112d3e25929f98de
panva
pimterry
The next step in the deprecation process for renegotation, as outlined in #67532: disable renegotiation by default in v27. For now this will be available on an opt-in basis only, with warnings when used. This disables a rarely used feature with security risks. The following step (v28 or later) will be to remove it completely.
One case here does not warn: enabling renegotiation for a client explicitly, and then using it just to accept server-initiated renegotiations. This will be retained for legacy server support scenarios. Initiating renegotiation from the client side still emits a warning.
Notable change:
TLS renegotiation is now disabled by default (DEP0213). Users who need this must now enable it explicitly with the
allowRenegotiation: trueoption. This should be treated as a temporary fix, as renegotiation will be removed completely in a future major release.