proposal: Restricted CRDs with RBACPolicy for Multi-Tenant RBAC#56
Merged
proposal: Restricted CRDs with RBACPolicy for Multi-Tenant RBAC#56
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a design proposal to extend the auth-operator with tenant-facing “Restricted” CRDs governed by an admin-managed RBACPolicy CRD, aiming to enable self-service RBAC while preventing privilege escalation in multi-tenant clusters.
Changes:
- Introduces a comprehensive proposal for
RBACPolicy,RestrictedRoleDefinition, andRestrictedBindDefinition. - Describes enforcement mechanisms (admission webhook vs Kyverno), continuous reconcile-time validation, and deprovisioning on policy violations.
- Documents selector semantics, mirroring behavior, and an impersonation-based defense-in-depth model.
MaxRink
added a commit
that referenced
this pull request
Feb 8, 2026
- Fix YAML indentation: environment field now properly nested under matchLabels - Standardize prefix matching: remove '*' from forbiddenNamespacePrefixes values (field name implies prefix match, no wildcard needed) - Fix v.client -> v.Client capitalization for exported struct field - Fix audit annotations: use admission.Response.AuditAnnotations instead of mutating object in validating webhook (validating webhooks cannot mutate) - Remove validateMirroringLimits from RestrictedBindDefinition validator (mirroring is a RoleDefinition concern, not BindDefinition) - Fix targetNamespaceLimits schema location: wrap under spec.bindingLimits to match the main CRD schema definition
📊 Output Delta ReportGenerated RBAC resources from Prometheus Metrics (PR branch)📈 auth_operator_* metrics
|
📊 Output Delta Report (cont.)📦 BindDefinitions StatusChanges from
|
4b5b0a5 to
b75a32d
Compare
b16bb5b to
313a760
Compare
313a760 to
bc403f7
Compare
…ypes, ToC - Fix printcolumn JSONPath .spec.policyRef.name → .spec.rbacPolicyRef.name - Remove duplicate +kubebuilder:subresource:status marker on RestrictedBindDefinition - Add RestrictedBindDefinitionStatus and RestrictedRoleDefinitionStatus Go types - Rewrite ToC to match actual document headings (11 of 14 links were broken) - Unify forbiddenNamespaces YAML shape to flat []string (was inconsistent) - Add note clarifying late examples show expanded API surface beyond skeletal Go types
08d3dde to
5c9d8f6
Compare
30 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
This proposal introduces Restricted CRD variants for tenant use with policy limits managed separately by platform administrators via a new RBACPolicy CRD.
Key Features
New CRDs
RestrictedRoleDefinition- Tenant-managed roles within policy guardrailsRestrictedBindDefinition- Tenant-managed bindings within policy guardrailsRBACPolicy- Platform admin-managed policy limits (alternatives:TenantRBACConstraint,RBACBoundary,RBACGuardrail)Security Model
rbacPolicyRefDesign Principles
matchLabels,matchExpressions(In, NotIn, Exists, DoesNotExist)prefix*,*suffix- NO regexUse Cases
Implementation Options
Files
Discussion Points
RBACPolicyvs alternativesRestrictedBindDefinitiononly, addRestrictedRoleDefinitionlater?