Skip to content

Handle Proxy Client Registration#2

Merged
mbillow merged 5 commits into
mainfrom
dev
Jun 7, 2026
Merged

Handle Proxy Client Registration#2
mbillow merged 5 commits into
mainfrom
dev

Conversation

@mbillow
Copy link
Copy Markdown
Member

@mbillow mbillow commented Jun 7, 2026

What

Add radSecProxyHosts chart config and PINT_RADIUS_RADSEC_PROXY_HOSTS env var to generate FreeRADIUS client blocks for HAProxy proxy hosts. Also adds a startup write of clients.conf so proxy host entries land without requiring a client modification to trigger a rewrite.

Why

why these changes were made

FreeRADIUS performs a client lookup by raw TCP source IP in dual_tcp_accept() (listen.c:1157) before the connection is handed off to the TLS handler where PROXY protocol parsing occurs (tls_listen.c:379). If the HAProxy host IP is not in clients.conf, FreeRADIUS rejects the connection as an unknown client before ever reading the PROXY header, so the real client IP is never extracted. Both the HAProxy host and the actual RadSec client must have entries for the two-phase lookup to succeed.

Test Plan

how did you verify these changes did what you expected

  • Deployed FreeRADIUS in debug mode (-fxx) and observed connections from HAProxy being rejected as unknown client 129.21.49.25 with no PROXY protocol parsing attempt in the logs
  • Verified the call order in the FreeRADIUS 3.2.x source: dual_tcp_accept() in listen.c does client lookup and drops unknown clients before tls_socket_recv() in tls_listen.c has a chance to call proxy_protocol_check()
  • After adding the HAProxy host to radSecProxyHosts, FreeRADIUS accepted the connection, parsed the PROXY header, resolved the real client IP, and matched the correct RadSec client entry

Env Vars

did you add, remove, or rename any environment variables

Added PINT_RADIUS_RADSEC_PROXY_HOSTS: comma-separated list of IPs/CIDRs for trusted proxy hosts (e.g. HAProxy). Should be set alongside PINT_RADIUS_RADSEC_PROXY_PROTOCOL=true. Defaults to empty (no proxy client blocks generated).

Documentation

did you add or update any documentation. PRs should, at the minimum, update documentation when they make existing documentation out of date.

Updated chart/values.yaml and chart/values.schema.json with the new radSecProxyHosts field including description and type.

mbillow and others added 5 commits May 18, 2026 15:14
The trigger controller only fired once on annotation creation rather than
on subsequent ImageStream updates. Stripping namespace (same-namespace
triggers don't need it) and the paused field to match the minimal format
that the controller reliably watches.

Bump chart to 0.3.3.
…h FreeRADIUS

FreeRADIUS performs client lookup by raw TCP source IP before reading the
PROXY protocol header, so the HAProxy host IP must be in clients.conf for
connections to be accepted. Adds PINT_RADIUS_RADSEC_PROXY_HOSTS (comma-separated
IPs/CIDRs) which generates pint_proxy_N client blocks alongside regular RadSec
clients, enabling the two-phase client lookup FreeRADIUS requires.
@mbillow mbillow merged commit dd5bc3d into main Jun 7, 2026
2 checks passed
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