Conversation
Invert the gorouter-facing CC routing in nginx_external_endpoints.conf from allow-all-then-deny to deny-by-default. Only known public endpoints (/v3, /, /v2/info, /healthz, ssh_access, staging on local blobstore, and the existing upload paths) are proxied to CC; every other request 404s. This makes internal or newly added endpoints unreachable unless explicitly allowlisted, closing the gap where /internal/apps/.../ssh_access and future paths were exposed by the catch-all proxy. 404 (not 403) is used so unlisted paths don't leak their existence, matching the V2-disabled convention. The V2 API is served only when temporary_enable_v2 is set. Rendering tests cover the allow/deny paths, ssh_access, uploads, V2 toggling, and rate-limit placement.
- block /v3-non-sense, allow /v3 and /v3/* only - v2 upload paths only if v2 is enabled - remove obsolete 403 for some internal path (is now a 404) - add missing configuration of rate limit zones (because it is not a nested location anymore) - some whitespace cosmetics - adapted nginx_spec
- json response with CF-NotFound error
- render rate-limit zones comment only if needed - more warnings
- usage was removed by cloudfoundry/cloud_controller_ng@05465dbd1
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A short explanation of the proposed change:
Invert the gorouter-facing CC routing in nginx_external_endpoints.conf from allow-all-then-deny to deny-by-default. Only known public endpoints (/v3, /, /v2/info, /healthz, ssh_access, staging on local blobstore, and the existing upload paths) are proxied to CC; every other request 404s. This makes internal or newly added endpoints unreachable unless explicitly allowlisted, closing the gap where /internal/apps/.../ssh_access and future paths were exposed by the catch-all proxy.
404 (not 403) is used so unlisted paths don't leak their existence, matching the V2-disabled convention. The V2 API is served only when temporary_enable_v2 is set. Rendering tests cover the allow/deny paths, ssh_access, uploads, V2 toggling, and rate-limit placement.
An explanation of the use cases your change solves
Prevent internal endpoints being exposed through public interfaces
Links to any other associated PRs
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
developbranchI have run CF Acceptance Tests on bosh lite