Skip to content

test(server): verify SSRF filter blocks internal addresses at connect time - #5834

Merged
SteKoe merged 1 commit into
masterfrom
test/ssrf-connection-filter
Oct 30, 2026
Merged

SteKoe merged 1 commit into
masterfrom
test/ssrf-connection-filter

Conversation

@SteKoe

@SteKoe SteKoe commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Adds a regression test (SsrfConnectionFilterTest) showing that, with spring.boot.admin.ssrf-protection.enabled=true, the outbound InstanceWebClient blocks connections to internal addresses at connection time (FilteredHostException), and that the default (disabled) behavior is unchanged.

Covered: loopback (via hostname resolved at connect time), cloud metadata 169.254.169.254, RFC1918, CGNAT, 0.0.0.0/8, IPv6 loopback/link-local/unique-local.

This guards the wiring from Spring Boot's HttpClientAutoConfiguration (InetAddressFilter bean -> HttpClientSettings), which the registration-time check in SsrfUrlValidator relies on for hosts that cannot be resolved during registration.

Refs #5824

@SteKoe
SteKoe requested a review from a team as a code owner October 27, 2026 07:01
@SteKoe
SteKoe merged commit eea8817 into master Oct 30, 2026
1 check passed
@SteKoe
SteKoe deleted the test/ssrf-connection-filter branch October 30, 2026 05:59
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