Skip to content

webhook: fix delivery hardening regression - #14486

Draft
shwstppr wants to merge 1 commit into
apache:4.20from
shapeblue:webhook-hardeningregr-fix
Draft

shwstppr wants to merge 1 commit into
apache:4.20from
shapeblue:webhook-hardeningregr-fix

Conversation

@shwstppr

Copy link
Copy Markdown
Contributor

Description

Fixes #14482

Deliveries rewrote the payload URL to the resolved IP, breaking TLS hostname verification, SNI and the Host header (e.g. CDNs). Keep the hostname and enforce the destination blocklist in a custom HttpClient DnsResolver, validating the exact addresses connected to.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Fixes apache#14482

Deliveries rewrote the payload URL to the resolved IP, breaking TLS
hostname verification, SNI and the Host header (e.g. CDNs).
Keep the hostname and enforce the destination blocklist in a custom
HttpClient DnsResolver, validating the exact addresses connected to.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.87324% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.45%. Comparing base (e742aad) to head (81ddeef).

Files with missing lines Patch % Lines
.../cloudstack/mom/webhook/WebhookDeliveryThread.java 72.09% 11 Missing and 1 partial ⚠️
...he/cloudstack/mom/webhook/WebhookUrlValidator.java 89.28% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #14486      +/-   ##
============================================
+ Coverage     16.43%   16.45%   +0.02%     
- Complexity    13676    13688      +12     
============================================
  Files          5669     5669              
  Lines        501631   501671      +40     
  Branches      60939    60942       +3     
============================================
+ Hits          82420    82530     +110     
+ Misses       409975   409892      -83     
- Partials       9236     9249      +13     
Flag Coverage Δ
uitests 4.16% <ø> (ø)
unittests 17.31% <78.87%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

1 participant