web: add reverse proxy support - #964
Conversation
Signed-off-by: Konstantinos Dichalas <kdihalas@gmail.com> Assisted-by: chatgpt/5.6-sol
|
I think we definitely want to support these use cases, my major concern with this PR is the config API proposed for the feature significantly deviating from what we currently have for OAuth. In OAuth we feed data to CEL expressions for validation and extraction of the user features (i.e. username, groups, name...). I think we can model this API very closely to how we do it for OAuth via CEL expressions. Instead of feeding JWT claims to the expressions, here we feed the HTTP headers. Pls propose an API that is as close as possible to OAuth. |
Thanks for the feedback, will work on this and update the PR |
Summary
Add a generic
ReverseProxyauthentication provider for the Flux Operator Web UI.This allows identity-aware proxies such as Tailscale, oauth2-proxy, Pomerium, or Cloudflare Access to authenticate users and pass their identity to the Web UI through HTTP headers.
The user identity is then used with the existing Kubernetes impersonation and RBAC flow.
What changed
ReverseProxyas a supported authentication type.Example
Security
Identity headers are only trusted when the direct TCP peer matches a configured trusted proxy.
X-Forwarded-Forand similar forwarded headers are intentionally not used for this check, since they can be spoofed by clients.The Web UI should still be exposed only through the trusted proxy, ideally with a NetworkPolicy preventing direct access.
Assisted-by: chatgpt/5.6-sol