Skip to content

fix: Support tcp connection rejection & rate-limiting when Proxy protocol is enabled#927

Merged
b1tamara merged 2 commits into
cloudfoundry:masterfrom
b1tamara:rate-limit-pp
May 29, 2026
Merged

fix: Support tcp connection rejection & rate-limiting when Proxy protocol is enabled#927
b1tamara merged 2 commits into
cloudfoundry:masterfrom
b1tamara:rate-limit-pp

Conversation

@b1tamara
Copy link
Copy Markdown
Contributor

@b1tamara b1tamara commented May 28, 2026

Haproxy connection rate limiting applies a TCP reject of the connection whenever the limit is exceeded.

When the proxy protocol is enabled, the source IP during connection initiation is the LB's IP address. The proxy protocol header is only conveyed once the session is established.

The current PR provides a fix to determine whether TCP reject of the connection or TCP reject of the session will be applied, depending on the accept proxy property.

@b1tamara b1tamara requested review from a team and CFN-CI as code owners May 28, 2026 09:58
@b1tamara b1tamara added the run-ci Allow this PR to be tested on Concourse label May 28, 2026
a18e
a18e previously approved these changes May 28, 2026
Copy link
Copy Markdown
Contributor

@a18e a18e left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Application Runtime Platform Working Group May 28, 2026
@b1tamara b1tamara changed the title fix: Support conn rate limiting when Proxy protocol is enabled fix: Support tcp connection rejection when Proxy protocol is enabled May 29, 2026
Copy link
Copy Markdown
Contributor

@a18e a18e left a comment

Choose a reason for hiding this comment

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

Minor remarks

Comment thread acceptance-tests/access_control_test.go
Comment thread spec/haproxy/templates/haproxy_config/frontend_https_spec.rb
Comment thread acceptance-tests/access_control_test.go
@a18e a18e changed the title fix: Support tcp connection rejection when Proxy protocol is enabled fix: Support tcp connection rejection & rate-limiting when Proxy protocol is enabled May 29, 2026
@b1tamara b1tamara merged commit 39ef01d into cloudfoundry:master May 29, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Merge | Prioritized to Done in Application Runtime Platform Working Group May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Allow this PR to be tested on Concourse

Projects

Development

Successfully merging this pull request may close these issues.

2 participants