Repository navigation
fix(registration): Identify the registering caller by username - #239
Merged
scotwells merged 1 commit intoNov 28, 2026
Merged
Conversation
Registration admission for MachineCapacity refused any caller without a UID. Some credentials, such as client certificates, carry a username but no UID, so a publisher signed in with one could not register capacity. A caller is now identified by username, as Kubernetes RBAC identifies it. The UID stays optional: the SubjectAccessReviews carry it when the credential has one, and the authorizer decides. A test against a real API server binds RBAC to a username alone and registers as that user with no UID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevwilliams
approved these changes
Nov 28, 2026
kevwilliams
left a comment
Contributor
There was a problem hiding this comment.
Username identifies the caller as RBAC does, UID passes through when present, and envtest proves bound and unbound UID-less callers behave.
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
MachineCapacity registration refused any caller without a UID, so a publisher whose client certificate carries only a username could not register capacity.
Registration now identifies the caller by username, as Kubernetes RBAC does. The permission checks pass the UID when the credential has one.
Test plan
The creator webhook gets the same rule in #182.
🤖 Generated with Claude Code