Repository navigation
Conversation
This was referenced Nov 21, 2026
Enforce source-network policy for administrative bearer tokens
cloudfoundry/cloud_controller_ng#5686
Draft
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.
Summary
Wire the administrative bearer-token network policy into the Cloud Controller BOSH job and establish
the Nginx source-address contract needed for enforcement over the Puma Unix socket.
cc.admin_token_network_policy.{enabled,allowed_cidrs,trusted_proxies,additional_protected_scopes}.Default disabled, empty lists, and no implicitly trusted proxies.
admin_token_network_policy.X-Real-IPand remove legacyX-Real_IPso caller headers cannot collidewith the asserted source address when Rack normalizes names.
X-Forwarded-Foron public upload forwarding too;retain existing public/internal API forwarding behavior.
Only explicitly trusted ingress peers may assert forwarded addresses. Enabled-empty allowlists deny
protected tokens. Ordinary tokens and default-disabled policy retain existing application behavior.
Validation
source-header sanitization and internal ingress defaults.
git diff --checkpasses.Coordinated changes and gate
Draft: requires a supporting Cloud Controller version. Configuration alone does not protect old
binaries. The application policy depends on these Nginx fixes; merge/release/rollout must be coordinated.
Actual Nginx/Puma forged-header tests, public/internal/upload paths, socket permissions, and the full
Cloud Controller application harness remain validation gates.
Operators must set matching UAA/CAPI allowlists and protected additions and inventory actual proxy/NAT
addresses. No production CIDRs or implicit broad private-network trust are introduced.