Skip to content

fix(noderesource): forward auth headers from kube-rbac-proxy to sidecar#275

Merged
bdchatham merged 1 commit into
mainfrom
fix/rbac-proxy-forward-auth-header
May 18, 2026
Merged

fix(noderesource): forward auth headers from kube-rbac-proxy to sidecar#275
bdchatham merged 1 commit into
mainfrom
fix/rbac-proxy-forward-auth-header

Conversation

@bdchatham
Copy link
Copy Markdown
Collaborator

Summary

Adds `--auth-header-fields-enabled=true` to the kube-rbac-proxy args so the proxy emits `X-Remote-User` after a successful TokenReview + SAR. The sidecar runs in `trusted-header` authn mode and rejects any upstream-forwarded request that lacks this header with 401.

How it surfaced

After PR #274 fixed the `apiGroup` field name, the smoke test progressed past the proxy's SAR check — and immediately tripped the sidecar's authn:

sidecar generate-identity task submission returned 401: {"error":"missing X-Remote-User header"}

`--auth-header-fields-enabled` defaults to `false` in kube-rbac-proxy v0.19.x. With it off, the proxy authorizes successfully but forwards a bare request — the sidecar then has no way to know which identity passed auth, so it rejects.

Scope

  • SeiNode StatefulSet proxy (`internal/noderesource/noderesource.go`)
  • Bootstrap pod proxy (`internal/task/bootstrap_resources.go`)

Both proxy instances need the flag; the bootstrap pod uses the same sidecar trusted-header authn path.

Test plan

  • `TestPodSpec_KubeRBACProxyContainerArgs` asserts the new flag is present
  • `make test` passes
  • After merge + image build + harbor manager-patch bump: re-trigger nightly-load, confirm both SNDs reach Ready

🤖 Generated with Claude Code

Add --auth-header-fields-enabled=true to the kube-rbac-proxy args so
the proxy emits X-Remote-User after successful TokenReview + SAR.
The sidecar runs in trusted-header authn mode (SEI_SIDECAR_AUTHN_MODE
=trusted-header) and rejects upstream-forwarded requests that lack
this header with 401.

Applied to both the SeiNode StatefulSet proxy and the bootstrap pod
proxy.
@cursor
Copy link
Copy Markdown

cursor Bot commented May 18, 2026

You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace.

To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard.

@bdchatham bdchatham merged commit bce4a2b into main May 18, 2026
2 checks passed
bdchatham added a commit that referenced this pull request May 18, 2026
Picks up the kube-rbac-proxy --auth-header-fields-enabled fix so
prod + dev get the working X-Remote-User forwarding on next Flux
reconcile.
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