fix(noderesource): use apiGroup in rbac-proxy config (not group)#274
Merged
Conversation
kube-rbac-proxy's authz.ResourceAttributes struct uses field name apiGroup. Writing `group` made the proxy silently drop the field and SAR with empty apiGroup, denying every authenticated request on /v0/tasks with 403. Surfaced by today's harbor nightly-load smoke test: SAR called directly against the apiserver with group=sei.io returned allowed, but the proxy's SAR (built from its own config struct) returned denied — pointing at the field-name mismatch.
|
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. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GenerateRBACProxyConfigMapwas writing the resource API group under the wrong field name in the kube-rbac-proxy ConfigMap. This caused the proxy to silently drop the field, SAR against an empty apiGroup, and return 403 for every authenticated/v0/taskscall.The field name
apiGroupmatches kube-rbac-proxy'sauthz.ResourceAttributesstruct inpkg/authz/auth.go. Note this is the proxy's config struct, not the K8sSubjectAccessReviewAPI (which usesgroup). The two are distinct types with overlapping but non-identical field names; only the proxy's struct is the source of truth for what its config file accepts.How it surfaced
Today's harbor nightly-load smoke test exercised the post-PR-#267 RBAC chain end-to-end for the first time. Symptoms:
kubectl create subjectaccessreviewwithgroup=sei.iofor the controller SA → allowed=true/v0/tasks→ 403 Forbidden with bodyuser=...controller-manager, verb=create, resource=seinodetasks, subresource=Same user, same resource, same verb, opposite answers. The mismatch is the proxy's SAR using
apiGroup=""(empty) becausegroup:is an unknown field in its config struct.Test plan
TestGenerateRBACProxyConfigMap_UsesApiGroupupdated to assertapiGroup: sei.iomake testpassesnightly-loadcron, confirm both SNDs reach Ready (which requires every node's MarkReady to succeed through the proxy)Deployment ordering
config/manager/manager.yaml(controller-repo PR) so the default image picks up the fixmanager-patch.yaml); prod/dev inherit from the controller's default🤖 Generated with Claude Code