TECHNOLOGY

Kubernetes resourceNames cannot constrain top-level creation by object name

In this article
THE QUICK TAKE

Name-scoped RBAC must follow the actual request verb and resource level; top-level create is a separate grant.

The operational scenario

A model deployment helper may update a named ConfigMap. Its author adds create to the same resourceNames rule, expecting permission to recreate only that named object. The resulting policy does not supply the intended name-restricted creation contract. Review the API operation before loosening the rule to make the helper work: a convenient broad grant can change what the identity is authorized to create.

The trust-boundary mechanism

Kubernetes documents that resourceNames cannot restrict top-level create or deletecollection by resource name. The creation limitation is not a universal prohibition for named subresources; those have different request context. Authorization uses request attributes such as verb, resource, subresource and namespace. A desired object name in a submitted body is not interchangeable with the named-resource boundary assumed for an update request.

Define the control contract

Separate the helper operations into reading or updating an existing named object, creating a top-level object and any named subresource operation. Decide whether recreation is actually needed. If creation needs content-specific constraints, identify the appropriate separate admission design rather than claiming resourceNames enforces it. State namespace scope and all applicable grants, because a narrower local rule does not remove permissions granted elsewhere.

A step-by-step verification

First construct a disposable namespace with synthetic configuration objects. Inspect authorization for the intended named read and update, then the separate top-level creation request. Next exercise the application behavior with harmless objects where authorized. Finally include another name as a negative control. Preserve the actual request resource and verb; do not infer the create decision from a successful named update or a client command label.

Evidence required for acceptance

Acceptance requires a request-by-request grant table and observed outcomes or clearly labeled authorization-review results. For name-restricted list and watch, include the documented metadata.name field selector matching the permitted name. An unfiltered list failure does not mean the named get is broken. Keep authorization rejection distinct from schema validation or admission rejection so a later layer cannot falsely certify the narrower RBAC assumption.

Failure cases and limits

This review does not prescribe a universal role for every serving controller. Some controllers legitimately create arbitrary objects within a deliberately restricted namespace. Such authority should be stated directly and assessed with the workload. The objective is to prevent a resourceNames field from serving as evidence for a boundary it cannot express, while retaining functional named access and avoiding unnecessary escalation during troubleshooting.

Name-scoped RBAC must follow the actual request verb and resource level; top-level create is a separate grant. Kubernetes RBAC resource-name constraints; Kubernetes authorization request attributes.

The proposed investigation of kubernetes resourcenames top level create is a proposed control review; no live security test was executed. Related reading: Stop unneeded API credentials entering a model container; ServiceAccount token expired: audiences and projected token rotation.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles