Skip to content

Conversation

@alexcrichton
Copy link
Contributor

This commit updates the request_interceptor implementation of outbound HTTP requests to check the set of allowed hosts before calling the request_interceptor. This fixes behavior in Spin where service-chained requests were allowed regardless of configuration of allowed_outbound_hosts in spin.toml. A new test is added to ensure that a request to the "back" component is disallowed.

This commit updates the `request_interceptor` implementation of outbound
HTTP requests to check the set of allowed hosts before calling the
`request_interceptor`. This fixes behavior in Spin where service-chained
requests were allowed regardless of configuration of
`allowed_outbound_hosts` in `spin.toml`. A new test is added to ensure
that a request to the "back" component is disallowed.

Signed-off-by: Alex Crichton <[email protected]>
@lann
Copy link
Collaborator

lann commented Feb 19, 2025

Oof - I'm sure we had this implemented before. Must have been lost in the conversion to factors.

Copy link
Collaborator

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

Yikes. Thanks for adding the test!

@itowlson itowlson merged commit 28ca31c into spinframework:main Feb 19, 2025
16 of 17 checks passed
@alexcrichton alexcrichton deleted the gate-service-chained-requests branch February 19, 2025 20:07
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.

3 participants