Skip to content

[Backport release-1.6] fix(ingress): trust CF-Connecting-IP only from Cloudflare ranges - #4445

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
release-1.6from
backport-4444-to-release-1.6
Sep 24, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
release-1.6from
backport-4444-to-release-1.6

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #4444 to release-1.6.

cloudflareProxy passed the Cloudflare ranges to the controller under
set_real_ip_from, which is an nginx directive and not an ingress-nginx
ConfigMap key, so the controller dropped it without a warning. With
use-forwarded-headers on, the realip module then trusted every source
from the default proxy-real-ip-cidr of 0.0.0.0/0, and any client that
reached the load balancer directly could set CF-Connecting-IP to an
address of its choice. That address is what whitelist-source-range
checks, so the tenant whitelist, and any per-Ingress one, could be
walked past with one header.

proxy-real-ip-cidr is the key the controller reads for the trusted
ranges.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
(cherry picked from commit 3800f63)
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7b71fe5f-a333-4b08-aec3-4fdd33cf0b5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit d32dc78 into release-1.6 Sep 24, 2026
2 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the backport-4444-to-release-1.6 branch September 24, 2026 13:16
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