Skip to content

fix(rlp-gateway): validate source_id GUID before calling CAPI - #986

Open
shilpamayanna wants to merge 1 commit into
cloudfoundry:mainfrom
shilpamayanna:fix/TNZGOV-625-validate-guid-before-capi
Open

shilpamayanna wants to merge 1 commit into
cloudfoundry:mainfrom
shilpamayanna:fix/TNZGOV-625-validate-guid-before-capi

Conversation

@shilpamayanna

Copy link
Copy Markdown

CFAuthMiddleware evaluated IsAuthorized before the GUID regex, so an unvalidated source_id (e.g. "../../v2/info") was interpolated into the CAPI URL path and requested with the gateway's mTLS identity.

Check the GUID first and short-circuit, matching trafficcontroller's log_access_middleware. Add tests asserting non-GUID IDs never reach the authorizer.

Description

Please include a summary of the change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack

CFAuthMiddleware evaluated IsAuthorized before the GUID regex, so an
unvalidated source_id (e.g. "../../v2/info") was interpolated into the
CAPI URL path and requested with the gateway's mTLS identity.

Check the GUID first and short-circuit, matching trafficcontroller's
log_access_middleware. Add tests asserting non-GUID IDs never reach the
authorizer.
@shilpamayanna
shilpamayanna requested a review from a team as a code owner November 24, 2026 22:50
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@jorbaum

jorbaum commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@shilpamayanna Thanks for the contribution! Please make sure to sign the CLA so we can go forward with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants